Integrate jbpm4 with spring

Source: Internet
Author: User

Integration steps:
* Import the jbpm jar package
* Delete the jar packages of db and hibernate.
* Create a configuration file under config
Config/jbpm
Jbpm. cfg. xml
Jbpm. hibernate. cfg. xml
* In the jbpm. cfg. xml file
<Import resource = "jbpm. tx. hibernate. cfg. xml"/>
<Import resource = "jbpm. tx. spring. cfg. xml"/>
Spring processes transactions in a unified manner. The configuration on the right shows that the transaction is started by creating a new session.
* In the jbpm. hibernate. cfg. xml file
* Database connection Configuration
<Property name = "current_session_context_class"> thread </property>
This line of configuration cannot be written, and the session cannot be obtained from the current thread
* Project Table ing File
* Ing file of jbpm tables
* Spring configuration file
* Modify the path of the hibernate configuration file
<Bean id = "sessionFactory"
Class = "org. springframework. orm. hibernate3.LocalSessionFactoryBean">
<Property name = "configLocation">
<Value> classpath: jbpm/jbpm. hibernate. cfg. xml </value>
</Property>
</Bean>
* Let spring generate processEngine
<Bean id = "springHelper" class = "org. jbpm. pvm. internal. processengine. SpringHelper">
<Property name = "jbpmCfg" value = "jbpm/jbpm. cfg. xml"> </property>
</Bean>

<Bean id = "processEngine" factory-bean = "springHelper" factory-method = "createProcessEngine"/>
Note the path of the jbpm. cfg. xml configuration file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.