[jboss-user] [JBoss jBPM] - CommandExecuter thread and CMT

Olivier_Debels do-not-reply at jboss.com
Mon Aug 14 09:05:51 EDT 2006


Hello,

I'm currently using Jbpm 3.1.1 with CMT configured (by setting 'isTransactionEnabled' to false in my jbpm.cfg.xml).

Whenever an exception occurs in the command executer thread,  I get the exception: "setRollbackOnly was invoked while configuration specifies user managed transactions".

The reason for this is that in the commandExecuterThread any error is catched by:


  | ...
  | } catch (Throwable t) {
  |       // rollback the transaction
  |       log.debug("command '"+message+"' threw exception. rolling back transaction", t);
  | jbpmContext.setRollbackOnly();
  | ...
  | 

And when the context is closed afterwards (jbpmContext.close()), all services will be closed.  Looking at the DbPersistenceServiceProvider code this results in:


  | public void close() {
  |     if ( (session!=null)
  |          && (transaction==null)
  |          && (isRollbackOnly)
  |        ) {
  |       throw new JbpmException("setRollbackOnly was invoked while configuration specifies user managed transactions");
  |     }
  | ...
  | 

Since we have no transaction (we configured it this way) and the isRollbackOnly is true (set by previous code) we get this exception.

So I seems like the command executor thread is not behaving well when working in a CMT.


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

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



More information about the jboss-user mailing list