[jboss-user] [JBoss jBPM] - JBPM sharing DB connection with Spring
Thinkstream09
do-not-reply at jboss.com
Fri Jun 5 12:25:18 EDT 2009
Hello,
Does anyone know the easy way to force JBPM to use database connections configured through Spring/Hibernate.
Currently my JBMP program does it the standard way:
<string name='resource.hibernate.cfg.xml' value='hibernate.cfg.xml' />
and then inside hibernate.cfg.xml
<property name="connection.url">jdbc:oracle:thin:@208.187.32.100:1521:tdev</property>
| etc.
Inside Spring we have the standard configuration:
<bean id="DbPropertyConfigurer"
| class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
| <property name="location" value="jdbc.properties" />
| </bean>
|
| <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
| destroy-method="close">
| <property name="driverClassName">
| <value>${database.driver}</value>
| </property>
| <property name="url">
| <value>${database.url}</value>
| </property>
| <property name="username">
| <value>${database.user}</value>
| </property>
| <property name="password">
| <value>${database.password}</value>
| </property>
| </bean>
|
How do I tell JBPM to use the same connection parameters as the ones in Spring?
As a followup question, how do I configure connection sharing (and thus tsx management) between Spring-configured beans and the DB operations within my JBPM code?
I do not want to springy-fy my entire JBPM code if I can avoid it.
I'd appreciate any hints
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235713#4235713
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235713
More information about the jboss-user
mailing list