[jboss-user] [jBPM] - Re: Drools Spring Integration, errors in DroolsSpringTransactionManager

John Bize do-not-reply at jboss.com
Thu Aug 9 13:55:18 EDT 2012

John Bize [https://community.jboss.org/people/jbize] created the discussion

"Re: Drools Spring Integration, errors in DroolsSpringTransactionManager"

To view the discussion, visit: https://community.jboss.org/message/752862#752862

Well now that I know I'm getting the "IllegalStateException: Transaction already active" and no one seems to know anything about it, I looked further.  

I am using 4 different persistence units:
* One for reading data from a source unrelated to the BPM component of my application
* One for the application data components associated with the BPM  BPM component of my application
* One for the BPM Process entities "org.jbpm.persistence.jpa"
* One for the LocalTaskServer entities "org.jbpm.task.persistence.jpa"

I was using the four spring JpaTransactionManager instances, one for each of the corresponding EntityManagerFactories.

This was mostly working, but I was running into the above mentioned issues.

Well I saw the following comment in the JpaTransactionManager API documentation:
> This transaction manager is appropriate for applications that use a single JPA EntityManagerFactory for transactional data access. JTA (usually through  http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/transaction/jta/JtaTransactionManager.html JtaTransactionManager) is necessary for accessing multiple transactional resources within the same transaction. Note that you need to configure your JPA provider accordingly in order to make it participate in JTA transactions. 
So, I reconfigured the persistence units and application context to use the JtaTransactionManager (http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/transaction/jta/JtaTransactionManager.html), and now when I do something like claimTask(), I get: an "IllegalStateException: A JTA EntityManager cannot use getTransaction()"

Can anyone help me now?  Why is org.jbpm.task.service.TaskServiceSession.taskOperation calling getTransaction directly?

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120809/6f3c1e76/attachment.html 

More information about the jboss-user mailing list