Connection pool leakage with jBPM6

354 views
Skip to first unread message

Mr.Chowdary

unread,
Oct 24, 2014, 4:34:57 AM10/24/14
to jbpm-...@googlegroups.com

Environment : jBPM 6.0.1.Final, jboss EAP 6.2,spring data jpa 1.4.3.RELEASE,hibernate 4.1.1.Final,spring 4.0.0.RELEASE
I'm facing connection pooling leakage issue with jBPM6 tables and hibernate is firing 50+ quiries to complete a single task. Let me explain you clearly.
In my application i'm performing DML operations on application related tables, i'm observing the connection realeasing machanism by debug as

DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http-/127.0.0.1:8080-4) mysqlDS: returnConnection(3492713e, false) [1/20]

Connection pooling mechanism works fine and then i submitted a task to be completed by jbpm,some data inserting into jbpm6 tables like SessionInfo,Task and when data inserted,connection is not releasing and for next task also it is not using opened connections and opening new connections and go on.. finally i'm getting the following message due to jbpm6 tables.

Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/mysqlDS
    at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
    at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:70) [hibernate-entitymanager-4.2.7.SP1-redhat-3.jar:4.2.7.SP1-redhat-3]
    at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292) [hibernate-core-4.2.7.SP1-redhat-3.jar:4.2.7.SP1-redhat-3]
    at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:214) [hibernate-core-4.2.7.SP1-redhat-3.jar:4.2.7.SP1-redhat-3]
    ... 111 more  
Caused by: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])
	at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:383)
	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
	... 117 more

I'm using org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean and org.springframework.orm.jpa.JpaTransactionManager for session and transaction which is working for tables i insert data. But not working for data inserting by jbpm6.
I configured <property name="hibernate.connection.release_mode" value="auto"/> as well but not useful to get the connection back.  

I"m attaching log file also which helps in finding the connections locking happening and not releasing by jBPM6 tables.
Please help how to solve connection leaking issue with jbpm6. I might have done wrong configuration due to lack of depth knowledge in jBPM.
Any help is highly appreciated.

server.log

Mr.Chowdary

unread,
Oct 27, 2014, 3:20:49 AM10/27/14
to jbpm-...@googlegroups.com
This issue is happening due to jBPM6 is not closing the connections.
i tried runtime.disposeMananger(runtimeManager);
But it's not working and <idle-timeout-period> property works only for non jbpm holding idle connections get close.
Please help me how can i sove this issue with Jboss datasource usage ?

Regards,
Lakshminarayana
Reply all
Reply to author
Forward
0 new messages