JBPM5.4 integration Spring, Spring using the JTA transaction manager

Version 1

    need the jars of the following:

    TM截图未命名.png

     

    public class IntegrationSpringTest {
              @Test
              public void testSpring() {
                        JBPMHelper.setupDataSource();
      
                        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                                            "spring-conf.xml");
      
                        StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) context
                                            .getBean("ksession");
                        LocalHTWorkItemHandler humanTaskHandler = (LocalHTWorkItemHandler)context.getBean("localHTWorkItemHandler");
                        UserGroupCallbackManager.getInstance().setCallback(new DefaultUserGroupCallbackImpl("classpath:/usergroups.properties"));
                        ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
      
                        JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);
      
                        ksession.startProcess("com.sample.bpmn.hello");
      
                        logger.dispose();
                        ksession.dispose();
      
      
                        try {
                                  humanTaskHandler.dispose();
                        } catch (Exception e) {
      
                        }
      
    
    
                        /*
                         * org.springframework.orm.jpa.LocalEntityManagerFactoryBean;
                         * org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
                         */
              }