[EJB/JBoss] - Calling createTimer from SLSB causing loca tx warning
by alllle
I have some SLSB that uses container managed default transaction settings. I also configured the JBoss DefaultDS to a separated production database.
What happens is when I invoke
SessionContext.getTimerService().createTimer()
|
I will get the following Warning message:
01:20:46,065 WARN [TxConnectionManager] Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure.
I think it is because that the timer is created with the DefaultDS, and my SLSB is using its own DataSource. Therefore, JBoss issues the warning as two different datasources are used in same transaction boundary.
I wonder what I need to do to get rid of this warning, as I don't care about keeping a single transaction for both datasources. The createTimer() call can actually be treated as a separate transaction that has nothing to do with my main SLSB transaction.
Maybe there is some EJB transaction settings I can set?
Thank you,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009233#4009233
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009233
17Â years, 11Â months
[JBoss jBPM] - Re: Simple workflow for newbie
by enpx
After reading manual I write this jPDL code:
| <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="recursion">
| <start-state name="start">
| <transition name="find contract" to="find contract"></transition>
| </start-state>
| <node name="find contract">
| <action class="org.jbpm.tutorial.mytest.FindContract"/>
| <transition name="is contract exists" to="is contract exists"></transition>
| </node>
| <decision name="is contract exists">
| <handler class="org.jbpm.tutorial.mytest.IsContractExists"/>
| <transition name="create contract" to="create contract"/>
| <transition name="create account" to="create account"></transition>
| <transition name="end" to="end"></transition>
| </decision>
| <node name="create contract">
| <action class="org.jbpm.tutorial.mytest.CreateContract"/>
| <transition name="find contract" to="find contract"></transition>
| </node>
| <node name="create account">
| <action class="org.jbpm.tutorial.mytest.CreateAccount"/>
| <transition name="end" to="end"></transition>
| </node>
| <end-state name="end"></end-state>
| </process-definition>
|
FindContract, IsContractExists, CreateContract and CreateAccount are my own classes. FindContract class wites search result to context variable, IsContractExists reads this variable to decide which transition will be selected
Is this approach optimal or can be refactored?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009230#4009230
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009230
17Â years, 11Â months