JBoss Community

Re: Session and thread safety

created by Sebastian Calbaza in jBPM - View the full discussion

I'm having the same issue... JTA managed transactions with a single statefull session that is accesed concurrently...

Because  SingleSessionCommandService uses a single instance of JpaPersistenceContextManager that returns the same EntityManager s will result in inconsistent results when it's accesed concurrently. My workaround was to implement a thread safe ProcessPersistenceContextManager and set it in the drools Environment when creating the session. ( env.set(EnvironmentName.PERSISTENCE_CONTEXT_MANAGER, persistenceContextManager));.

Reply to this message by going to Community

Start a new discussion in jBPM at Community