JBoss Community

Re: [JBPM 5.4] - Transaction / Concurrency problem

created by Guilherme Telles in jBPM - View the full discussion

Maciej, thanks for answering

 

I changed the code to the following:

 

    public Environment getEnvironment() {
 
        LOGGER.info("CREATING NEW ENVIRONMENT");
 
        environment = KnowledgeBaseFactory.newEnvironment();
        environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY, getEntityManagerFactoryJbpm());
        
        return environment;
    }

 

So that everytime an Environment is needed, a new one is created.

 

But I'm still getting the same error.

 

There's some other cause to the error?

 

Thanks!


Reply to this message by going to Community

Start a new discussion in jBPM at Community