List of usage examples for javax.transaction.xa XAException getMessage
public String getMessage()
From source file:org.nuxeo.ecm.core.storage.sql.Mapper.java
/** * ----- called by {@link TransactionalSession} ----- *//* w w w.ja va2s. c o m*/ protected void start(Xid xid, int flags) throws XAException { try { xaresource.start(xid, flags); } catch (XAException e) { checkConnectionReset(e); log.error("XA error on start: " + e.getMessage()); throw e; } }
From source file:org.nuxeo.ecm.core.storage.sql.Mapper.java
protected void end(Xid xid, int flags) throws XAException { try {/*from w ww .j av a 2s .c o m*/ xaresource.end(xid, flags); } catch (XAException e) { log.error("XA error on end: " + e.getMessage()); throw e; } }
From source file:org.nuxeo.ecm.core.storage.sql.Mapper.java
protected int prepare(Xid xid) throws XAException { try {/*from w w w. ja v a 2s .c o m*/ return xaresource.prepare(xid); } catch (XAException e) { log.error("XA error on prepare: " + e.getMessage()); throw e; } }
From source file:org.nuxeo.ecm.core.storage.sql.Mapper.java
protected void commit(Xid xid, boolean onePhase) throws XAException { try {/*w ww . ja v a2 s . c o m*/ xaresource.commit(xid, onePhase); } catch (XAException e) { log.error("XA error on commit: " + e.getMessage()); throw e; } }
From source file:org.nuxeo.ecm.core.storage.sql.Mapper.java
protected void rollback(Xid xid) throws XAException { try {/*w ww . j a v a2 s . c om*/ xaresource.rollback(xid); } catch (XAException e) { log.error("XA error on rollback: " + e.getMessage()); throw e; } }
From source file:org.nuxeo.ecm.core.storage.sql.TestSQLBackend.java
protected static void rollback(Session session, Xid xid) throws XAException { XAResource xaresource = ((SessionImpl) session).getXAResource(); boolean rollback = true; try {// w ww. j a v a 2 s . c o m xaresource.end(xid, XAResource.TMFAIL); } catch (XAException e) { if (e.errorCode == XAException.XA_RBROLLBACK // Derby || e.errorCode == XAException.XA_RBDEADLOCK // Derby || e.getMessage().startsWith("XA_RBDEADLOCK") // MySQL ) { rollback = false; } else { throw e; } } if (rollback) { xaresource.rollback(xid); } }