Thomas Setiabudi [
https://community.jboss.org/people/thomas.setiabudi] created the
discussion
"Re: DroolsSpringJpaManager breaks when Database Server is restarted, how to handle
it?"
To view the discussion, visit:
https://community.jboss.org/message/832436#832436
--------------------------------------------------------------
Hi Maciejs,
I debug the application, and it turns out when I do something like start
process(ksession.startProcess(..) ), inside DroolsSpringJpaManager these two functions
will be invoked:
1. getApplicationScopedPersistenceContext
https://github.com/droolsjbpm/droolsjbpm-integration/blob/5.5.x/drools-co...
https://github.com/droolsjbpm/droolsjbpm-integration/blob/5.5.x/drools-co...
this one will never create new Entity Manager (except for the very first time execution).
Which is not safe for Database Restart situation.
2. beginCommandScopedEntityManager
https://github.com/droolsjbpm/droolsjbpm-integration/blob/5.5.x/drools-co...
https://github.com/droolsjbpm/droolsjbpm-integration/blob/5.5.x/drools-co...
while this function will always find that entityManager is closed and then create new
Entity Manager which is safe on Database Restart situation.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/832436#832436]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]