public void start(final Xid xid, final int flags) throws XAException { if (flags == TMJOIN) { // should be impossible throw Assert.unreachableCode(); } // ensure that the timeout is registered startTime = System.nanoTime(); capturedTimeout = timeout; lookup(xid); this.xid = xid; }
public void end(final Xid xid, final int flags) throws XAException { if (flags == TMSUCCESS || flags == TMFAIL) { lookup(xid).end(flags); } }
public void beforeCompletion(final Xid xid) throws XAException { if (commitToEnlistment()) lookup(xid).beforeCompletion(); }
public void forget(final Xid xid) throws XAException { if (commitToEnlistment()) lookup(xid).forget(); }
public void commit(final Xid xid, final boolean onePhase) throws XAException { try { if (commitToEnlistment()) lookup(xid).commit(onePhase); } catch (XAException | RuntimeException exception) { if (onePhase && resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw exception; } if (onePhase && resourceRegistry != null) resourceRegistry.removeResource(this); }
public void rollback(final Xid xid) throws XAException { try { if (commitToEnlistment()) lookup(xid).rollback(); } catch (XAException | RuntimeException e) { if (resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw e; } if (resourceRegistry != null) resourceRegistry.removeResource(this); }
public int prepare(final Xid xid) throws XAException { final int result; try { result = commitToEnlistment() ? lookup(xid).prepare() : XA_RDONLY; } catch (XAException | RuntimeException exception) { if (resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw exception; } if (resourceRegistry != null) resourceRegistry.removeResource(this); return result; }
public void start(final Xid xid, final int flags) throws XAException { if (flags == TMJOIN) { // should be impossible throw Assert.unreachableCode(); } // ensure that the timeout is registered startTime = System.nanoTime(); capturedTimeout = timeout; lookup(xid); this.xid = xid; }
public void start(final Xid xid, final int flags) throws XAException { if (flags == TMJOIN) { // should be impossible throw Assert.unreachableCode(); } // ensure that the timeout is registered startTime = System.nanoTime(); capturedTimeout = timeout; lookup(xid); this.xid = xid; }
public void end(final Xid xid, final int flags) throws XAException { if (flags == TMSUCCESS || flags == TMFAIL) { lookup(xid).end(flags); } }
public void end(final Xid xid, final int flags) throws XAException { if (flags == TMSUCCESS || flags == TMFAIL) { lookup(xid).end(flags); } }
public void forget(final Xid xid) throws XAException { if (commitToEnlistment()) lookup(xid).forget(); }
public void forget(final Xid xid) throws XAException { if (commitToEnlistment()) lookup(xid).forget(); }
public void beforeCompletion(final Xid xid) throws XAException { if (commitToEnlistment()) lookup(xid).beforeCompletion(); }
public void rollback(final Xid xid) throws XAException { try { if (commitToEnlistment()) lookup(xid).rollback(); } catch (XAException | RuntimeException e) { if (resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw e; } if (resourceRegistry != null) resourceRegistry.removeResource(this); }
public void commit(final Xid xid, final boolean onePhase) throws XAException { try { if (commitToEnlistment()) lookup(xid).commit(onePhase); } catch (XAException | RuntimeException exception) { if (onePhase && resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw exception; } if (onePhase && resourceRegistry != null) resourceRegistry.removeResource(this); }
public void commit(final Xid xid, final boolean onePhase) throws XAException { try { if (commitToEnlistment()) lookup(xid).commit(onePhase); } catch (XAException | RuntimeException exception) { if (onePhase && resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw exception; } if (onePhase && resourceRegistry != null) resourceRegistry.removeResource(this); }
public void rollback(final Xid xid) throws XAException { try { if (commitToEnlistment()) lookup(xid).rollback(); } catch (XAException | RuntimeException e) { if (resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw e; } if (resourceRegistry != null) resourceRegistry.removeResource(this); }
public int prepare(final Xid xid) throws XAException { final int result; try { result = commitToEnlistment() ? lookup(xid).prepare() : XA_RDONLY; } catch (XAException | RuntimeException exception) { if (resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw exception; } if (resourceRegistry != null) resourceRegistry.removeResource(this); return result; }
public int prepare(final Xid xid) throws XAException { final int result; try { result = commitToEnlistment() ? lookup(xid).prepare() : XA_RDONLY; } catch (XAException | RuntimeException exception) { if (resourceRegistry != null) resourceRegistry.resourceInDoubt(this); throw exception; } if (resourceRegistry != null) resourceRegistry.removeResource(this); return result; }