[jboss-user] [jBPM Users] - Re: Problem moving from 4.1 to 4.2 using Spring configuratio

suganda do-not-reply at jboss.com
Fri Dec 4 04:46:32 EST 2009


Hi all,

Just want to share the solution

After searching and testing , i think i have found the root cause of that weird exception. its because i let hibernate manage my transaction instead of spring. so its better to have spring manage transaction. 

The concept of current="true" in spring transaction interceptor also correct. I already enable current="true" and it works perfectly with current="true" in hibernate session if we let spring manage transaction because if we initialize spring context with required transaction at first time, we always have transaction. So by right mandatory attributes is better then required attributes. So we will make sure every thread has active transaction otherwise it will throw exception. 

Note that if we set current="false" in hibernate session configuration, we still can run it. However if you rollback using spring transaction, it will not rollback. I have tested it by putting exception after deploy process to JBPM. and its not rollback at all.

I will try whether this behavior same if we use data source (JNDI), JTA, as well as oracle dialect. Hopefully everything don't have same problem :) 

Thanks in advance,

Best Regards,
Suganda

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

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



More information about the jboss-user mailing list