JBPM6 Transactional Tables Connection Pool Leak
Wednesday: 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 am facing a connection pool leak issue with jBPM6 tables and hibernate is running 50+ queries to complete one task. Let me explain to you clearly.
In my application, I am performing DML operations on application related tables, I observe the connection realeasing machanism by debugging as
DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http- / 127.0.0.1: 8080-4) mysqlDS: returnConnection (3492713e, false) [1/20]
The mechanism of the connection pool is working fine, and then I sent a task that must be done jbpm, some of the data are inserted into the table jbpm6, such as SessionInfo
, Task
and when the data is inserted, the connection is not released, and for the next task is also not using open connections and opening new connect and continue. Finally I get the following message because of the jbpm6 tables.
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: it is impossible to get a managed connection for java: jboss / datasources / mysqlDS
on 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
I use org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
and org.springframework.orm.jpa.JpaTransactionManager
for the session and a transaction that works for tables i, inserts the data. But doesn't work for jbpm6 data insertion.
I've configured <property name="hibernate.connection.release_mode" value="auto"/>
but not useful to get the connection back.
<!--Following entity manager for Mysql database-->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName" value="masterDataMysql"/>
</bean>
<!--Transaction manager for both H2 and Mysql-->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
Click here for error log
UPDATE: This is due to connections not being closed jBPM6
Help to solve the connection leak problem with jbpm6 ??? Any help is appreciated.
source to share
No one has answered this question yet
Check out similar questions: