[jboss-user] [JBoss jBPM] - Re: Jbpm - EJB LazyInitialization Exception
sreepathia@gmail.com
do-not-reply at jboss.com
Tue Jun 3 09:11:44 EDT 2008
Hi,
I understand your problem, This is because your transaction/session is initiated in EJB and it was completed automatically when you exited the EJB method. when you call processInstance.signal() JBPM will try to use the session associated with the processInstanceobject for updatign the database. which is closed in this scenario, There are couple of ways to do this
1) Try to complete all the database activities in one single method of EJB.
2) If you want to do this in multiple methods/layers then you need to make these both methods in one transaction like, start a transaction before calling the EJB object and end the transaction in your servelet or calling class after completing the process.
Spring has certain API to support thsi functionality,i implemented this in spiring but i am not sure how you will do it in EJB.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4155323#4155323
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4155323
More information about the jboss-user
mailing list