@Override public void start(final Xid xid, final int i) throws XAException { delegate.start(xid, i); } }
/** * resume the current transaction by activating all the XAResources associated with the current * transaction */ public void resume() throws SystemException { XAResource xar = null; synchronized (this.resourceMap) { Iterator iterator = resourceMap.entrySet().iterator(); Map.Entry entry; Boolean isActive = Boolean.FALSE; while (iterator.hasNext()) { entry = (Map.Entry) iterator.next(); xar = (XAResource) entry.getKey(); isActive = (Boolean) entry.getValue(); if (!isActive.booleanValue()) try { xar.start(xid, XAResource.TMRESUME); entry.setValue(Boolean.TRUE); } catch (Exception e) { String exception = String.format("GlobaTransaction::resume:Resume not succesful due to %s", e); LogWriter writer = TransactionUtils.getLogWriter(); if (VERBOSE) writer.fine(exception, e); throw new SystemException(exception); } } } }
@Override public boolean enlistResource(XAResource xaRes) throws IllegalStateException, SystemException { TestXid testXid = xids.get(xaRes); if (testXid == null) { testXid = new TestXid(gtrid, bqualGenerator.incrementAndGet()); xids.put(xaRes, testXid); } try { xaRes.start(testXid, XAResource.TMNOFLAGS); } catch (XAException e) { throw (SystemException) new SystemException(XAException.XAER_RMERR).initCause(e); } return true; }
/** * Starts the resource. */ @Override public void start(Xid xid, int flags) throws XAException { _xaResource.start(xid, flags); }
public void start(Xid xid, int flags) throws XAException { try { resource.start(xid, flags); } catch (XAException e) { throw getXAException(e); } }
/** * {@inheritDoc} */ public void start(Xid xid, int flags) throws XAException { if (pad) xid = convertXid(xid); xaResource.start(xid, flags); }
/** * Delegates XAResource#start call to the connected JMS resource. * * @param xid * @param flag * @throws XAException */ @Override public void start(Xid xid, int flag) throws XAException { connectionManager.connectAndAccept(delegate -> delegate.start(xid, flag)); }
/** * Delegates XAResource#start call to the connected JMS resource. * * @param xid * @param flag * @throws XAException */ @Override public void start(Xid xid, int flag) throws XAException { connectionManager.connectAndAccept(delegate -> delegate.start(xid, flag)); }
@Override public void start(Xid xid, int i) throws XAException { xaResource.start(xid, i); } }
public void start(Xid xid, int flags) throws XAException { if (log.isTraceEnabled()) { log.trace("Start called on XAResource " + getName() + "\n Xid: " + xid + "\n flags:" + decodeFlags(flags)); } xaResource.start(xid, flags); } private String decodeFlags(int flags) {
public void start(Xid xid, int flags) throws XAException { managedConnection.lock(); try { xaResource.start(xid, flags); } finally { managedConnection.unlock(); } }
public void start(Xid xid, int flags) throws XAException { XAResource xaResource = getDelegate(); try { xaResource.start(xid, flags); } catch (XAException e) { throw check(e); } }
public void start(Xid xid, int flags) throws XAException { managedConnection.lock(); try { xaResource.start(xid, flags); } finally { managedConnection.unlock(); } }
public void StartStatement(ij parser, int flag, int xid) throws SQLException { try { currentXAConnection.getXAResource().start(makeXid(xid), flag); } catch(Throwable t) { handleException(t); } }
public void start(Xid xid, int flags) throws XAException { print("XAResource.start: " + xidToString(xid) + "," + flagToString(flags)); res.start(xid, flags); }
/** * {@inheritDoc} */ @Override public void begin() throws ResourceException { try { this.xid = new XidImpl(intToByteArray(globalCounter.getAndIncrement())); resource.start(xid, XAResource.TMNOFLAGS); } catch (XAException e) { throw new ResourceException(e.getMessage()); } }
@Override public void start(final Xid xid, final int flags) throws XAException { XAResource xaResource = getDelegate(false); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { ActiveMQXARecoveryLogger.LOGGER.debug("start " + xaResource + " xid "); } try { xaResource.start(xid, flags); } catch (XAException e) { throw check(e); } }
@Override public void beforeDelivery(Method method) throws NoSuchMethodException, ResourceException { super.beforeDelivery(method); try { xaResource.start(xid, XAResource.TMNOFLAGS); } catch (XAException e) { throw new ResourceException(e.getMessage(), e); } }
@Test public void testXASimple() throws Exception { XAConnection connection = xaFactory.createXAConnection(); Collection<Session> sessions = new LinkedList<>(); for (int i = 0; i < 10; i++) { XASession session = connection.createXASession(); session.getXAResource().start(newXID(), XAResource.TMNOFLAGS); sessions.add(session); } connection.close(); }