-
1. Re: jBPM 4.3 and Spring integration - multiple transaction managers
vijayajangili Mar 13, 2010 6:00 AM (in response to patriciab)Hi,
there wont be issues with multiple txn maagers.
we have integrated jbpm4.3 with spring.
i didnt fid any issue..please send me ur appcontxt.xml file.
vijaya.
-
2. Re: jBPM 4.3 and Spring integration - multiple transaction managers
patriciab Mar 17, 2010 9:38 PM (in response to vijayajangili)Thank you for your reply.
I debugged the issue, and the problem seems to be on the SpringContext.java (line 60 I think), when it loads Spring beans from the context. In my case, there are 2 implementations for transaction manager. So, when running the app, SpringContext finds more than one transaction managers defined on the context, it takes the first one that it comes on the array, but gives me the warning I posted originally.
The fix I see here, is to be able to specify which Spring bean name to load when there are multiple transaction managers defined on the context.If you have a different solution for this problem, I appreciate it.
Below is a snippet from my context.xml and jbpm.cfg.xml:
<!-- context.xml ---->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager"
p:sessionFactory-ref="applicationSessionFactory">
</bean>
<bean id="SisStageTransactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager"
p:sessionFactory-ref="sisStageSessionFactory">
</bean><bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper">
<property name="jbpmCfg" value="jbpm4/jbpm.cfg.xml"/>
</bean><bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />
<!-- jbpm.cfg.xml ---->
<jbpm-configuration><import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<import resource="jbpm.tx.spring.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
<import resource="jbpm.jobexecutor.cfg.xml" />
<import resource="jbpm.default.scriptmanager.xml" />
</jbpm-configuration>
<!-- context.xml ---->Thanks,
Patricia -
3. Re: jBPM 4.3 and Spring integration - multiple transaction managers
sotes May 19, 2010 6:04 PM (in response to patriciab)Hi Patricia, I have the same problem in my application. Did you found any solution???
thanks renier
-
4. Re: jBPM 4.3 and Spring integration - multiple transaction managers
jbpm4user May 20, 2010 2:09 AM (in response to patriciab)Could you try having a class (say ABC) which extends HibernateTransactionManager. Now define SisStageTransactionManager using this new class..may not be best of solution..but may work....
-
5. Re: jBPM 4.3 and Spring integration - multiple transaction managers
rebody May 20, 2010 4:13 AM (in response to jbpm4user)Hi rams,
If you want to specify a transactionmanager that declare in the spring application context. You could change the <spring-transaction-interceptor> in jbpm.tx.spring.cfg.xml.
<spring-transaction-interceptor transaction-manager="transactionManager"/>
Change the transaction-manager attribute to the real bean name in the xml, and jBPM will use it to find the transactionManager by the name we set.
-
6. Re: jBPM 4.3 and Spring integration - multiple transaction managers
sotes May 22, 2010 11:09 AM (in response to rebody)Hi HuiSheng Xu
can you provide my the jbpm.cfg.xml and the applicationCtx.xml files?? I cant found a very clear doc about the jbpm configuration. thanks
-
7. Re: jBPM 4.3 and Spring integration - multiple transaction managers
rebody May 23, 2010 11:20 PM (in response to sotes)Hi Renier,
Here is the sample. Please have a try.
-
jbpm4sample.zip 5.7 KB
-
-
8. Re: jBPM 4.3 and Spring integration - multiple transaction managers
sotes May 27, 2010 10:33 AM (in response to rebody)thank for your help HuiSheng Xu, the sample work perfect. you've helped me a lot
-
9. jBPM 4.3 and Spring integration - multiple transaction managers
sotes Feb 10, 2011 5:42 PM (in response to rebody)