{
connection.sendTransaction(request, false);
}
catch (JMSSecurityException security)
{
MessagingXAException xaEx = new MessagingXAException(XAException.XA_RBROLLBACK, "A security exception happend!", security);
log.error(xaEx, xaEx);
throw xaEx;
}
catch (Throwable t)
{
//Catch anything else
//We assume that any error is recoverable - and the recovery manager should retry again
//either after the network connection has been repaired (if that was the problem), or
//the server has been fixed.
//(In some cases it will not be possible to fix so the user will have to manually resolve the tx)
//Therefore we throw XA_RETRY
//Note we DO NOT throw XAER_RMFAIL or XAER_RMERR since both if these will cause the Arjuna
//tx mgr NOT to retry and the transaction will have to be resolve manually.
throw new MessagingXAException(XAException.XA_RETRY, "A Throwable was caught in sending the transaction", t);
}
}