List of usage examples for javax.transaction.xa XAException XA_RBDEADLOCK
int XA_RBDEADLOCK
To view the source code for javax.transaction.xa XAException XA_RBDEADLOCK.
Click Source Link
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 .ja v a 2 s. co 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); } }