0 Replies Latest reply on Mar 6, 2012 6:45 AM by nike j

    JBPM4.4 intergration withSpring  problem?

    nike j Newbie

      When I integrated jbpm4.4 and spring,this two  can work together,  the transaction managerd by the spring. But when I run the testcase, each run two database connection will be created,  one of which is binding to thread (this.getsessionFactory (). Getcurrentsession ()),  another one is created by JBPM api, why jbpm can not be obtained the session  from the threadlocal ?
      my jbpm config is:

       

      <jbpm-configuration>

        <import resource="jbpm.default.cfg.xml" />
        <import resource="jbpm.tx.spring.cfg.xml" />
        <import resource="jbpm.jpdl.cfg.xml" />
        <import resource="jbpm.bpmn.cfg.xml" />
        <import resource="jbpm.identity.cfg.xml" />
        <import resource="jbpm.businesscalendar.cfg.xml" />

      <transaction-context type="spring" />

      <process-engine-context>  
             <command-service>  
                  <retry-interceptor />  
                  <environment-interceptor /> 
                  <spring-transaction-interceptor current="true" transaction-manager="transactionManager" />  
              </command-service>  
          </process-engine-context>  
       
           <transaction-context>  
              <hibernate-session current="true" />  
          </transaction-context>  

      </jbpm-configuration>