[jboss-user] [JBoss jBPM] - Re: Problem configuring jBPM4 with Spring

ziglee do-not-reply at jboss.com
Tue Aug 4 08:44:42 EDT 2009


My case is a little diferent. I'm using JPA (hibernate implementation) so I would like to know how can I stop depending on jbpm.hibernate.cfg.xml.

I tried to expose my sessionFactory through this bean:

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
  | 	p:dataSource-ref="dataSource">
  | 	<property name="jpaVendorAdapter">
  | 		<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
  | 			<property name="showSql" value="true" />
  | 			<property name="generateDdl" value="true" />
  | 			<property name="databasePlatform" value="${hibernate.dialect}" />
  | 		</bean>
  | 	</property>
  | </bean>
  | 
  | <bean id="sessionFactory" factory-bean="entityManagerFactory" factory-method="getSessionFactory"/>

and used

<process-engine-context>
  | 	<command-service>
  | 		<retry-interceptor />
  | 		<environment-interceptor />
  | 		<spring-transaction-interceptor />
  | 	</command-service>
  | </process-engine-context>
  | 
  | <transaction-context>
  | 	<transaction />
  | 	<hibernate-session current="true" />
  | </transaction-context>
  | 

but all I got was:

Caused by: org.hibernate.HibernateException: No CurrentSessionContext configured!


Can somebody help me?

Thanks in advance!

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247845#4247845

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247845



More information about the jboss-user mailing list