`
happmaoo
  • 浏览: 4429027 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Mule+Spring+jbpm

阅读更多
<iframe align="center" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog336280.html" frameborder="0" width="336" scrolling="no" height="280"></iframe>

法一:完全在spring.xml里面配置mule的所有内容

该方法的缺点的是配置umo比mule语法更加繁琐

法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记
其本质是将mule.xml转换成法一中的spring.xml

该方法比较适合在现有的spring应用中,加入mule

法三:在mule server的container内启动spring,各自用自己的配置文件格式,适用于以mule server为主,spring为辅的应用

假设有两个bean,restaurantWaiter和kitchenService,前者作为UMO来接收消息,然后调用service
1 spring-context.xml
<beans><br><bean id="restaurantWaiter" singleton="false" class="com.foo.RestaurantWaiter"><br><property name="kitchenService"><ref local="kitchenService"></ref></property><br></bean><br><bean id="kitchenService" class="com.foo.KitchenService"></bean><br></beans>

2 mule.xml
<mule-descriptor name="Restaurant Waiter"></mule-descriptor>inboundEndpoint="vm://order.queue"
implementation="restaurantWaiter">

为了让Mule能够识别restaurantWaiter,需要配置
<mule-configuration><br>....<br><container-context classname="org.mule.extras.spring.SpringContainerContext"><br><properties><br><property name="configFile" value="../conf/applicationContext.xml"></property><br></properties><br></container-context><br>....<br></mule-configuration>

Spring+jbpm+mule 三者是可以完美结合的

<!-- JBPM Datasource -->
<bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><br><spring-property name="driverClassName"><value>org.hsqldb.jdbcDriver</value></spring-property><br><spring-property name="url"><value>jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</value></spring-property><br><spring-property name="username"><value>sa</value></spring-property><br><spring-property name="password"><value></value></spring-property><br></bean>

<!-- JBPM Hibernate SessionFactory -->
<bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><br><spring-property name="dataSource"><br><ref local="jbpmDataSource"></ref><br></spring-property><br><spring-property name="mappingLocations"><br><value>classpath*:/org/jbpm/**/*.hbm.xml</value><br></spring-property><br><spring-property name="typeDefinitions"><br><ref local="jbpmTypes"></ref><br></spring-property><br><spring-property name="hibernateProperties"><br><props><br><prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop><br><prop key="hibernate.c3p0.min_size">1</prop><br><prop key="hibernate.c3p0.max_size">3</prop><br><prop key="hibernate.show_sql">false</prop><br><prop key="hibernate.query.substitutions">true 1, false 0</prop><br><prop key="hibernate.jdbc.batch_size">0</prop><br><!-- Create/update the database tables automatically when the JVM starts up --><br><prop key="hibernate.hbm2ddl.auto">update</prop><br></props><br></spring-property><br></bean>

<!-- JBPM data types -->
<bean id="jbpmTypes" class="org.springframework.orm.hibernate3.TypeDefinitionBean"><br><spring-property name="typeName"><value>string_max</value></spring-property><br><spring-property name="typeClass"><value>org.jbpm.db.hibernate.StringMax</value></spring-property><br></bean>

<!-- jBPM Configuration -->
<bean id="jbpmConfig" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBeanWorkaround"><br><spring-property name="sessionFactory"><br><ref local="jbpmSessionFactory"></ref><br></spring-property><br><spring-property name="configuration"><br><value>jbpm.cfg.xml</value><br></spring-property><br><spring-property name="processDefinitions"><br><spring-list><br><bean id="loanBroker" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean"><br><spring-property name="definitionLocation"><br><value>loan-broker-process.xml</value><br></spring-property><br></bean><br></spring-list><br></spring-property><br><spring-property name="createSchema"><value>false</value></spring-property><br></bean>

上面的部分已经足够将spring和jbpm结合起来了,appfuse中的集合也就做到上面的步骤
该集成使用了spring-modules-jbpm31.jar
具体使用的演示
JbpmConfiguration config = (JbpmConfiguration) applicationContext.getBean("jbpmConfig");
JbpmContext context = config.createJbpmContext();
ProcessDefinition definition = context.getGraphSession().findLatestProcessDefinition("testProcess");

//下面是mule中使用jbpm的配置,使用org.jbpm.msg.mule.Jbpm对其进行了封装,以便在jBpmConnector中使用

<!-- ***************************************************<br /> BPMS Configuration<br /> *************************************************** -->
<!-- BPMS object for Mule's BPM Connector -->
<bean id="jbpm" class="org.jbpm.msg.mule.Jbpm" destroy-method="destroy"><br><spring-property name="jbpmConfiguration"><br><ref local="jbpmConfig"></ref><br></spring-property><br></bean>


mule.xml

<connector name="jBpmConnector" classname="org.mule.providers.bpm.ProcessConnector"><br><properties><br><!-- This field in LoanQuoteRequest holds the unique process ID. --><br><property name="processIdField" value="requestId"></property><br><!-- jBpm itself is configured by a series of Spring beans at the end of<br /> this file. --><br><spring-property name="bpms"><ref local="jbpm"></ref></spring-property><br></properties><br></connector>

mule in spring-context

muleContext.xml

<bean id="muleManager" class="org.mule.config.spring.config.UMOManagerFactoryBean"><br><property name="configuration"><ref local="muleConfiguration"></ref></property><br><property name="messageEndpoints"><ref local="messageEndpoints"></ref></property><br><property name="connectors"><ref local="connectorList"></ref></property><br><property name="transformers"><ref local="transformerList"></ref></property><br><property name="endpoints"><br><list><br><ref local="globalInboundJmsEndpoint"></ref><br><ref local="globalOutboundJmsEndpoint"></ref><br><ref local="globalHttpEndpoint"></ref><br></list><br></property><br><property name="interceptorStacks"><ref local="interceptorsMap"></ref></property><br><property name="model"><ref local="model"></ref></property><br></bean>

or 一种简单一些的配置

muleContext.xml

<bean id="muleManager" class="org.mule.extras.spring.config.AutowireUMOManagerFactoryBean" destroy-method="dispose" singleton="true"></bean>
<!-- Used to set mule object names to their corresponding bean id -->
<bean id="muleNameProcessor" class="org.mule.extras.spring.config.MuleObjectNameProcessor"></bean>
<!-- The mule client we will use to send events to the mule server -->
<bean id="muleClient" class="org.mule.extras.client.MuleClient" depends-on="muleManager"></bean>

web.xml

<context-param><br><param-name>contextConfigLocation</param-name><br><param-value>/WEB-INF/mule-spring-config.xml</param-value><br></context-param>

<listener><br><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class><br></listener>

这样spring启动的时候,mule server也就启动了


========
使用spring和mule混合标签的config.xml

SpringConfigurationBuilder builder = new SpringConfigurationBuilder();
UMOManager manager = builder.configure("mule-spring-config.xml,mule-spring-components.xml");

接下来不需要做任何处理,因为之后都会通过
MuleManager.getInstance() 来获得该manager

br /> "http://www.symphonysoft.com/dtds/mule/mule-spring-configuration.dtd">

//create a client
MuleClient client = new MuleClient();
//send a jms message asynchronously
client.dispatch("jms://my.queue", "some data", null);
//or to receive a pop3 message via a configured mailbox
UMOMessage message = client.receive("pop3://myInboxProvider", 3000);
//or synchonous send a inter-vm message
UMOMessage message2 = client.send("vm://my.object", "Some more data", null);




法一:完全在spring.xml里面配置mule的所有内容

该方法的缺点的是配置umo比mule语法更加繁琐

法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记
其本质是将mule.xml转换成法一中的spring.xml

该方法比较适合在现有的spring应用中,加入mule

法三:在mule server的container内启动spring,各自用自己的配置文件格式,适用于以mule server为主,spring为辅的应用

假设有两个bean,restaurantWaiter和kitchenService,前者作为UMO来接收消息,然后调用service
1 spring-context.xml
<beans><br><bean id="restaurantWaiter" singleton="false" class="com.foo.RestaurantWaiter"><br><property name="kitchenService"><ref local="kitchenService"></ref></property><br></bean><br><bean id="kitchenService" class="com.foo.KitchenService"></bean><br></beans>

2 mule.xml
<mule-descriptor name="Restaurant Waiter"></mule-descriptor>inboundEndpoint="vm://order.queue"
implementation="restaurantWaiter">

为了让Mule能够识别restaurantWaiter,需要配置
<mule-configuration><br>....<br><container-context classname="org.mule.extras.spring.SpringContainerContext"><br><properties><br><property name="configFile" value="../conf/applicationContext.xml"></property><br></properties><br></container-context><br>....<br></mule-configuration>

Spring+jbpm+mule 三者是可以完美结合的

<!-- JBPM Datasource -->
<bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><br><spring-property name="driverClassName"><value>org.hsqldb.jdbcDriver</value></spring-property><br><spring-property name="url"><value>jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</value></spring-property><br><spring-property name="username"><value>sa</value></spring-property><br><spring-property name="password"><value></value></spring-property><br></bean>

<!-- JBPM Hibernate SessionFactory -->
<bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><br><spring-property name="dataSource"><br><ref local="jbpmDataSource"></ref><br></spring-property><br><spring-property name="mappingLocations"><br><value>classpath*:/org/jbpm/**/*.hbm.xml</value><br></spring-property><br><spring-property name="typeDefinitions"><br><ref local="jbpmTypes"></ref><br></spring-property><br><spring-property name="hibernateProperties"><br><props><br><prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop><br><prop key="hibernate.c3p0.min_size">1</prop><br><prop key="hibernate.c3p0.max_size">3</prop><br><prop key="hibernate.show_sql">false</prop><br><prop key="hibernate.query.substitutions">true 1, false 0</prop><br><prop key="hibernate.jdbc.batch_size">0</prop><br><!-- Create/update the database tables automatically when the JVM starts up --><br><prop key="hibernate.hbm2ddl.auto">update</prop><br></props><br></spring-property><br></bean>

<!-- JBPM data types -->
<bean id="jbpmTypes" class="org.springframework.orm.hibernate3.TypeDefinitionBean"><br><spring-property name="typeName"><value>string_max</value></spring-property><br><spring-property name="typeClass"><value>org.jbpm.db.hibernate.StringMax</value></spring-property><br></bean>

<!-- jBPM Configuration -->
<bean id="jbpmConfig" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBeanWorkaround"><br><spring-property name="sessionFactory"><br><ref local="jbpmSessionFactory"></ref><br></spring-property><br><spring-property name="configuration"><br><value>jbpm.cfg.xml</value><br></spring-property><br><spring-property name="processDefinitions"><br><spring-list><br><bean id="loanBroker" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean"><br><spring-property name="definitionLocation"><br><value>loan-broker-process.xml</value><br></spring-property><br></bean><br></spring-list><br></spring-property><br><spring-property name="createSchema"><value>false</value></spring-property><br></bean>

上面的部分已经足够将spring和jbpm结合起来了,appfuse中的集合也就做到上面的步骤
该集成使用了spring-modules-jbpm31.jar
具体使用的演示
JbpmConfiguration config = (JbpmConfiguration) applicationContext.getBean("jbpmConfig");
JbpmContext context = config.createJbpmContext();
ProcessDefinition definition = context.getGraphSession().findLatestProcessDefinition("testProcess");

//下面是mule中使用jbpm的配置,使用org.jbpm.msg.mule.Jbpm对其进行了封装,以便在jBpmConnector中使用

<!-- ***************************************************<br /> BPMS Configuration<br /> *************************************************** -->
<!-- BPMS object for Mule's BPM Connector -->
<bean id="jbpm" class="org.jbpm.msg.mule.Jbpm" destroy-method="destroy"><br><spring-property name="jbpmConfiguration"><br><ref local="jbpmConfig"></ref><br></spring-property><br></bean>


mule.xml

<connector name="jBpmConnector" classname="org.mule.providers.bpm.ProcessConnector"><br><properties><br><!-- This field in LoanQuoteRequest holds the unique process ID. --><br><property name="processIdField" value="requestId"></property><br><!-- jBpm itself is configured by a series of Spring beans at the end of<br /> this file. --><br><spring-property name="bpms"><ref local="jbpm"></ref></spring-property><br></properties><br></connector>

mule in spring-context

muleContext.xml

<bean id="muleManager" class="org.mule.config.spring.config.UMOManagerFactoryBean"><br><property name="configuration"><ref local="muleConfiguration"></ref></property><br><property name="messageEndpoints"><ref local="messageEndpoints"></ref></property><br><property name="connectors"><ref local="connectorList"></ref></property><br><property name="transformers"><ref local="transformerList"></ref></property><br><property name="endpoints"><br><list><br><ref local="globalInboundJmsEndpoint"></ref><br><ref local="globalOutboundJmsEndpoint"></ref><br><ref local="globalHttpEndpoint"></ref><br></list><br></property><br><property name="interceptorStacks"><ref local="interceptorsMap"></ref></property><br><property name="model"><ref local="model"></ref></property><br></bean>

or 一种简单一些的配置

muleContext.xml

<bean id="muleManager" class="org.mule.extras.spring.config.AutowireUMOManagerFactoryBean" destroy-method="dispose" singleton="true"></bean>
<!-- Used to set mule object names to their corresponding bean id -->
<bean id="muleNameProcessor" class="org.mule.extras.spring.config.MuleObjectNameProcessor"></bean>
<!-- The mule client we will use to send events to the mule server -->
<bean id="muleClient" class="org.mule.extras.client.MuleClient" depends-on="muleManager"></bean>

web.xml

<context-param><br><param-name>contextConfigLocation</param-name><br><param-value>/WEB-INF/mule-spring-config.xml</param-value><br></context-param>

<listener><br><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class><br></listener>

这样spring启动的时候,mule server也就启动了


========
使用spring和mule混合标签的config.xml

SpringConfigurationBuilder builder = new SpringConfigurationBuilder();
UMOManager manager = builder.configure("mule-spring-config.xml,mule-spring-components.xml");

接下来不需要做任何处理,因为之后都会通过
MuleManager.getInstance() 来获得该manager

br /> "http://www.symphonysoft.com/dtds/mule/mule-spring-configuration.dtd">

//create a client
MuleClient client = new MuleClient();
//send a jms message asynchronously
client.dispatch("jms://my.queue", "some data", null);
//or to receive a pop3 message via a configured mailbox
UMOMessage message = client.receive("pop3://myInboxProvider", 3000);
//or synchonous send a inter-vm message
UMOMessage message2 = client.send("vm://my.object", "Some more data", null);




法一:完全在spring.xml里面配置mule的所有内容

该方法的缺点的是配置umo比mule语法更加繁琐

法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记
其本质是将mule.xml转换成法一中的spring.xml

该方法比较适合在现有的spring应用中,加入mule

法三:在mule server的container内启动spring,各自用自己的配置文件格式,适用于以mule server为主,spring为辅的应用

假设有两个bean,restaurantWaiter和kitchenService,前者作为UMO来接收消息,然后调用service
1 spring-context.xml
<beans><br><bean id="restaurantWaiter" singleton="false" class="com.foo.RestaurantWaiter"><br><property name="kitchenService"><ref local="kitchenService"></ref></property><br></bean><br><bean id="kitchenService" class="com.foo.KitchenService"></bean><br></beans>

2 mule.xml
<mule-descriptor name="Restaurant Waiter"></mule-descriptor>inboundEndpoint="vm://order.queue"
implementation="restaurantWaiter">

为了让Mule能够识别restaurantWaiter,需要配置
<mule-configuration><br>....<br><container-context classname="org.mule.extras.spring.SpringContainerContext"><br><properties><br><property name="configFile" value="../conf/applicationContext.xml"></property><br></properties><br></container-context><br>....<br></mule-configuration>

Spring+jbpm+mule 三者是可以完美结合的

<!-- JBPM Datasource -->
<bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><br><spring-property name="driverClassName"><value>org.hsqldb.jdbcDriver</value></spring-property><br><spring-property name="url"><value>jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</value></spring-property><br><spring-property name="username"><value>sa</value></spring-property><br><spring-property name="password"><value></value></spring-property><br></bean>

<!-- JBPM Hibernate SessionFactory -->
<bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><br><spring-property name="dataSource"><br><ref local="jbpmDataSource"></ref><br></spring-property><br><spring-property name="mappingLocations"><br><value>classpath*:/org/jbpm/**/*.hbm.xml</value><br></spring-property><br><spring-property name="typeDefinitions"><br><ref local="jbpmTypes"></ref><br></spring-property><br><spring-property name="hibernateProperties"><br><props><br><prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop><br><prop key="hibernate.c3p0.min_size">1</prop><br><prop key="hibernate.c3p0.max_size">3</prop><br><prop key="hibernate.show_sql">false</prop><br><prop key="hibernate.query.substitutions">true 1, false 0</prop><br><prop key="hibernate.jdbc.batch_size">0</prop><br><!-- Create/update the database tables automatically when the JVM starts up --><br><prop key="hibernate.hbm2ddl.auto">update</prop><br></props><br></spring-property><br></bean>

<!-- JBPM data types -->
<bean id="jbpmTypes" class="org.springframework.orm.hibernate3.TypeDefinitionBean"><br><spring-property name="typeName"><value>string_max</value></spring-property><br><spring-property name="typeClass"><value>org.jbpm.db.hibernate.StringMax</value></spring-property><br></bean>

<!-- jBPM Configuration -->
<bean id="jbpmConfig" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBeanWorkaround"><br><spring-property name="sessionFactory"><br><ref local="jbpmSessionFactory"></ref><br></spring-property><br><spring-property name="configuration"><br><value>jbpm.cfg.xml</value><br></spring-property><br><spring-property name="processDefinitions"><br><spring-list><br><bean id="loanBroker" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean"><br><spring-property name="definitionLocation"><br><value>loan-broker-process.xml</value><br></spring-property><br></bean><br></spring-list><br></spring-property><br><spring-property name="createSchema"><value>false</value></spring-property><br></bean>

上面的部分已经足够将spring和jbpm结合起来了,appfuse中的集合也就做到上面的步骤
该集成使用了spring-modules-jbpm31.jar
具体使用的演示
JbpmConfiguration config = (JbpmConfiguration) applicationContext.getBean("jbpmConfig");
JbpmContext context = config.createJbpmContext();
ProcessDefinition definition = context.getGraphSession().findLatestProcessDefinition("testProcess");

//下面是mule中使用jbpm的配置,使用org.jbpm.msg.mule.Jbpm对其进行了封装,以便在jBpmConnector中使用

<!-- ***************************************************<br /> BPMS Configuration<br /> *************************************************** -->
<!-- BPMS object for Mule's BPM Connector -->
<bean id="jbpm" class="org.jbpm.msg.mule.Jbpm" destroy-method="destroy"><br><spring-property name="jbpmConfiguration"><br><ref local="jbpmConfig"></ref><br></spring-property><br></bean>


mule.xml

<connector name="jBpmConnector" classname="org.mule.providers.bpm.ProcessConnector"><br><properties><br><!-- This field in LoanQuoteRequest holds the unique process ID. --><br><property name="processIdField" value="requestId"></property><br><!-- jBpm itself is configured by a series of Spring beans at the end of<br /> this file. --><br><spring-property name="bpms"><ref local="jbpm"></ref></spring-property><br></properties><br></connector>

mule in spring-context

muleContext.xml

<bean id="muleManager" class="org.mule.config.spring.config.UMOManagerFactoryBean"><br><property name="configuration"><ref local="muleConfiguration"></ref></property><br><property name="messageEndpoints"><ref local="messageEndpoints"></ref></property><br><property name="connectors"><ref local="connectorList"></ref></property><br><property name="transformers"><ref local="transformerList"></ref></property><br><property name="endpoints"><br><list><br><ref local="globalInboundJmsEndpoint"></ref><br><ref local="globalOutboundJmsEndpoint"></ref><br><ref local="globalHttpEndpoint"></ref><br></list><br></property><br><property name="interceptorStacks"><ref local="interceptorsMap"></ref></property><br><property name="model"><ref local="model"></ref></property><br></bean>

or 一种简单一些的配置

muleContext.xml

<bean id="muleManager" class="org.mule.extras.spring.config.AutowireUMOManagerFactoryBean" destroy-method="dispose" singleton="true"></bean>
<!-- Used to set mule object names to their corresponding bean id -->
<bean id="muleNameProcessor" class="org.mule.extras.spring.config.MuleObjectNameProcessor"></bean>
<!-- The mule client we will use to send events to the mule server -->
<bean id="muleClient" class="org.mule.extras.client.MuleClient" depends-on="muleManager"></bean>

web.xml

<context-param><br><param-name>contextConfigLocation</param-name><br><param-value>/WEB-INF/mule-spring-config.xml</param-value><br></context-param>

<listener><br><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class><br></listener>

这样spring启动的时候,mule server也就启动了


========
使用spring和mule混合标签的config.xml

SpringConfigurationBuilder builder = new SpringConfigurationBuilder();
UMOManager manager = builder.configure("mule-spring-config.xml,mule-spring-components.xml");

接下来不需要做任何处理,因为之后都会通过
MuleManager.getInstance() 来获得该manager

br /> "http://www.symphonysoft.com/dtds/mule/mule-spring-configuration.dtd">

//create a client
MuleClient client = new MuleClient();
//send a jms message asynchronously
client.dispatch("jms://my.queue", "some data", null);
//or to receive a pop3 message via a configured mailbox
UMOMessage message = client.receive("pop3://myInboxProvider", 3000);
//or synchonous send a inter-vm message
UMOMessage message2 = client.send("vm://my.object", "Some more data", null);




法一:完全在spring.xml里面配置mule的所有内容

该方法的缺点的是配置umo比mule语法更加繁琐

法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记
其本质是将mule.xml转换成法一中的spring.xml

该方法比较适合在现有的spring应用中,加入mule

法三:在mule server的container内启动spring,各自用自己的配置文件格式,适用于以mule server为主,spring为辅的应用

假设有两个bean,restaurantWaiter和kitchenService,前者作为UMO来接收消息,然后调用service
1 spring-context.xml
<beans><br><bean id="restaurantWaiter" singleton="false" class="com.foo.RestaurantWaiter"><br><property name="kitchenService"><ref local="kitchenService"></ref></property><br></bean><br><bean id="kitchenService" class="com.foo.KitchenService"></bean><br></beans>

2 mule.xml
<mule-descriptor name="Restaurant Waiter"></mule-descriptor>inboundEndpoint="vm://order.queue"
implementation="restaurantWaiter">

为了让Mule能够识别restaurantWaiter,需要配置
<mule-configuration><br>....<br><container-context classname="org.mule.extras.spring.SpringContainerContext"><br><properties><br><property name="configFile" value="../conf/applicationContext.xml"></property><br></properties><br></container-context><br>....<br></mule-configuration>

Spring+jbpm+mule 三者是可以完美结合的

<!-- JBPM Datasource -->
<bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><br><spring-property name="driverClassName"><value>org.hsqldb.jdbcDriver</value></spring-property><br><spring-property name="url"><value>jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</value></spring-property><br><spring-property name="username"><value>sa</value></spring-property><br><spring-property name="password"><value></value></spring-property><br></bean>

<!-- JBPM Hibernate SessionFactory -->
<bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><br><spring-property name="dataSource"><br><ref local="jbpmDataSource"></ref><br></spring-property><br><spring-property name="mappingLocations"><br><value>classpath*:/org/jbpm/**/*.hbm.xml</value><br></spring-property><br><spring-property name="typeDefinitions"><br><ref local="jbpmTypes"></ref><br></spring-property><br><spring-property name="hibernateProperties"><br><props><br><prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop><br><prop key="hibernate.c3p0.min_size">1</prop><br><prop key="hibernate.c3p0.max_size">3</prop><br><prop key="hibernate.show_sql">false</prop><br><prop key="hibernate.query.substitutions">true 1, false 0</prop><br><prop key="hibernate.jdbc.batch_size">0</prop><br><!-- Create/update the database tables automatically when the JVM starts up --><br><prop key="hibernate.hbm2ddl.auto">update</prop><br></props><br></spring-property><br></bean>

<!-- JBPM data types -->
<bean id="jbpmTypes" class="org.springframework.orm.hibernate3.TypeDefinitionBean"><br><spring-property name="typeName"><value>string_max</value></spring-property><br><spring-property name="typeClass"><value>org.jbpm.db.hibernate.StringMax</value></spring-property><br></bean>

<!-- jBPM Configuration -->
<bean id="jbpmConfig" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBeanWorkaround"><br><spring-property name="sessionFactory"><br><ref local="jbpmSessionFactory"></ref><br></spring-property><br><spring-property name="configuration"><br><value>jbpm.cfg.xml</value><br></spring-property><br><spring-property name="processDefinitions"><br><spring-list><br><bean id="loanBroker" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean"><br><spring-property name="definitionLocation"><br><value>loan-broker-process.xml</value><br></spring-property><br></bean><br></spring-list><br></spring-property><br><spring-property name="createSchema"><value>false</value></spring-property><br></bean>

上面的部分已经足够将spring和jbpm结合起来了,appfuse中的集合也就做到上面的步骤
该集成使用了spring-modules-jbpm31.jar
具体使用的演示
JbpmConfiguration config = (JbpmConfiguration) applicationContext.getBean("jbpmConfig");
JbpmContext context = config.createJbpmContext();
ProcessDefinition definition = context.getGraphSession().findLatestProcessDefinition("testProcess");

//下面是mule中使用jbpm的配置,使用org.jbpm.msg.mule.Jbpm对其进行了封装,以便在jBpmConnector中使用

<!-- ***************************************************<br /> BPMS Configuration<br /> *************************************************** -->
<!-- BPMS object for Mule's BPM Connector -->
<bean id="jbpm" class="org.jbpm.msg.mule.Jbpm" destroy-method="destroy"><br><spring-property name="jbpmConfiguration"><br><ref local="jbpmConfig"></ref><br></spring-property><br></bean>


mule.xml

<connector name="jBpmConnector" classname="org.mule.providers.bpm.ProcessConnector"><br><properties><br><!-- This field in LoanQuoteRequest holds the unique process ID. --><br><property name="processIdField" value="requestId"></property><br><!-- jBpm itself is configured by a series of Spring beans at the end of<br /> this file. --><br><spring-property name="bpms"><ref local="jbpm"></ref></spring-property><br></properties><br></connector>

mule in spring-context

muleContext.xml

<bean id="muleManager" class="org.mule.config.spring.config.UMOManagerFactoryBean"><br><property name="configuration"><ref local="muleConfiguration"></ref></property><br><property name="messageEndpoints"><ref local="messageEndpoints"></ref></property><br><property name="connectors"><ref local="connectorList"></ref></property><br><property name="transformers"><ref local="transformerList"></ref></property><br><property name="endpoints"><br><list><br><ref local="globalInboundJmsEndpoint"></ref><br><ref local="globalOutboundJmsEndpoint"></ref><br><ref local="globalHttpEndpoint"></ref><br></list><br></property><br><property name="interceptorStacks"><ref local="interceptorsMap"></ref></property><br><property name="model"><ref local="model"></ref></property><br></bean>

or 一种简单一些的配置

muleContext.xml

<bean id="muleManager" class="org.mule.extras.spring.config.AutowireUMOManagerFactoryBean" destroy-method="dispose" singleton="true"></bean>
<!-- Used to set mule object names to their corresponding bean id -->
<bean id="muleNameProcessor" class="org.mule.extras.spring.config.MuleObjectNameProcessor"></bean>
<!-- The mule client we will use to send events to the mule server -->
<bean id="muleClient" class="org.mule.extras.client.MuleClient" depends-on="muleManager"></bean>

web.xml

<context-param><br><param-name>contextConfigLocation</param-name><br><param-value>/WEB-INF/mule-spring-config.xml</param-value><br></context-param>

<listener><br><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class><br></listener>

这样spring启动的时候,mule server也就启动了


========
使用spring和mule混合标签的config.xml

SpringConfigurationBuilder builder = new SpringConfigurationBuilder();
UMOManager manager = builder.configure("mule-spring-config.xml,mule-spring-components.xml");

接下来不需要做任何处理,因为之后都会通过
MuleManager.getInstance() 来获得该manager

br /> "http://www.symphonysoft.com/dtds/mule/mule-spring-configuration.dtd">

//create a client
MuleClient client = new MuleClient();
//send a jms message asynchronously
client.dispatch("jms://my.queue", "some data", null);
//or to receive a pop3 message via a configured mailbox
UMOMessage message = client.receive("pop3://myInboxProvider", 3000);
//or synchonous send a inter-vm message
UMOMessage message2 = client.send("vm://my.object", "Some more data", null);




法一:完全在spring.xml里面配置mule的所有内容

该方法的缺点的是配置umo比mule语法更加繁琐

法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记
其本质是将mule.xml转换成法一中的spring.xml

该方法比较适合在现有的spring应用中,加入mule

法三:在mule server的container内启动spring,各自用自己的配置文件格式,适用于以mule server为主,spring为辅的应用

假设有两个bean,restaurantWaiter和kitchenService,前者作为UMO来接收消息,然后调用service
1 spring-context.xml
<beans><br><bean id="restaurantWaiter" singleton="false" class="com.foo.RestaurantWaiter"><br><property name="kitchenService"><ref local="kitchenService"></ref></property><br></bean><br><bean id="kitchenService" class="com.foo.KitchenService"></bean><br></beans>

2 mule.xml
<mule-descriptor name="Restaurant Waiter"></mule-descriptor>inboundEndpoint="vm://order.queue"
implementation="restaurantWaiter">

为了让Mule能够识别restaurantWaiter,需要配置
<mule-configuration><br>....<br><container-context classname="org.mule.extras.spring.SpringContainerContext"><br><properties><br><property name="configFile" value="../conf/applicationContext.xml"></property><br></properties><br></container-context><br>....<br></mule-configuration>

Spring+jbpm+mule 三者是可以完美结合的

<!-- JBPM Datasource -->
<bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><br><spring-property name="driverClassName"><value>org.hsqldb.jdbcDriver</value></spring-property><br><spring-property name="url"><value>jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</value></spring-property><br><spring-property name="username"><value>sa</value></spring-property><br><spring-property name="password"><value></value></spring-property><br></bean>

<!-- JBPM Hibernate SessionFactory -->
<bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><br><spring-property name="dataSource"><br><ref local="jbpmDataSource"></ref><br></spring-property><br><spring-property name="mappingLocations"><br><value>classpath*:/org/jbpm/**/*.hbm.xml</value><br></spring-property><br><spring-property name="typeDefinitions"><br><ref local="jbpmTypes"></ref><br></spring-property><br><spring-property name="hibernateProperties"><br><props><br><prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop><br><prop key="hibernate.c3p0.min_size">1</prop><br><prop key="hibernate.c3p0.max_size">3</prop><br><prop key="hibernate.show_sql">false</prop><br><prop key="hibernate.query.substitutions">true 1, false 0</prop><br><prop key="hibernate.jdbc.batch_size">0</prop><br><!-- Create/update the database tables automatically when the JVM starts up --><br><prop key="hibernate.hbm2ddl.auto">update</prop><br></props><br></spring-property><br></bean>

<!-- JBPM data types -->
<bean id="jbpmTypes" class="org.springframework.orm.hibernate3.TypeDefinitionBean"><br><spring-property name="typeName"><value>string_max</value></spring-property><br><spring-property name="typeClass"><value>org.jbpm.db.hibernate.StringMax</value></spring-property><br></bean>

<!-- jBPM Configuration -->
<bean id="jbpmConfig" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBeanWorkaround"><br><spring-property name="sessionFactory"><br><ref local="jbpmSessionFactory"></ref><br></spring-property><br><spring-property name="configuration"><br><value>jbpm.cfg.xml</value><br></spring-property><br><spring-property name="processDefinitions"><br><spring-list><br><bean id="loanBroker" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean"><br><spring-property name="definitionLocation"><br><value>loan-broker-process.xml</value><br></spring-property><br></bean><br></spring-list><br></spring-property><br><spring-property name="createSchema"><value>false</value></spring-property><br></bean>

上面的部分已经足够将spring和jbpm结合起来了,appfuse中的集合也就做到上面的步骤
该集成使用了spring-modules-jbpm31.jar
具体使用的演示
JbpmConfiguration config = (JbpmConfiguration) applicationContext.getBean("jbpmConfig");
JbpmContext context = config.createJbpmContext();
ProcessDefinition definition = context.getGraphSession().findLatestProcessDefinition("testProcess");

//下面是mule中使用jbpm的配置,使用org.jbpm.msg.mule.Jbpm对其进行了封装,以便在jBpmConnector中使用

<!-- ***************************************************<br /> BPMS Configuration<br /> *************************************************** -->
<!-- BPMS object for Mule's BPM Connector -->
<bean id="jbpm" class="org.jbpm.msg.mule.Jbpm" destroy-method="destroy"><br><spring-property name="jbpmConfiguration"><br><ref local="jbpmConfig"></ref><br></spring-property><br></bean>


mule.xml

<connector name="jBpmConnector" classname="org.mule.providers.bpm.ProcessConnector"><br><properties><br><!-- This field in LoanQuoteRequest holds the unique process ID. --><br><property name="processIdField" value="requestId"></property><br><!-- jBpm itself is configured by a series of Spring beans at the end of<br /> this file. --><br><spring-property name="bpms"><ref local="jbpm"></ref></spring-property><br></properties><br></connector>

mule in spring-context

muleContext.xml

<bean id="muleManager" class="org.mule.config.spring.config.UMOManagerFactoryBean"><br><property name="configuration"><ref local="muleConfiguration"></ref></property><br><property name="messageEndpoints"><ref local="messageEndpoints"></ref></property><br><property name="connectors"><ref local="connectorList"></ref></property><br><property name="transformers"><ref local="transformerList"></ref></property><br><property name="endpoints"><br><list><br><ref local="globalInboundJmsEndpoint"></ref><br><ref local="globalOutboundJmsEndpoint"></ref><br><ref local="globalHttpEndpoint"></ref><br></list><br></property><br><property name="interceptorStacks"><ref local="interceptorsMap"></ref></property><br><property name="model"><ref local="model"></ref></property><br></bean>

or 一种简单一些的配置

muleContext.xml

<bean id="muleManager" class="org.mule.extras.spring.config.AutowireUMOManagerFactoryBean" destroy-method="dispose" singleton="true"></bean>
<!-- Used to set mule object names to their corresponding bean id -->
<bean id="muleNameProcessor" class="org.mule.extras.spring.config.MuleObjectNameProcessor"></bean>
<!-- The mule client we will use to send events to the mule server -->
<bean id="muleClient" class="org.mule.extras.client.MuleClient" depends-on="muleManager"></bean>

web.xml

<context-param><br><param-name>contextConfigLocation</param-name><br><param-value>/WEB-INF/mule-spring-config.xml</param-value><br></context-param>

<listener><br><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class><br></listener>

这样spring启动的时候,mule server也就启动了


========
使用spring和mule混合标签的config.xml

SpringConfigurationBuilder builder = new SpringConfigurationBuilder();
UMOManager manager = builder.configure("mule-spring-config.xml,mule-spring-components.xml");

接下来不需要做任何处理,因为之后都会通过
MuleManager.getInstance() 来获得该manager

br /> "http://www.symphonysoft.com/dtds/mule/mule-spring-configuration.dtd">

//create a client
MuleClient client = new MuleClient();
//send a jms message asynchronously
client.dispatch("jms://my.queue", "some data", null);
//or to receive a pop3 message via a configured mailbox
UMOMessage message = client.receive("pop3://myInboxProvider", 3000);
//or synchonous send a inter-vm message
UMOMessage message2 = client.send("vm://my.object", "Some more data", null);




法一:完全在spring.xml里面配置mule的所有内容

该方法的缺点的是配置umo比mule语法更加繁琐

法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记
其本质是将mule.xml转换成法一中的spring.xml

该方法比较适合在现有的spring应用中,加入mule

法三:在mule server的container内启动spring,各自用自己的配置文件格式,适用于以mule server为主,spring为辅的应用

假设有两个bean,restaurantWaiter和kitchenService,前者作为UMO来接收消息,然后调用service
1 spring-context.xml
<beans><br><bean id="restaurantWaiter" singleton="false" class="com.foo.RestaurantWaiter"><br><property name="kitchenService"><ref local="kitchenService"></ref></property><br></bean><br><bean id="kitchenService" class="com.foo.KitchenService"></bean><br></beans>

2 mule.xml
<mule-descriptor name="Restaurant Waiter"></mule-descriptor>inboundEndpoint="vm://order.queue"
implementation="restaurantWaiter">

为了让Mule能够识别restaurantWaiter,需要配置
<mule-configuration><br>....<br><container-context classname="org.mule.extras.spring.SpringContainerContext"><br><properties><br><property name="configFile" value="../conf/applicationContext.xml"></property><br></properties><br></container-context><br>....<br></mule-configuration>

Spring+jbpm+mule 三者是可以完美结合的

<!-- JBPM Datasource -->
<bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><br><spring-property name="driverClassName"><value>org.hsqldb.jdbcDriver</value></spring-property><br><spring-property name="url"><value>jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</value></spring-property><br><spring-property name="username"><value>sa</value></spring-property><br><spring-property name="password"><value></value></spring-property><br></bean>

<!-- JBPM Hibernate SessionFactory -->
<bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><br><spring-property name="dataSource"><br><ref local="jbpmDataSource"></ref><br></spring-property><br><spring-property name="mappingLocations"><br><value>classpath*:/org/jbpm/**/*.hbm.xml</value><br></spring-property><br><spring-property name="typeDefinitions"><br><ref local="jbpmTypes"></ref><br></spring-property><br><spring-property name="hibernateProperties"><br><props><br><prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop><br><prop key="hibernate.c3p0.min_size">1</prop><br><prop key="hibernate.c3p0.max_size">3</prop><br><prop key="hibernate.show_sql">false</prop><br><prop key="hibernate.query.substitutions">true 1, false 0</prop><br><prop key="hibernate.jdbc.batch_size">0</prop><br><!-- Create/update the database tables automatically when the JVM starts up --><br><prop key="hibernate.hbm2ddl.auto">update</prop><br></props><br></spring-property><br></bean>

<!-- JBPM data types -->
<bean id="jbpmTypes" class="org.springframework.orm.hibernate3.TypeDefinitionBean"><br><spring-property name="typeName"><value>string_max</value></spring-property><br><spring-property name="typeClass"><value>org.jbpm.db.hibernate.StringMax</value></spring-property><br></bean>

<!-- jBPM Configuration -->
<bean id="jbpmConfig" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBeanWorkaround"><br><spring-property name="sessionFactory"><br><ref local="jbpmSessionFactory"></ref><br></spring-property><br><spring-property name="configuration"><br><value>jbpm.cfg.xml</value><br></spring-property><br><spring-property name="processDefinitions"><br><spring-list><br><bean id="loanBroker" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean"><br><spring-property name="definitionLocation"><br><value>loan-broker-process.xml</value><br></spring-property><br></bean><br></spring-list><br></spring-property><br><spring-property name="createSchema"><value>false</value></spring-property><br></bean>

上面的部分已经足够将spring和jbpm结合起来了,appfuse中的集合也就做到上面的步骤
该集成使用了spring-modules-jbpm31.jar
具体使用的演示
JbpmConfiguration config = (JbpmConfiguration) applicationContext.getBean("jbpmConfig");
JbpmContext context = config.createJbpmContext();
ProcessDefinition definition = context.getGraphSession().findLatestProcessDefinition("testProcess");

//下面是mule中使用jbpm的配置,使用org.jbpm.msg.mule.Jbpm对其进行了封装,以便在jBpmConnector中使用

<!-- ***************************************************<br /> BPMS Configuration<br /> *************************************************** -->
<!-- BPMS object for Mule's BPM Connector -->
<bean id="jbpm" class="org.jbpm.msg.mule.Jbpm" destroy-method="destroy"><br><spring-property name="jbpmConfiguration"><br><ref local="jbpmConfig"></ref><br></spring-property><br></bean>


mule.xml

<connector name="jBpmConnector" classname="org.mule.providers.bpm.ProcessConnector"><br><properties><br><!-- This field in LoanQuoteRequest holds the unique process ID. --><br><property name="processIdField" value="requestId"></property><br><!-- jBpm itself is configured by a series of Spring beans at the end of<br /> this file. --><br><spring-property name="bpms"><ref local="jbpm"></ref></spring-property><br></properties><br></connector>

mule in spring-context

muleContext.xml

<bean id="muleManager" class="org.mule.config.spring.config.UMOManagerFactoryBean"><br><property name="configuration"><ref local="muleConfiguration"></ref></property><br><property name="messageEndpoints"><ref local="messageEndpoints"></ref></property><br><property name="connectors"><ref local="connectorList"></ref></property><br><property name="transformers"><ref local="transformerList"></ref></property><br><property name="endpoints"><br><list><br><ref local="globalInboundJmsEndpoint"></ref><br><ref local="globalOutboundJmsEndpoint"></ref><br><ref local="globalHttpEndpoint"></ref><br></list><br></property><br><property name="interceptorStacks"><ref local="interceptorsMap"></ref></property><br><property name="model"><ref local="model"></ref></property><br></bean>

or 一种简单一些的配置

muleContext.xml

<bean id="muleManager" class="org.mule.extras.spring.config.AutowireUMOManagerFactoryBean" destroy-method="dispose" singleton="true"></bean>
<!-- Used to set mule object names to their corresponding bean id -->
<bean id="muleNameProcessor" class="org.mule.extras.spring.config.MuleObjectNameProcessor"></bean>
<!-- The mule client we will use to send events to the mule server -->
<bean id="muleClient" class="org.mule.extras.client.MuleClient" depends-on="muleManager"></bean>

web.xml

<context-param><br><param-name>contextConfigLocation</param-name><br><param-value>/WEB-INF/mule-spring-config.xml</param-value><br></context-param>

<listener><br><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class><br></listener>

这样spring启动的时候,mule server也就启动了


========
使用spring和mule混合标签的config.xml

SpringConfigurationBuilder builder = new SpringConfigurationBuilder();
UMOManager manager = builder.configure("mule-spring-config.xml,mule-spring-components.xml");

接下来不需要做任何处理,因为之后都会通过
MuleManager.getInstance() 来获得该manager

br /> "http://www.symphonysoft.com/dtds/mule/mule-spring-configuration.dtd">

//create a client
MuleClient client = new MuleClient();
//send a jms message asynchronously
client.dispatch("jms://my.queue", "some data", null);
//or to receive a pop3 message via a configured mailbox
UMOMessage message = client.receive("pop3://myInboxProvider", 3000);
//or synchonous send a inter-vm message
UMOMessage message2 = client.send("vm://my.object", "Some more data", null);




法一:完全在spring.xml里面配置mule的所有内容

该方法的缺点的是配置umo比mule语法更加繁琐

法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记
其本质是将mule.xml转换成法一中的spring.xml

该方法比较适合在现有的spring应用中,加入mule

法三:在mule server的container内启动spring,各自用自己的配置文件格式,适用于以mule server为主,spring为辅的应用

假设有两个bean,restaurantWaiter和kitchenService,前者作为UMO来接收消息,然后调用service
1 spring-context.xml
<beans><br><bean id="restaurantWaiter" singleton="false" class="com.foo.RestaurantWaiter"><br><property name="kitchenService"><ref local="kitchenService"></ref></property><br></bean><br><bean id="kitchenService" class="com.foo.KitchenService"></bean><br></beans>

2 mule.xml
<mule-descriptor name="Restaurant Waiter"></mule-descriptor>inboundEndpoint="vm://order.queue"
implementation="restaurantWaiter">

为了让Mule能够识别restaurantWaiter,需要配置
<mule-configuration><br>....<br><container-context classname="org.mule.extras.spring.SpringContainerContext"><br><properties><br><property name="configFile" value="../conf/applicationContext.xml"></property><br></properties><br></container-context><br>....<br></mule-configuration>

Spring+jbpm+mule 三者是可以完美结合的

<!-- JBPM Datasource -->
<bean id="jbpmDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><br><spring-property name="driverClassName"><value>org.hsqldb.jdbcDriver</value></spring-property><br><spring-property name="url"><value>jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</value></spring-property><br><spring-property name="username"><value>sa</value></spring-property><br><spring-property name="password"><value></value></spring-property><br></bean>

<!-- JBPM Hibernate SessionFactory -->
<bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><br><spring-property name="dataSource"><br><ref local="jbpmDataSource"></ref><br></spring-property><br><spring-property name="mappingLocations"><br><value>classpath*:/org/jbpm/**/*.hbm.xml</value><br></spring-property><br><spring-property name="typeDefinitions"><br><ref local="jbpmTypes"></ref><br></spring-property><br><spring-property name="hibernateProperties"><br><props><br><prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop><br><prop key="hibernate.c3p0.min_size">1</prop><br><prop key="hibernate.c3p0.max_size">3</prop><br><prop key="hibernate.show_sql">false</prop><br><prop key="hibernate.query.substitutions">true 1, false 0</prop><br><prop key="hibernate.jdbc.batch_size">0</prop><br><!-- Create/update the database tables automatically when the JVM starts up --><br><prop key="hibernate.hbm2ddl.auto">update</prop><br></props><br></spring-property><br></bean>

<!-- JBPM data types -->
<bean id="jbpmTypes" class="org.springframework.orm.hibernate3.TypeDefinitionBean"><br><spring-property name="typeName"><value>string_max</value></spring-property><br><spring-property name="typeClass"><value>org.jbpm.db.hibernate.StringMax</value></spring-property><br></bean>

<!-- jBPM Configuration -->
<bean id="jbpmConfig" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBeanWorkaround"><br><spring-property name="sessionFactory"><br><ref local="jbpmSessionFactory"></ref><br></spring-property><br><spring-property name="configuration"><br><value>jbpm.cfg.xml</value><br></spring-property><br><spring-property name="processDefinitions"><br><spring-list><br><bean id="loanBroker" class="org.springmodules.workflow.jbpm31.definition.ProcessDefinitionFactoryBean"><br><spring-property name="definitionLocation"><br><value>loan-broker-process.xml</value><br></spring-property><br></bean><br></spring-list><br></spring-property><br><spring-property name="createSchema"><value>false</value></spring-property><br></bean>

上面的部分已经足够将spring和jbpm结合起来了,appfuse中的集合也就做到上面的步骤
该集成使用了spring-modules-jbpm31.jar
具体使用的演示
JbpmConfiguration config = (JbpmConfiguration) applicationContext.getBean("jbpmConfig");
JbpmContext context = config.createJbpmContext();
ProcessDefinition definition = context.getGraphSession().findLatestProcessDefinition("

分享到:
评论

相关推荐

    Mule + JBPM by Maven - HelloWorld

    【标题】"Mule + JBPM by Maven - HelloWorld" 指的是一个使用Mule ESB集成JBPM工作流引擎的示例项目,通过Maven构建。这个项目旨在帮助开发者理解如何将Mule与JBPM结合,实现业务流程管理功能。 Mule ESB...

    Mule+ESB+Studio +v3.3安装使用手册

    ### Mule ESB Studio v3.3 安装与使用详解 #### 一、Mule ESB Studio 简介 Mule ESB (Enterprise Service Bus) 是一款强大的集成平台,用于连接不同的应用和服务,实现数据和服务的无缝交互。Mule ESB Studio v3.3...

    mule-spring-boot-starter

    使用mule-spring-boot-starter,您可以运行Spring Boot应用程序中嵌入的Mule CE。 这使Mule开发人员无需下载Mule运行时,创建Maven工件并将工件推送到Mule运行时即可快速原型化和/或部署Mule应用程序。 该项目将...

    mule in action 说明+文档介绍

    mule in action 和doc文档详细介绍 Mule的核心组件是UMO(Universal Message Objects,从Mule2.0开始UMO这一概念已经被组件Componse所代替),UMO实现整合逻辑。UMO可以是POJO,JavaBean等等。它支持30多种传输协议...

    MuleESB集成webservice+restful(sprintboot+mybatis+mysql)+activeMQ+javamail

    MuleESB集成webservice+restful(sprintboot+mybatis+mysql)+activeMQ+javamail,五天的研究成果,集成了我所关注的点,希望有更多的朋友一起学习进步。

    mule-springboot-module:Mule 4模块可嵌入Spring Boot应用程序

    Spring Boot模块扩展添加描述... ... ... 将此依赖项添加到您的应用程序pom.xml &lt;groupId&gt;...

    mule_spring_hibernate_demo:Spring和Hibernate的Mule持久性示例

    【标题】"mule_spring_hibernate_demo"是一个基于Mule ESB(企业服务总线)、Spring框架和Hibernate ORM(对象关系映射)的实战项目,展示了如何在Mule应用程序中实现数据持久化。这个例子旨在帮助开发者理解如何将...

    mule-spring-run-1

    mule-starter-app-入门级Spring Boot Mule嵌入式应用程序内容博客请查看。用法通过Gradle git clone https://github.com/glawson6/mule-starter-app.gitcd mule-starter-app ...使用./gradlew进行./gradlew ... ./...

    esb-mule系统设计

    MULE ESB可以与Spring框架无缝集成,利用Spring的DI特性管理服务的生命周期,同时Spring的安全、事务管理等特性也可以应用于MULE中的服务。这种集成使得开发者可以利用Spring的丰富功能,同时享受到MULE在ESB领域的...

    mule -esb 源码

    `mule-spring-configuration.dtd`和`mule-configuration.dtd`是Mule ESB的XML配置文件的DTD(文档类型定义),它们规定了XML配置文件的结构和元素。Spring是Mule ESB的核心组件之一,负责管理对象的生命周期和依赖...

    liferay 5.2.3 可實際用於建構 jbpm workflow portlet的 jbpm及mule war檔

    liferay 5.2.3 可實際用於建構 jbpm workflow portlet的 jbpm檔。 用這個檔案加上mule再參考網路上的設定文件,即可輕易的在5.2.3上完成workflow portlet的建置... mule檔太大,請在liferay網路上下載即可

    mule IDE (mule ESB)

    Mule ESB 是一个轻量级的基于java的企业服务总线和集成平台, 使得开发人员可以快速,简单的连接多个应用, 使得它们可以交换数据。 Mule ESB 容易集成现有异构系统,包括:JMS, Web Services, JDBC, HTTP, 等. ESB...

    mule文档详解 mule

    **Mule ESB详解** Mule ESB,全称为Mule Enterprise Service Bus,是由MuleSoft公司开发的一款强大且灵活的企业服务总线。它是一种中间件,旨在促进不同应用程序之间的数据交换,通过提供一个集成平台来连接各种...

    mule开发环境搭建和部署

    "Mule开发环境搭建和部署" Mule是当前流行的企业服务总线(Enterprise Service Bus, ESB),它提供了一个灵活、可扩展、高性能的集成平台。构建Mule开发环境是Mule应用程序的基础,以下将对Mule开发环境的搭建和...

    mule ce xmemcached

    7. **集成XMemcached到Mule**: 这涉及到创建Spring配置文件,定义Bean来连接到Memcached服务器,并在Mule应用中调用这些Bean来执行缓存操作。 8. **缓存应用实例**: 在Mule应用中,可能会有一个特定的流程或组件,...

    Mule stdio 安装过程

    Mule ESB支持多种传输协议,如文件、FTP、UDP、TCP、SOAP、电子邮件、JMS等,并能够与Spring、ActiveMQ、CXF、Axis、Drools等流行开源项目无缝集成。此外,尽管Mule ESB并非基于JBI(Java Business Integration)...

    mule web service exsample

    【Mule Web Service 示例】 Mule ESB(Enterprise Service Bus)是一种强大的集成平台,它允许开发者轻松地构建和部署分布式应用程序。在这个示例中,我们将深入探讨如何使用Mule来发布Web服务,这是一种允许不同...

    Mule企业版、社区版功能比较

    Mule 企业版和社区版功能比较 Mule 企业版和社区版是两种不同的Mule版本,主要区别在于功能、安全性和可靠性等方面。本文将对Mule 企业版和社区版的功能进行比较,帮助用户选择合适的Mule版本。 一、功能框架 ...

    mule-standalone-3.9.0.zip

    Mule ESB(企业服务总线)是一款强大的集成平台,由Mulesoft公司开发,用于构建和管理企业级的应用程序网络。"mule-standalone-3.9.0.zip"是一个包含Mule ESB独立运行时环境的压缩包,版本为3.9.0。在本文中,我们将...

    mule in action 即mule实战源码

    《Mule in Action》是关于Mule ESB的实战指南,该书深入浅出地介绍了如何使用Mule这一强大的企业服务总线(ESB)进行应用程序集成。Mule ESB以其用户基数庞大、文档详尽以及社区活跃而备受赞誉,是企业级集成解决...

Global site tag (gtag.js) - Google Analytics