Marie MM [http://community.jboss.org/people/mariemm] created the discussion
"Re: TaskServer, persistence file and session" To view the discussion, visit: http://community.jboss.org/message/593456#593456 -------------------------------------------------------------- I found solution for me. It didn't work with one entity manager factory, but I managed to make it work with two. Persistence.xml has in both persistence units (nearly) all classes because I use one orm.xml which merges all queries. In code I have following: EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.jbpm.persistence.jpa" ); EntityManagerFactory emfTask = Persistence.createEntityManagerFactory( "org.jbpm.myTask" ); Environment env = KnowledgeBaseFactory.newEnvironment(); env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf ); env.set( EnvironmentName.GLOBALS, new MapGlobalResolver() ); TaskService taskService = new TaskService(emfTask, SystemEventListenerFactory.getSystemEventListener()); I don't understand exactly why the persistence unit for process and for task are different. If anyone makes it running with one persistence, let me know. -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/593456#593456] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
