4 Replies Latest reply on Jan 16, 2011 5:54 PM by rajasundaram

    Connection Pool Oracle 10g Jboss 4.2.3 GA problem

    rajasundaram

      Connection Pool when connections are available in the pool still it creates new connections. We checked the database sessions only 5 sessions are active but in the connection pool there are 20 connections.

       


      Environment Jboss 4.2.3 GA
      Oracle 10g
      no-tx-support - oracle-ds.xml

       

      <datasources>
        <no-tx-datasource>
          <jndi-name>DSNAME</jndi-name>
          <connection-url>jdbc:oracle:thin:@HOST:1522:SERVICE_NAME</connection-url>
          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
          <user-name>USER</user-name>
          <password>PASS</password>
          <min-pool-size>1</min-pool-size> 
          <max-pool-size>30</max-pool-size> 
          <query-timeout>60</query-timeout>
          <track-statements>true</track-statements>
          <idle-timeout-minutes>5</idle-timeout-minutes>
          <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
          <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
          <!-- Checks the Oracle error codes and messages for fatal errors -->
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
              <!-- sql to call when connection is created -->
              <new-connection-sql>select * from dual</new-connection-sql>
              <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered -->
              <check-valid-connection-sql>select * from dual</check-valid-connection-sql>
            <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
            <metadata>
               <type-mapping>Oracle9i</type-mapping>
            </metadata>
        </no-tx-datasource>
      </datasources>

       

      Advance thanks for your help

        • 1. Connection Pool Oracle 10g Jboss 4.2.3 GA problem
          wdfink

          Could you check with the jmx-console?

          Interesting values are

          - max connectins in use

          - created / destroyed

          - available con. count

          - current in use

           

          Where do you see that new connections are created?

          • 2. Connection Pool Oracle 10g Jboss 4.2.3 GA problem
            rajasundaram

            2011-01-11 16:00:01,120 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returned connection to pool org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener@899fa9[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@15147ea handles=0 lastUse=1294761601120 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@4be496 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1fbda8c] [InUse/Available/Max]: [7/93/100]

             

            we checked the oracle session only few connections are active and other connections are idle but still it creates new connections instead of using the existing connection from pool.

            • 3. Connection Pool Oracle 10g Jboss 4.2.3 GA problem
              wdfink

              That's not the expected answer to my question above.

              The log shows that the connection is returned to pool.

               

              How does your code looks like (JDBC access or EntityBeans? EIB version?)

              And please test what happen if you run the code multiple times, each time a new connection is opened? look to jmx-console statistics

              • 4. Connection Pool Oracle 10g Jboss 4.2.3 GA problem
                rajasundaram

                We have identified the issue was in coding the connection was not released one of the function and it created the pool to create new connections.

                 

                I thank for your time to respond.