一.jbpm与ssh集成

一.jbpm与ssh集成

 1.复制jbpm的jar到lib目录

2.spring的配置文件修改

  <property name="mappingLocations">
   <list>
    <value>classpath*:/org/jbpm/**/*.hbm.xml</value>
    <value>classpath*:/com/zhongrx/**/pojo/*.hbm.xml</value>
   </list>
  </property>
  
  <property name="hibernateProperties">
   <props>
     <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
     <prop key="hibernate.show_sql">true</prop>
     <prop key="hibernate.connection.release_mode">auto</prop>
     <prop key="hibernate.query.substitutions">true</prop>
     <prop key="hibernate.cache.use_query_cache">true</prop>
     <prop key="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</prop>
     <prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</prop>
     <prop key="hibernate.cache.use_query_cache">false</prop>
     <prop key="hibernate.cache.use_second_level_cache">false</prop> 
   </props>
  </property>
  <property name="lobHandler" ref="lobHandler"/>
  <property name="dataSource">
   <ref bean="myDataSource" />
  </property>
 </bean>

 

<!-- jbpm事务配置 -->
    <bean id="jbpmConfiguration" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
        <property name="sessionFactory" ref="mySessionFactory" />
        <property name="configuration" value="/WEB-INF/config/jbpm/jbpm.cfg.xml" />
    </bean>

    <bean id="jbpmTemplate" class="org.springmodules.workflow.jbpm31.JbpmTemplate">
        <constructor-arg index="0" ref="jbpmConfiguration" />
    </bean>
   
    <bean id="flow" class="com.zhongrx.flow.core.FlowImpl">
  <property name="sessionFactory">
   <ref bean="mySessionFactory"/>
  </property>
  <property name="jbpmTemplate">
   <ref bean="jbpmTemplate"/>
  </property>
  <property name="flowService">
   <ref bean="flowService"/>
  </property>
 </bean>

3.经过以上2步基本完成,剩下的就是如何使用了。

你可能感兴趣的:(Hibernate,bean,workflow,jbpm,ssh)