[jboss-user] [jBPM Users] - jBPM4.1 - Spring 2.5.x - transactionManagement questions
CouchPotatoe
do-not-reply at jboss.com
Wed Sep 30 05:42:45 EDT 2009
Hi there,
I've created a simple jBPM 4.1 process with 4 subsequent activities that each trigger a transactional service (@Service) that they're injected with.
Obviously I've used Spring to configure jBPM and the services. I've used Andries Inzé's demo app to inspire me on how to do this.
Different from Andries's demo, I make use of a Atomikos JTA transactionManager (platformTransactionManager), and not the Hibernate transaction manager.
I would like every activity/service (based on JPA/Hibernate) to commit after it has been executed.
I have 2 questions:
- when using a single (JTA) transactionmanager for both jBPM and my JPA-services, the WHOLE process including ALL services are put in a single, atomic transaction block. When eg the 3th process fails, all previous services are rolled back too. This is not the desired behaviour for my app. Is this behaviour by design of jBPM/Spring integration?
- when specifying 2 seperate transactionmanager beans (a Hibernate platformTransactionManager named 'transactionManager' linked to jBPM's sessionFactory, and a jtaPlatformTransactionManager named 'transactionManager.jta' and used by the entityManagerFactory and @Service objects), jBPM fails with a message saying that a platformTransactionManager could not be found. I thought that specifying 2 seperate transactionManagers would solve my problem, as jBPM processes would use thair own transaction(Manager), independent from services/transactions executed by member-activities.
Or should I make use of the same transactionManager (JTA/Atomikos), but make jBPM and my services use different UserTransaction-s ? If this is the case, how do I specify that jBPM should make use of some specific userTransaction(-name)?
And how should I specify that jBPM makes use of a particular transactionManager-bean in Spring, instead of the default bean with name 'transactionManager'?
All help would be very welcome !!
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257830#4257830
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257830
More information about the jboss-user
mailing list