ApplicationException ae = TxUtil.getApplicationException(t.getClass(), invocation);
if (ae != null)
{
if (ae.rollback()) setRollbackOnly(tx);
throw t;
}
if (!(t instanceof RuntimeException || t instanceof RemoteException))
{
throw t;
}
setRollbackOnly(tx);
// its either a RuntimeException or RemoteException
if (t instanceof EJBTransactionRolledbackException)
throw t;
else
throw new EJBTransactionRolledbackException(t.getMessage(), (Exception) t);