JBoss Community

Re: "Entity manager is closed" when using spring defined sessions, and async work item handlers

created by Maciej Swiderski in jBPM - View the full discussion

I think it is caused by accessing manager (WorkitemManager) in your async handler after transaction was committed. You need to use session instead of the manager in async approach. So when registering handler on the session make sure that you inject session into handler too and to complete the work item use:

session.getWorkItemManager().completeWorkItem(...)

 

HTH

Reply to this message by going to Community

Start a new discussion in jBPM at Community