[jboss-user] [JBoss jBPM] - Re: jBPM 3.2 using CMT
MSchmidke
do-not-reply at jboss.com
Wed Sep 26 09:04:11 EDT 2007
Ok,
binding JBoss' Hibernate Session Factory to JNDI via persistence.xml:
| <persistence-unit name="MyEJBPU" transaction-type="JTA">
| <jta-data-source>java:jdbc/myDS</jta-data-source>
| <properties>
| <property name="hibernate.dialect"
| value="org.hibernate.dialect.Oracle9iDialect" />
| <property name="hibernate.hbm2ddl.auto" value="update" />
| <property name="hibernate.ejb.cfgfile" value="/hibernate.cfg.xml" />
| <property name="hibernate.session_factory_name" value="java:/MyFactory" />
| <property name="hibernate.use_sql_comments" value="true" />
| <property name="hibernate.show_sql" value="true" />
| </properties>
| </persistence-unit>
|
and referencing this in jbpm.cfg.xml:
| <jbpm-context>
| <service name="persistence">
| <factory>
| <bean class="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory">
| <field name="sessionFactoryJndiName">
| <string value="java:/Argos3Factory" />
| </field>
| </bean>
| </factory>
| </service>
| ...
|
seems to help.
And never forget to inject the container's Hibernate session into the JbpmContext.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088830#4088830
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088830
More information about the jboss-user
mailing list