4 Replies Latest reply on Oct 18, 2006 12:05 AM by wmprice

    Managed Connection Pool Issue

    sivashanmugam

      I am migrating applications from Weblogic to JBoss for our clients. And I face an serious issue of Managed Connection pool. The maximum connection count is reached very fast and it seems the connection is not getting destroyed frequently. I am closing the connection using the close method and setting the connection object to null

      For eg if "dbConnection" is the Connection object

      dbConnection.close();
      dbConnection = null;

      Will the second line dbConnection = null affect the Managed Connection pool in any way? It would be great if you can show some pointers for this issue.

        • 1. Re: Managed Connection Pool Issue
          sagarp

          Sivashanmugam, any luck in fixing this problem? I am facing similar problem when migrating to JBoss.

          • 2. Re: Managed Connection Pool Issue
            kazam

            I am having a similar problem after migrating from jboss 4.0.2 to jboss 4.0.4.GA.

            My connections are reaching the end fast and the idleTimeout doesn't seem to be recovering the connections. It appears that the connection destroyed count goes up alongwith the connection created count. However, the in use connection count only keeps going up until the application crashes with no more managed connections.

            Also, I have tried to introduce some connections which aren't being closed and jca gives no warning about them.

            Please help, it appears that this is a jboss 4.0.4 version issue.


            Thanks, Kazam.

            • 3. Re: Managed Connection Pool Issue
              sivashanmugam

              Hi,

              My problem as due to not committing a transaction. If you open any connection with AutoCommit set to false then commit it explicitly. If you open a connection with AutoCommit false and if you dont commit the JBoss connection will still remain in the pool.

              Regards,
              siva

              • 4. Re: Managed Connection Pool Issue

                Ummm...no.


                If you open a connection with AutoCommit false and if you dont commit the JBoss connection will still remain in the pool.


                You can never 'open' a connection in JBoss with the auto commit flag set to anything. For a NoTx Datasource the auto commit flag will be set to true as per the JCA/JDBC specification prior to being handed to the client. For a LocalTx Datasource the flag is set to false prior to being handed to the client. You should not modify this flag. This is what JBoss is for, ie managing txn semantics for you.

                The 'if you dont commit the JBoss connection will still remain in the pool' statment makes no sense and doesn't even come close to anything realistic.