Package javax.transaction.xa

Examples of javax.transaction.xa.XAResource.rollback()


   {
      HornetQXAResourceWrapper.log.debug("Rollback " + connectorFactoryClassName + " xid ");
      XAResource xaResource = getDelegate();
      try
      {
         xaResource.rollback(xid);
      }
      catch (XAException e)
      {
         throw check(e);
      }
View Full Code Here


                    rs.close();
                if (stm != null)
                    stm.close();

                // rollback the global transaction
                xaRes.rollback(xid);
                // close the connection
                xaConn.close();
            } catch (Exception e) {
                // ignore the exception because it
                // would hide the original exception
View Full Code Here

        // close all the stuff
        rs.close();
        stm.close();

        // rollback the global transaction
        xaRes.rollback(xid);

        // close the connection
        xaConn.close();
    }
View Full Code Here

        xares.isSameRM(xares);
        Xid xid = xidFactory.createXid("part1", "part2");
        xares.start(xid, XAResource.TMNOFLAGS);
        receiver.receive(timeout);
        xares.end(xid, XAResource.TMSUCCESS);
        xares.rollback(xid);

        System.out.println("Done!");
    }

}
View Full Code Here

          heuristicExn = e;
          log.log(Level.FINE, e.toString(), e);
        }
      } else {
        try {
          resource.rollback(_resourceXids[i]);

          if (_timeout > 0)
            resource.setTransactionTimeout(0);
        } catch (XAException e) {
          log.log(Level.FINE, e.toString(), e);
View Full Code Here

      if ((_resourceStates[i] & RES_SHARED_RM) != 0)
        continue;

      try {
        resource.rollback(_resourceXids[i]);

        if (_timeout > 0)
          resource.setTransactionTimeout(0);
      } catch (Throwable e) {
        log.log(Level.FINE, e.toString(), e);
View Full Code Here

         // Prepare the transaction
         resource.end(xid1, XAResource.TMSUCCESS);
         resource.prepare(xid1);
        
         // Rollback
         resource.rollback(xid1);

         xid1 = new MyXid();
         resource.start(xid1, XAResource.TMNOFLAGS);
         // Receive the message using "AutoAcknowledge"
         message = subscriber.receiveNoWait();
View Full Code Here

        // 2nd global (existing)
        assertConnectionState(ResultSet.CLOSE_CURSORS_AT_COMMIT,
            Connection.TRANSACTION_REPEATABLE_READ,
            false, false, conn);
        xar.end(xid2, XAResource.TMSUCCESS);
        xar.rollback(xid2);
        // (After 2nd global rollback ) local
        assertConnectionState(ResultSet.HOLD_CURSORS_OVER_COMMIT,
            Connection.TRANSACTION_READ_UNCOMMITTED,
            true, false, conn);
View Full Code Here

        // (After 2nd global rollback ) local
        assertConnectionState(ResultSet.HOLD_CURSORS_OVER_COMMIT,
            Connection.TRANSACTION_READ_UNCOMMITTED,
            true, false, conn);

        xar.rollback(xid);
        // (After 1st global rollback) local
        assertConnectionState(ResultSet.HOLD_CURSORS_OVER_COMMIT,
            Connection.TRANSACTION_READ_UNCOMMITTED,
            true, false, conn);
        //Confirm - no connection closed event & connection error event
View Full Code Here

        }

        public void rollback(TransactionResource resource) throws DavException {
            XAResource xaRes = getXAResource(resource);
            try {
                xaRes.rollback(xid);
                removeLocalTxReferences(resource);
            } catch (XAException e) {
                throw new DavException(DavServletResponse.SC_FORBIDDEN, e.getMessage());
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.