当前位置: 代码迷 >> JBoss >> jbpm4.4与ssh2调整老报错
  详细解决方案

jbpm4.4与ssh2调整老报错

热度:3546   发布时间:2013-02-26 00:00:00.0
jbpm4.4与ssh2整合老报错
最近在学习jbpm4.4与ssh2整合的时候老是整合不成功,搞都很烦,在此请求各位大虾帮助!!

我的ssh2框架分别是:struts2.2.3,spring 2.5,hibernate 3.3

项目整合的beans.xml(applicationContext.xml)文件如下:


<context:property-placeholder location="classpath:jdbc.properties"/>
 <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="${driverClassName}"/>
    <property name="url" value="${url}"/>
    <property name="username" value="${username}"/>
    <property name="password" value="${password}"/>
     <!-- 连接池启动时的初始值 -->
 <property name="initialSize" value="${initialSize}"/>
 <!-- 连接池的最大值 -->
 <property name="maxActive" value="${maxActive}"/>
 <!-- 最大空闲值.当经过一个高峰时间后,连接池可以慢慢将已经用不到的连接慢慢释放一部分,一直减少到maxIdle为止 -->
 <property name="maxIdle" value="${maxIdle}"/>
 <!--  最小空闲值.当空闲的连接数少于阀值时,连接池就会预申请去一些连接,以免洪峰来时来不及申请 -->
 <property name="minIdle" value="${minIdle}"/>
 </bean>


<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>



<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingLocations">
<list>
<value>classpath:jbpm.execution.hbm.xml</value>
<value>classpath:jbpm.history.hbm.xml</value>
<value>classpath:jbpm.identity.hbm.xml</value>
<value>classpath:jbpm.repository.hbm.xml</value>
<value>classpath:jbpm.task.hbm.xml</value>
    </list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<prop key="hibernate.default_batch_fetch_size">10</prop>
<prop key="hibernate.max_fetch_depth">0</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>

<!--jbpm4.4工作流  -->
<bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper" lazy-init="default" autowire="default" dependency-check="default">
  <property name="jbpmCfg" value="spring-jbpm4.cfg.xml" />
</bean>
<bean id="processEngine" factory-bean="springHelper"  factory-method="createProcessEngine" />
 <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
    <bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />
    <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
    <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="txManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">