[jboss-user] [jBPM] - JBPM 4.4 and Spring Integration Problem: Session is closed

Bryan Shaw do-not-reply at jboss.com
Sat Feb 12 01:14:57 EST 2011

Bryan Shaw [http://community.jboss.org/people/silverhoof] created the discussion

"JBPM 4.4 and Spring Integration Problem: Session is closed"

To view the discussion, visit: http://community.jboss.org/message/587042#587042

I have encountered problem when I am using JBPM 4.4 with Spring 3.5 and Hibernate 3 and Struts2.
When we put multiple users to use the system, JBPM operation will randomly cause Hibernate Exception states: "Session is closed".
I have checked the JBPM + Spring integration configuration and I can't found error.
Did anybody encountered the same problem here? Please lend a hand to help me.

This is my "jbpm.tx.spring.cfg.xml"
<?xml version="1.0" encoding="UTF-8"?> 
     <jbpm-configuration spring="enabled">
            <command-service name="newTxRequiredCommandService">
              <retry-interceptor />
              <environment-interceptor policy="requiresNew" />
              <spring-transaction-interceptor transaction-manager="transactionManager" policy="requiresNew" current="false"/>

         <!-- Default command service has a Spring transaction interceptor-->
         <command-service name="txRequiredCommandService">
                <retry-interceptor />
                <environment-interceptor />
                <spring-transaction-interceptor transaction-manager="transactionManager" current="true"/>

         <transaction type="spring" />
         <hibernate-session current="true" close="false" tx="true"/>


And my jbpm-cfg.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
  <import resource="jbpm.default.cfg.xml" />
  <import resource="jbpm.tx.spring.cfg.xml" />
  <import resource="jbpm.jpdl.cfg.xml" />
  <!--<import resource="jbpm.bpmn.cfg.xml" />-->
  <import resource="jbpm.identity.cfg.xml" />
  <import resource="jbpm.businesscalendar.cfg.xml" />
  <import resource="jbpm.console.cfg.xml" />
  <import resource="jbpm.jobexecutor.cfg.xml" />
  <types resource="jbpm.variable.types.xml" />

We use OpenSessionInView filter in our web application that means every request will have its own hibernate session opened for it.
But we find that even I begin a request handling action method with a call to the JBPM task service it still may cause session is closed error.
Any idea?

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110212/30a3979c/attachment-0001.html 

More information about the jboss-user mailing list