[jboss-user] [jBPM] - JBPM5.4 integration Spring, Spring using the JTA transaction manager

wp ren do-not-reply at jboss.com
Wed Apr 10 22:05:30 EDT 2013


wp ren [https://community.jboss.org/people/bird86] created the document:

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

To view the document, visit: https://community.jboss.org/docs/DOC-48575

--------------------------------------------------------------
need the jars of the following:
 https://community.jboss.org/servlet/JiveServlet/showImage/102-48575-1-20616/TM%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.png  https://community.jboss.org/servlet/JiveServlet/downloadImage/102-48575-1-20616/304-38/TM%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.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;
                     */
          }
--------------------------------------------------------------

Comment by going to Community
[https://community.jboss.org/docs/DOC-48575]

Create a new document in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130410/c9fddec6/attachment-0001.html 


More information about the jboss-user mailing list