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!