[jboss-user] [Performance Tuning] - Problem while closing connection (wrappedConnection) retrieved from JBoss 5 pool.

Ayush Gupta do-not-reply at jboss.com
Mon Feb 6 10:23:19 EST 2012

Ayush Gupta [https://community.jboss.org/people/ayushgupta] created the document:

"Problem while closing connection (wrappedConnection) retrieved from JBoss 5 pool."

To view the document, visit: https://community.jboss.org/docs/DOC-17537

I have been using xa-datasource to have a connection pool for underlying oracle 10g database. I have created a pool of min size : 20 and max size : 40. I have a scenario where 20 threads are active, and each threads takes connection from the pool, completes its DB operation (i.e. saves approx 4000 records to DB). Once it completes the execution, it closes the connection which ideally should go back to the connection pool. The execution thread repeats  it execution by taking a connection from pool and closes at the end on each execution cycle.

        <xa-datasource-property name="URL">jdbc:oracle:thin:@smm_db_host:1521/ALSMM</xa-datasource-property>
        <xa-datasource-property name="User">EPB_APP_CONF</xa-datasource-property>
    <xa-datasource-property name="Password">abc123</xa-datasource-property>
        <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
        <!--pooling parameters-->


Now as connection is closed, it should go back to the pool immediately, but what I have been observing from the admin console, that max connection count goes upto 28. It is sure that no other process is running into the system apart from these 20 threads. Each thread retrieves the connection from pool and closes it.

I just want to know, what could be the reason for going a max count upto 28, which should ideally be 20.

Does close method invocation, just returns the handler, and in back-ground it actually takes time to synchronize the data with uderlying DB. I just want to restrict that the haldler should be returned only once the connection actually is returned back to pool.

This article was generated from the following discussion:  https://community.jboss.org/thread/194819 Problem while closing connection (wrappedConnection) retrieved from JBoss 5 pool.

Comment by going to Community

Create a new document in Performance Tuning at Community
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120206/90ee1b2f/attachment-0001.html 

More information about the jboss-user mailing list