3 Replies Latest reply on Sep 14, 2004 6:22 AM by Ulf Schroeter

    Connections not returning to connection pool

    anilntm Newbie

      hi all

      I have got an ejb application which is implemented for some online billing enquiry activities. The application uses stateful session beans for storing user profile, validating each screen data etc.
      The connections(using JbossManagedConnectionPool) and closed at the time of user sign out or when user exists a particular screen.

      The problem is that, the connections are not found returning to the connetion pool for reuse. In the jmx-console, The "ConnectionDesttroyedCount" for JbossManagedConnectionPool is found reached a value 80, and it is not increasing.

      So the connections increases to the maximum value set(<max-pool-size>) in oracle-ds.xml and generate sql error .


      The following is my setting in oracle-ds.xml
      <?xml version="1.0" encoding="UTF-8"?>

      <local-tx-datasource>
      <jndi-name>XYZ</jndi-name>
      <connection-url>jdbc:oracle:thin:@xxx:1521:yyyy</connection-url>
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
      <user-name>xx</user-name>
      yy
      <min-pool-size>5</min-pool-size>
      <max-pool-size>300</max-pool-size>
      <blocking-timeout-millis>18000</blocking-timeout-millis>
      <idle-timeout-minutes>60</idle-timeout-minutes>
      </local-tx-datasource>


      Any one pls advice how to solve this problem

      regards
      Anil

        • 1. Re: Connections not returning to connection pool
          Ulf Schroeter Novice

          Up to jboss 3.2.5 there is a major synchronization bug in the managed connection pool code leading to connections leaks under higher load. This bug has been fixed in jboss 3.2- and head-cvs.

          Regards
          Ulf

          • 2. Re: Connections not returning to connection pool
            anilntm Newbie

            hi

            I am using jboss 3.2.3 and jdk 1.4. In the server.log the following error is obtaining frequently...

            java.lang.IllegalStateException: Trying to return an unknown connection2! org.jboss.resource.adapter.jdbc.WrappedConnection@12f7354
            at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:330)
            at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:539)
            at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:296)
            at org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:117)
            at com.suntec.tbms3.ui.CUser.signOut(Unknown Source)
            at com.suntec.tbms3.ui.CUserAdmin.removeUser(Unknown Source)
            at com.suntec.tbms3.ui.CUserManagerSB.removeUser(Unknown Source)


            rgds
            Anil

            • 3. Re: Connections not returning to connection pool
              Ulf Schroeter Novice

              This seems to be a different problem (anyway the mentioned synchronization bug should also be 'present' in jboss 3.2.3 :-)

              Try to reproduce your error with latest jboss 3.2.6RCx. If it's gone :-) if not: bug report on sourceforge :-(

              Regards
              Ulf