openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grigory <grigor...@gmail.com>
Subject DBCP Connection pool blocks threads on open/close connections
Date Sun, 13 Feb 2011 14:28:08 GMT

We have couple of JMS queues and their respective MDBs that talk to a
database. MDB performance was very poor in load tests. Problem was localized
to blocking on database connection pool getting or releasing connection to
the pool. Blocking prevented concurrent MDB instances (threads) from running
hence performance suffered 10-fold and worse. 

Example of thread blocked:

Name: JMS Resource Adapter-worker-23
State: BLOCKED on org.apache.commons.pool.impl.GenericObjectPool@1ea6b4a
owned by: JMS Resource Adapter-worker-19
Total blocked: 18,426  Total waited: 0

Stack trace: 
org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:916)
org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:91)
   - locked org.apache.commons.dbcp.PoolableConnection@1bcba8
org.apache.commons.dbcp.managed.ManagedConnection.close(ManagedConnection.java:147)
com.xxxxx.persistence.DbHelper.closeConnection(DbHelper.java:290)

----- end of file -----

I am almost certain that some transactional attributes and properties
contribute to this blocking, but MDBs are defined as non-transactional (we
use both annotations and ejb-jar.xml). EJBs (called from MDBs) do use
container-managed transactions though. Are there any DBCP/OpenEJB
configurations that may fix this type of blocking?
-- 
View this message in context: http://openejb.979440.n4.nabble.com/DBCP-Connection-pool-blocks-threads-on-open-close-connections-tp3303674p3303674.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message