@Override public int getTransactionTimeout() throws XAException { checkXA(); try { return sessionContext.recoverSessionTimeout(); } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public Xid[] recover(final int flags) throws XAException { checkXA(); if ((flags & XAResource.TMSTARTRSCAN) == XAResource.TMSTARTRSCAN) { try { return sessionContext.xaScan(); } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } } return new Xid[0]; }
@Override public boolean setTransactionTimeout(final int seconds) throws XAException { checkXA(); try { return sessionContext.configureTransactionTimeout(seconds); } catch (Throwable t) { markRollbackOnly(); // The TM will ignore any errors from here, if things are this screwed up we mark rollbackonly // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); if (forceNotSameRM) { return false; } ClientSessionInternal other = getSessionInternalFromXAResource(xares); if (other == null) { return false; } String liveNodeId = sessionFactory.getLiveNodeId(); String otherLiveNodeId = ((ClientSessionFactoryInternal) other.getSessionFactory()).getLiveNodeId(); if (liveNodeId != null && otherLiveNodeId != null) { return liveNodeId.equals(otherLiveNodeId); } //we shouldn't get here, live node id should always be set return sessionFactory == other.getSessionFactory(); }
@Override public void forget(final Xid xid) throws XAException { checkXA(); startCall(); try { sessionContext.xaForget(xid); } catch (XAException xae) { throw xae; } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } finally { endCall(); } }
logger.trace("call commit(xid=" + convert(xid)); checkXA();
@Override public void rollback(final Xid xid) throws XAException { checkXA();
@Override public int prepare(final Xid xid) throws XAException { checkXA(); if (logger.isTraceEnabled()) { logger.trace("Calling prepare:: " + convert(xid));
@Override public int getTransactionTimeout() throws XAException { checkXA(); try { return sessionContext.recoverSessionTimeout(); } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public int getTransactionTimeout() throws XAException { checkXA(); try { return sessionContext.recoverSessionTimeout(); } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public int getTransactionTimeout() throws XAException { checkXA(); try { return sessionContext.recoverSessionTimeout(); } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public int getTransactionTimeout() throws XAException { checkXA(); try { return sessionContext.recoverSessionTimeout(); } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public int getTransactionTimeout() throws XAException { checkXA(); try { return sessionContext.recoverSessionTimeout(); } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public int getTransactionTimeout() throws XAException { checkXA(); try { return sessionContext.recoverSessionTimeout(); } catch (Throwable t) { // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public boolean setTransactionTimeout(final int seconds) throws XAException { checkXA(); try { return sessionContext.configureTransactionTimeout(seconds); } catch (Throwable t) { markRollbackOnly(); // The TM will ignore any errors from here, if things are this screwed up we mark rollbackonly // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public boolean setTransactionTimeout(final int seconds) throws XAException { checkXA(); try { return sessionContext.configureTransactionTimeout(seconds); } catch (Throwable t) { markRollbackOnly(); // The TM will ignore any errors from here, if things are this screwed up we mark rollbackonly // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public boolean setTransactionTimeout(final int seconds) throws XAException { checkXA(); try { return sessionContext.configureTransactionTimeout(seconds); } catch (Throwable t) { markRollbackOnly(); // The TM will ignore any errors from here, if things are this screwed up we mark rollbackonly // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }
@Override public boolean setTransactionTimeout(final int seconds) throws XAException { checkXA(); try { return sessionContext.configureTransactionTimeout(seconds); } catch (Throwable t) { markRollbackOnly(); // The TM will ignore any errors from here, if things are this screwed up we mark rollbackonly // This could occur if the TM interrupts the thread XAException xaException = new XAException(XAException.XAER_RMFAIL); xaException.initCause(t); throw xaException; } }