Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created 
the discussion

"Re: LocalTaskService keep using one Entity Manager, Breaks when Database is 
Restarted"

To view the discussion, visit: https://community.jboss.org/message/832422#832422

--------------------------------------------------------------
In general, TaskServiceSession object is request scoped object, meaning it 
shall be created and destroyed on every request. Although LocalTaskService 
caches it and that is the main reason why LocalTaskService is not thread safe. 
So to workaround the problem you would need to create LocalTaskService per 
request which is lightweight enough to do so and that should resolve the 
problem.

When it comes to ksession, as far as I can tell it does not have issue like 
LocalTaskService as ksession manages entity manager on command level. Every 
operation is a command that will be managed independently within transaction 
and entity managers will be closed and cleaned on transaction completion. 
What's you ksession strategy? Do you use single session or many sessions? if 
many make sure you use dedicated environment objects for every ksession.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/832422#832422]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to