[jboss-dev-forums] [Design of JCA on JBoss] - Re: XAExpectionUnitTestCase Failures/JBossTS/JBoss 4.2

adrian@jboss.org do-not-reply at jboss.com
Wed Jan 31 12:15:26 EST 2007


The issue came up because the old TM throws RollbackException
when resources cannot be ended, the new TM throws IllegalStateException.

This is not catered for in TxInterceptorCMT:

  | 
  |       try
  |       {
  |          // Marked rollback
  |          if (tx.getStatus() == Status.STATUS_MARKED_ROLLBACK)
  |          {
  |             tx.rollback();
  |          }
  |          else
  |          {
  |             // Commit tx
  |             // This will happen if
  |             // a) everything goes well
  |             // b) app. exception was thrown
  |             tx.commit();
  |          }
  |       }
  |       catch (RollbackException e)
  |       {
  |          throwJBossException(e, invocation.getType());
  |       }
  |       catch (HeuristicMixedException e)
  |       {
  |          throwJBossException(e, invocation.getType());
  |       }
  |       catch (HeuristicRollbackException e)
  |       {
  |          throwJBossException(e, invocation.getType());
  |       }
  |       catch (SystemException e)
  |       {
  |          throwJBossException(e, invocation.getType());
  |       }
  | 

So the EJB caller doesn't get the same exeption
"JBossTransactionRollbackException".

This needs including in the following work:
http://jira.jboss.com/jira/browse/JBAS-3633
as a general tidying up the exception handling logging
with the changed TM semantics.

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

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



More information about the jboss-dev-forums mailing list