private XAException toXAException(JMSException e) {
if (e.getCause() != null && e.getCause() instanceof XAException) {
XAException original = (XAException)e.getCause();
XAException xae = new XAException(original.getMessage());
xae.errorCode = original.errorCode;
xae.initCause(original);
return xae;
}
XAException xae = new XAException(e.getMessage());
xae.errorCode = XAException.XAER_RMFAIL;