[jboss-user] [jBPM] - Re: TaskServer, persistence file and session
Marie MM
do-not-reply at jboss.com
Wed Mar 16 06:25:11 EDT 2011
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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110316/5df5bd33/attachment.html
More information about the jboss-user
mailing list