4 个解决方案
#1
http://jbpm.group.javaeye.com/group/blog/218678
#2
能告诉我你的QQ吗 我想咨询你一下 谢谢了
#3
ssh+jbpm整合的配置代码
ssh+jbpm的整合足足弄了我一个月,原因是因为我使用的struts2,一直出现延迟加载的问题,最后才发现是一个顺序问题!崩溃!@!
辛苦的劳动成果就在这给大家分享了!以后大家一定要多多支持我们的论坛啊!然后我就等着
我使用的是spring2,hibernate3和struts2,下面是spring配置文件的代码,hibernate的估计大家都清楚,就不贴了
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
default-lazy-init="false">
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocations">
<list>
<value>classpath:hibernate.cfg.xml</value>
</list>
</property>
</bean>
<!-- jBPM configuration-->
<bean id="jbpmConfiguration"
class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
<property name="sessionFactory" ref="sessionFactory" />
<property name="configuration" value="classpath:jbpm.cfg.xml" />
<!-- 启动发布流程 -->
<!--<property name="processDefinitionsResources">
<list>
<value>classpath:/jpdl/simple/processdefinition.xml</value>
<value>classpath:/jpdl/cis100/processdefinition.xml</value>
</list>
</property>
--></bean>
<!-- jBPM template-->
<bean id="template"
class="org.springmodules.workflow.jbpm31.JbpmTemplate">
<constructor-arg index="0" ref="jbpmConfiguration" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="find*" read-only="true"/>
<tx:method name="get*" read-only="true"/>
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="true">
<aop:advisor pointcut="execution(* com.zephyr.workflow.jbpm.impl..*.*(..))" advice-ref="txAdvice"/>
<aop:advisor pointcut="execution(* com.zephyr.workflow.jbpm.service.impl..*.*(..))" advice-ref="txAdvice"/>
</aop:config>
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<!-- DAO -->
<bean id="obDAO"
class="com.zephyr.workflow.db.impl.HibernateObjectDAO">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<!-- Services -->
<bean id="cis100Impl"
class="com.zephyr.workflow.service.impl.Cis100ServiceImpl">
<constructor-arg>
<ref bean="obDAO"/>
</constructor-arg>
</bean>
<bean id="clerkService"
class="com.zephyr.workflow.service.impl.ClerkServiceImpl">
<constructor-arg>
<ref bean="obDAO"/>
</constructor-arg>
</bean>
<bean id="jbpmImpl"
class="com.zephyr.workflow.jbpm.impl.JBPMTemplateImpl">
<property name="template">
<ref bean="template"/>
</property>
</bean>
<bean id="jbpmService"
class="com.zephyr.workflow.jbpm.service.impl.JbpmServiceImpl">
<property name="template">
<ref bean="template"/>
</property>
</bean>
<bean id="workflowImpl"
class="com.zephyr.workflow.jbpm.impl.WorkFlowManagerImpl">
<property name="jbpmConfiguration">
<ref bean="jbpmConfiguration"/>
</property>
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
</beans>
ssh+jbpm的整合足足弄了我一个月,原因是因为我使用的struts2,一直出现延迟加载的问题,最后才发现是一个顺序问题!崩溃!@!
辛苦的劳动成果就在这给大家分享了!以后大家一定要多多支持我们的论坛啊!然后我就等着
我使用的是spring2,hibernate3和struts2,下面是spring配置文件的代码,hibernate的估计大家都清楚,就不贴了
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
default-lazy-init="false">
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocations">
<list>
<value>classpath:hibernate.cfg.xml</value>
</list>
</property>
</bean>
<!-- jBPM configuration-->
<bean id="jbpmConfiguration"
class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
<property name="sessionFactory" ref="sessionFactory" />
<property name="configuration" value="classpath:jbpm.cfg.xml" />
<!-- 启动发布流程 -->
<!--<property name="processDefinitionsResources">
<list>
<value>classpath:/jpdl/simple/processdefinition.xml</value>
<value>classpath:/jpdl/cis100/processdefinition.xml</value>
</list>
</property>
--></bean>
<!-- jBPM template-->
<bean id="template"
class="org.springmodules.workflow.jbpm31.JbpmTemplate">
<constructor-arg index="0" ref="jbpmConfiguration" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="find*" read-only="true"/>
<tx:method name="get*" read-only="true"/>
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="true">
<aop:advisor pointcut="execution(* com.zephyr.workflow.jbpm.impl..*.*(..))" advice-ref="txAdvice"/>
<aop:advisor pointcut="execution(* com.zephyr.workflow.jbpm.service.impl..*.*(..))" advice-ref="txAdvice"/>
</aop:config>
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<!-- DAO -->
<bean id="obDAO"
class="com.zephyr.workflow.db.impl.HibernateObjectDAO">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<!-- Services -->
<bean id="cis100Impl"
class="com.zephyr.workflow.service.impl.Cis100ServiceImpl">
<constructor-arg>
<ref bean="obDAO"/>
</constructor-arg>
</bean>
<bean id="clerkService"
class="com.zephyr.workflow.service.impl.ClerkServiceImpl">
<constructor-arg>
<ref bean="obDAO"/>
</constructor-arg>
</bean>
<bean id="jbpmImpl"
class="com.zephyr.workflow.jbpm.impl.JBPMTemplateImpl">
<property name="template">
<ref bean="template"/>
</property>
</bean>
<bean id="jbpmService"
class="com.zephyr.workflow.jbpm.service.impl.JbpmServiceImpl">
<property name="template">
<ref bean="template"/>
</property>
</bean>
<bean id="workflowImpl"
class="com.zephyr.workflow.jbpm.impl.WorkFlowManagerImpl">
<property name="jbpmConfiguration">
<ref bean="jbpmConfiguration"/>
</property>
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
</beans>
#4
楼上辛苦了,学习ing
#1
http://jbpm.group.javaeye.com/group/blog/218678
#2
能告诉我你的QQ吗 我想咨询你一下 谢谢了
#3
ssh+jbpm整合的配置代码
ssh+jbpm的整合足足弄了我一个月,原因是因为我使用的struts2,一直出现延迟加载的问题,最后才发现是一个顺序问题!崩溃!@!
辛苦的劳动成果就在这给大家分享了!以后大家一定要多多支持我们的论坛啊!然后我就等着
我使用的是spring2,hibernate3和struts2,下面是spring配置文件的代码,hibernate的估计大家都清楚,就不贴了
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
default-lazy-init="false">
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocations">
<list>
<value>classpath:hibernate.cfg.xml</value>
</list>
</property>
</bean>
<!-- jBPM configuration-->
<bean id="jbpmConfiguration"
class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
<property name="sessionFactory" ref="sessionFactory" />
<property name="configuration" value="classpath:jbpm.cfg.xml" />
<!-- 启动发布流程 -->
<!--<property name="processDefinitionsResources">
<list>
<value>classpath:/jpdl/simple/processdefinition.xml</value>
<value>classpath:/jpdl/cis100/processdefinition.xml</value>
</list>
</property>
--></bean>
<!-- jBPM template-->
<bean id="template"
class="org.springmodules.workflow.jbpm31.JbpmTemplate">
<constructor-arg index="0" ref="jbpmConfiguration" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="find*" read-only="true"/>
<tx:method name="get*" read-only="true"/>
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="true">
<aop:advisor pointcut="execution(* com.zephyr.workflow.jbpm.impl..*.*(..))" advice-ref="txAdvice"/>
<aop:advisor pointcut="execution(* com.zephyr.workflow.jbpm.service.impl..*.*(..))" advice-ref="txAdvice"/>
</aop:config>
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<!-- DAO -->
<bean id="obDAO"
class="com.zephyr.workflow.db.impl.HibernateObjectDAO">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<!-- Services -->
<bean id="cis100Impl"
class="com.zephyr.workflow.service.impl.Cis100ServiceImpl">
<constructor-arg>
<ref bean="obDAO"/>
</constructor-arg>
</bean>
<bean id="clerkService"
class="com.zephyr.workflow.service.impl.ClerkServiceImpl">
<constructor-arg>
<ref bean="obDAO"/>
</constructor-arg>
</bean>
<bean id="jbpmImpl"
class="com.zephyr.workflow.jbpm.impl.JBPMTemplateImpl">
<property name="template">
<ref bean="template"/>
</property>
</bean>
<bean id="jbpmService"
class="com.zephyr.workflow.jbpm.service.impl.JbpmServiceImpl">
<property name="template">
<ref bean="template"/>
</property>
</bean>
<bean id="workflowImpl"
class="com.zephyr.workflow.jbpm.impl.WorkFlowManagerImpl">
<property name="jbpmConfiguration">
<ref bean="jbpmConfiguration"/>
</property>
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
</beans>
ssh+jbpm的整合足足弄了我一个月,原因是因为我使用的struts2,一直出现延迟加载的问题,最后才发现是一个顺序问题!崩溃!@!
辛苦的劳动成果就在这给大家分享了!以后大家一定要多多支持我们的论坛啊!然后我就等着
我使用的是spring2,hibernate3和struts2,下面是spring配置文件的代码,hibernate的估计大家都清楚,就不贴了
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
default-lazy-init="false">
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocations">
<list>
<value>classpath:hibernate.cfg.xml</value>
</list>
</property>
</bean>
<!-- jBPM configuration-->
<bean id="jbpmConfiguration"
class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
<property name="sessionFactory" ref="sessionFactory" />
<property name="configuration" value="classpath:jbpm.cfg.xml" />
<!-- 启动发布流程 -->
<!--<property name="processDefinitionsResources">
<list>
<value>classpath:/jpdl/simple/processdefinition.xml</value>
<value>classpath:/jpdl/cis100/processdefinition.xml</value>
</list>
</property>
--></bean>
<!-- jBPM template-->
<bean id="template"
class="org.springmodules.workflow.jbpm31.JbpmTemplate">
<constructor-arg index="0" ref="jbpmConfiguration" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="find*" read-only="true"/>
<tx:method name="get*" read-only="true"/>
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="true">
<aop:advisor pointcut="execution(* com.zephyr.workflow.jbpm.impl..*.*(..))" advice-ref="txAdvice"/>
<aop:advisor pointcut="execution(* com.zephyr.workflow.jbpm.service.impl..*.*(..))" advice-ref="txAdvice"/>
</aop:config>
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<!-- DAO -->
<bean id="obDAO"
class="com.zephyr.workflow.db.impl.HibernateObjectDAO">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<!-- Services -->
<bean id="cis100Impl"
class="com.zephyr.workflow.service.impl.Cis100ServiceImpl">
<constructor-arg>
<ref bean="obDAO"/>
</constructor-arg>
</bean>
<bean id="clerkService"
class="com.zephyr.workflow.service.impl.ClerkServiceImpl">
<constructor-arg>
<ref bean="obDAO"/>
</constructor-arg>
</bean>
<bean id="jbpmImpl"
class="com.zephyr.workflow.jbpm.impl.JBPMTemplateImpl">
<property name="template">
<ref bean="template"/>
</property>
</bean>
<bean id="jbpmService"
class="com.zephyr.workflow.jbpm.service.impl.JbpmServiceImpl">
<property name="template">
<ref bean="template"/>
</property>
</bean>
<bean id="workflowImpl"
class="com.zephyr.workflow.jbpm.impl.WorkFlowManagerImpl">
<property name="jbpmConfiguration">
<ref bean="jbpmConfiguration"/>
</property>
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
</beans>
#4
楼上辛苦了,学习ing