WEB开发网
开发学院软件开发Java JBPM 4.0 使用问题 -- 3:也谈 JBPM 4 整合Sprin... 阅读

JBPM 4.0 使用问题 -- 3:也谈 JBPM 4 整合Spring..

 2009-09-22 00:00:00 来源:WEB开发网   
核心提示: jbpm.tx.hibernate.cfg.xml<?xmlversion="1.0"encoding="UTF-8"?><jbpm-configuration><process-engine-context><c

jbpm.tx.hibernate.cfg.xml

<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration>
  <process-engine-context>
    <command-service>
      <retry-interceptor />
      <environment-interceptor />
      <!-- <standard-transaction-interceptor /> -->
      <spring-transaction-interceptor current="true" /> 
    </command-service>
  </process-engine-context>
  <!--kim  
  <transaction-context>
    <transaction />
    <hibernate-session />
  </transaction-context>
  -->
  <transaction-context>
    <hibernate-session current="true"/>
  </transaction-context>
  
</jbpm-configuration>

applicationContext-jbpm.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
    <bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
           <constructor-arg value="jbpm/jbpm.cfg.xml" />
    </bean>
    <bean id="processEngine" factory-bean="jbpmConfiguration" factory-method="buildProcessEngine" />
    <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
    <bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />
    <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
    <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
    <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
    <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />
</beans>

applicationContext-hibernate.xml (片段)

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" parent="AbstractSessionFactory">
        <property name="annotatedClasses">
            <list>
                <value>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</value>
</list>
        </property>
        <property name="mappingResources">
            <list>
                <value>jbpm.repository.hbm.xml</value>
                <value>jbpm.execution.hbm.xml</value>
                <value>jbpm.history.hbm.xml</value>
                <value>jbpm.task.hbm.xml</value>
                <value>jbpm.identity.hbm.xml</value>
            </list>
        </property>
        
    </bean>

另外该有的Jar包都要有哦~

上一页  1 2 3 

Tags:JBPM 使用 问题

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接