Maciej Swiderski [
https://community.jboss.org/people/swiderski.maciej] created the
discussion
"Re: [JBPM 5.4] - Transaction / Concurrency problem"
To view the discussion, visit:
https://community.jboss.org/message/832232#832232
--------------------------------------------------------------
if you have mulitple ksessions that different threads operate on you cannot share the
environment object. Each session must have dedicated instance of Environment and looking
at the code given you share environment.
Guilherme Telles wrote:
My Environment:
*public* Environment getEnvironment() {
*if*(environment == *null*) {
LOGGER.info("CREATING NEW ENVIRONMENT");
environment = KnowledgeBaseFactory.newEnvironment();
environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY,
getEntityManagerFactoryJbpm());
}
*return* environment;
}
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/832232#832232]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]