users@glassfish.java.net

Oracle 11g Connections Leak While Using JMS With GlassFish v3.0.1

From: <glassfish_at_javadesktop.org>
Date: Mon, 19 Jul 2010 14:16:12 PDT

Has anyone experienced the following issue, and if so, is there a solution?

GlassFish v3.0.1 (on windows XP) plus Oracle 11g (both windows XP and linux)

The steps to set up after downloading glassfish-3.0.1-ml.zip are:

   1. Add ojdbc6.jar to glassfishv3/glassfish/domains/domain1/lib
   2. Use the following properties in the glassfishv3/glassfish/domains/domain1/imq/instances/imqbroker/props/config.properties file, where defining the number of connections is necessary, otherwise the whole thing hangs right from the start:
   3.

      imq.brokerid=imqbroker
      imq.persist.jdbc.dbVendor=oracle
      imq.persist.store=jdbc
      imq.persist.jdbc.oracle.user=testuser
      imq.persist.jdbc.oracle.password=testpassword
      imq.persist.jdbc.oracle.needpassword=true
      imq.persist.jdbc.oracle.property.url=jdbc:oracle:thin:@hostname:1521:ORCL
      imq.persist.jdbc.min_connections=1
      imq.persist.jdbc.max_connections=100
          

   4. asadmin.bat start-domain
   5. Set up the Oracle database using asadmin:
         1. asadmin.bat delete-jdbc-connection-pool --cascade DerbyPool
            asadmin.bat create-jdbc-connection-pool --datasourceclassname oracle.jdbc.xa.client.OracleXADataSource --restype javax.sql.XADataSource --description "TestDataSource" --property url=jdbc\\:oracle\\:thin\\:@newton\\:1521\\:ORCL:user=testuser:password=testpassword TestDataSource
            asadmin.bat create-jdbc-resource --description "TestDataSource" --connectionpoolid TestDataSource jdbc/__default
   6. Now start adding queues while monitoring the number database connections used in Oracle, until connections run out and every hangs:
         1. asadmin.bat create-jmsdest --desttype queue TEST1
            asadmin.bat create-jmsdest --desttype queue TEST2
            asadmin.bat create-jmsdest --desttype queue TEST3
            asadmin.bat create-jmsdest --desttype queue TEST4
            asadmin.bat create-jmsdest --desttype queue TEST5

And the leak problem in terms of connections:

   1. Before the first queue creation: 46 connections, then after each TEST queue creation command:
   2. TEST1: 56
   3. TEST2: 61
   4. TEST3: 64
   5. TEST4: 69
   6. TEST5: 72

Thanks

Joe
[Message sent by forum member 'teknomad']

http://forums.java.net/jive/thread.jspa?messageID=478018