[jboss-user] [jBPM] - Re: jbpm5 transaction commit

RuiHua Tang do-not-reply at jboss.com
Thu Jul 14 06:59:16 EDT 2011


RuiHua Tang [http://community.jboss.org/people/trh3037] created the discussion

"Re: jbpm5 transaction commit"

To view the discussion, visit: http://community.jboss.org/message/615144#615144

--------------------------------------------------------------
Yes of course, i use spring to manage transaction for jbpm5 :

Constants.ctx = WebApplicationContextUtils
                                        .getRequiredWebApplicationContext(event.getServletContext());
 


applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
          xmlns:drools="http://drools.org/schema/drools-spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:context="http://www.springframework.org/schema/context"
          xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
          xsi:schemaLocation="http://www.springframework.org/schema/beans    
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
            http://www.springframework.org/schema/context    
            http://www.springframework.org/schema/context/spring-context-3.0.xsd    
            http://www.springframework.org/schema/tx    
                  http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
          <context:annotation-config />
          <bean id="dataSource"
                    class="org.springframework.jdbc.datasource.DriverManagerDataSource">
                    <property name="driverClassName" value="oracle.jdbc.OracleDriver" />
                    <property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl" />
                    <property name="username" value="jbpm" />
                    <property name="password" value="jbpm" />
          </bean>
          <bean id="entityManagerFactory"
                    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
                    <property name="persistenceUnitName" value="org.jbpm.persistence.jpa"></property>
                    <property name="dataSource" ref="dataSource"></property>
                    <property name="jpaVendorAdapter">
                              <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
                                        <property name="database" value="ORACLE" />
                                        <property name="showSql" value="true" />
                              </bean>
                    </property>
          </bean>
  
          <bean id="txManager" class="org.springframework.orm.jpa.JpaTransactionManager">
                    <property name="entityManagerFactory" ref="entityManagerFactory" />
          </bean>
  
          <tx:annotation-driven transaction-manager="txManager" />
  
          <bean
                    class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
          <bean
                    class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
</beans>
 
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/615144#615144]

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/20110714/8f783505/attachment-0001.html 


More information about the jboss-user mailing list