Getting jBPM to use an existing Hibernate session factory
wasperen May 19, 2006 4:44 AMFollowing configuration:
<jbpm-context> <service name="persistence"> <bean name="dbpersistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory"> <property name="sessionFactoryJndiName"> <string value="java:/hibernate/JbpmSessionFactory" /> </property> </bean> </service> <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" /> <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" /> <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" /> <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" /> </jbpm-context>
The Hibernate Session Factory is there and works, but when I create a new jBPM context, I get:
10:41:43,831 DEBUG [JBPMUtil] Creating jBPM context 10:41:43,832 DEBUG [JBPMUtil] Creating initial JNDI context. 10:41:43,834 DEBUG [JBPMUtil] Getting jBPM Configuration MBean 10:41:43,837 DEBUG [JBPMUtil] Got the jBPM Configuration of type org.jbpm.JbpmConfiguration 10:41:43,859 DEBUG [JbpmContextInfo] creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]' 10:41:43,859 DEBUG [JbpmContext] creating JbpmContext 10:41:43,860 DEBUG [JBPMUtil] Created jBPM context org.jbpm.JbpmContext@11afcfd4 10:41:43,860 DEBUG [JBPMUtil] Setting actorid to wasperen 10:41:43,862 DEBUG [DbPersistenceServiceFactory] creating persistence service 10:41:43,868 DEBUG [DbPersistenceServiceFactory] building hibernate session factory 10:41:43,871 DEBUG [HibernateHelper] using default hibernate configuration resource (hibernate.cfg.xml) 10:41:43,872 INFO [Configuration] configuring from resource: /hibernate.cfg.xml 10:41:43,872 INFO [Configuration] Configuration resource: /hibernate.cfg.xml 10:41:43,875 ERROR [JBPMPage] Page 'Home' failed to get the task list. 10:41:43,876 DEBUG [JBPMPage] Page 'Home' is closing a jBPM Context. 10:41:43,876 DEBUG [JbpmContext] closing JbpmContext 10:41:43,877 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@6ff58334 10:41:43,877 DEBUG [Services] closing service 'authentication': org.jbpm.security.authentication.DefaultAuthenticationService@5f790458
Why is it creating a new persistence service at 10:41:43,862 and building a new hibernate session factory?
Thanks,
Willem