[jboss-user] [JBoss jBPM] - Re: db connection leak some advice please

bentins do-not-reply at jboss.com
Thu Feb 1 18:37:40 EST 2007


OK. Done alot of investigation but still have a problem. Here is what I got:

first, I saw that my jbmp.configuration has no effect. i.e to have no transaction support by hibernate i had

  | <service name='persistence' factory='org.jbpm.persistence.db.DbPersistenceServiceFactory'>
  |     	<field name="isTransactionEnabled"><false /></field>
  |     </service>
  | 
this did not actually load the attribute what i should have had is this:


  | <service name='persistence'>
  |      <factory>
  |      	<bean class='com.emi.framework.infrastructure.workflow.EmiDbPersistanceServiceFactory'>
  |     		<field name="isTransactionEnabled"><false /></field>
  |     	</bean>
  |      </factory>
  |     </service>
  | 

Now the transaction is managed by Jboss App Server and not hibernate. Still there is a problem.

Here is what I do:
1. user clicks on a link on a web page.
2. A UserTransaction is opened
3. JbpmContext is created (JbpmConfiguration.getInstance().createJbpmContext()
4. TaskMgmntSesion is received and a taskInstance is loaded.
5. ContextInstance is received from the task
6. processinstance is received from context
7. the process is signaled.
8. Action are run and the process foloows to the next state.
9 return from signal to method
10. commit transaction
11. JbpmContext is closed

After lots of investigation I know the following:
1. the connection is opened by Jbpm in the LoadTaskInstance
2. this connection is not on the hiberanteSession, jdbcContext, ConnectionManager
3. I could not find it anywhere, so I can not close it.
4. This connection is not closed and stays open even though transaction is committed or rolledback.
5. Since this connection is nowhere to be found I can't close it.

This causes the connection pool to run out very quickly.

Need help ASAP

THNX

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009746#4009746

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009746



More information about the jboss-user mailing list