[jboss-user] [JBoss jBPM] - Re: jbpm 3.2 Session Is Closed exception in JobSession

buldoser do-not-reply at jboss.com
Thu Nov 22 16:00:47 EST 2007


Hi. 
I have the same problem. 
This is code :

public void cancelProcess(Long prId) throws RemoteException{		
  JbpmContext ctx = createBpmContext();				
  try{								
    ProcessInstance prInst = ctx.getProcessInstanceForUpdate(prId);
    prInst.end();
  }catch (Exception ex) {			
    //...
  } finally{
	ctx.close();
  }
}

 Transaction is managed outside method (for example by using Spring annotations). 
So problem is following: Session is closed in ctx.close(), transaction commited later, which causes DeleteJobsSynchronization to execute. It reasonably fails, because of closed session. 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107193#4107193

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107193



More information about the jboss-user mailing list