2 Replies Latest reply on Jul 2, 2009 2:58 AM by liangfa lei

    Problem for JNDI database connection pooling

    liangfa lei Newbie

      Hi,all

      I hava an app which runs on JBoss 4.* with the JNDI connection datasource pooling named testDs,and sometimes it does not work.At that time I view the "jboss.system"-"type=ServerInfo" in jmx-console,invoke the "java.lang.String listThreadDump()" operation button and find there are several BLOCKING state threads which indicate they are blocking in getting datasource connection.

      In the meantime,i try to view "jboss.jca"-"name=testDs,service=ManagedConnectionPool" in jmx-console,but find there is no response when i click that link,which means i could't access the attribute page for the testDs connection pooling.When i restart the JBoss,it works.Anybody knows how this happened? What lead to the connnection pooling attribute page can't be accessible?

      Your reply will by most appreciated.

        • 1. Re: Problem for JNDI database connection pooling
          Vicky Kak Master

          Spend some time to view the "Connection leak" section here
          http://www.jboss.org/community/wiki/FAQJBossJCA

          • 2. Re: Problem for JNDI database connection pooling
            liangfa lei Newbie

             

            "vickyk" wrote:
            Spend some time to view the "Connection leak" section here
            http://www.jboss.org/community/wiki/FAQJBossJCA


            Thanks.I have read the docs.

            What i mentioned above happends when i executing an operation.Before executing i monitor the ds "JBossManagedConnectionPool" MBean attribute description page,everything is ok,the value of "InUseConnectionCount" attribute is 0,means there are no connections that not closed,and the value of "AvailableConnectionCount" is 30,means there are idle connections for use.

            oracle-ds.xml
            <?xml version="1.0" encoding="UTF-8"?>
            
            <datasources>
             <local-tx-datasource>
             <jndi-name>oracleDs</jndi-name>
             <connection-url>jdbc:oracle:thin:@10.10.1.31:1521:ora9i</connection-url>
             <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
             <security-domain>EncryptDBPassword4</security-domain>
             <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
             <metadata>
             <type-mapping>Oracle9i</type-mapping>
             </metadata>
             <min-pool-size>10</min-pool-size>
             <max-pool-size>30</max-pool-size>
             <blocking-timeout-millis>60000</blocking-timeout-millis>
             <idle-timeout-minutes>15</idle-timeout-minutes>
             <new-connection-sql>SELECT COUNT(*) FROM dual</new-connection-sql>
             <check-valid-connection-sql>SELECT COUNT(*) FROM dual</check-valid-connection-sql>
            </local-tx-datasource>
            </datasources>
            


            the threadDump after executing an operation:
            ......
            Thread: ajp-10.10.0.42-8009-7 : priority:5, demon:true, threadId:500, threadState:BLOCKED, lockName:java.util.ArrayList@7052f5
             org.jboss.resource.connectionmanager.IdleRemover.internalRegisterPool(IdleRemover.java:92)
             org.jboss.resource.connectionmanager.IdleRemover.registerPool(IdleRemover.java:53)
             org.jboss.resource.connectionmanager.InternalManagedConnectionPool.initialize(InternalManagedConnectionPool.java:141)
            ......
            


            So anybody have ideas with this?

            Your reply will by most appreciated.