Java Reference
In-Depth Information
To build our solution, we need to build a simple CustomerService class and configure it
appropriately. We'll integrate jBPM and tailor transaction management for the CustomerService class.
We'll also make our bean responsible for deploying the process definitions for us as the bean starts up,
so that if they weren't already deployed, they will be.
The XML for the application context is stark, and simple.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=" http://www.springframework.org/schema/beans"
xmlns:tx=" http://www.springframework.org/schema/tx"
xmlns:p=" http://www.springframework.org/schema/p"
xmlns:util=" http://www.springframework.org/schema/util"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop=" http://www.springframework.org/schema/aop"
xmlns:context=" http://www.springframework.org/schema/context"
xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
">
<import resource="jbpm4-context.xml" />
<context:annotation-config />
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method propagation="REQUIRED" name="*" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:advisor advice-ref="txAdvice"
pointcut="execution(* com.apress.springenterpriserecipes..jbpm4.*.*(..))" />
</aop:config>
<util:list id="annotatedHibernateClasses">
<value>com.apress.springenterpriserecipes.jbpm.jbpm4.customers.Customer
</value>
</util:list>
 
Search WWH ::




Custom Search