[jboss-user] [jBPM] - Re: [JBPM 5.4] - Transaction / Concurrency problem

Maciej Swiderski do-not-reply at jboss.com
Mon Aug 12 01:14:10 EDT 2013


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&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130812/2c02a22d/attachment.html 


More information about the jboss-user mailing list