Package javax.transaction.xa

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


                        {
                            resourceManager.commit(key, true);
                        }
                        else
                        {
                            resourceManager.rollback(key);
                        }
                    }
                    catch (Throwable e)
                    {
                        if (failures == null)
View Full Code Here


                    {
                        Xid key = branchKeys.next();
                        XAResource resourceManager = branches.get(key);
                        try
                        {
                            resourceManager.rollback(key);
                        }
                        catch (Throwable e)
                        {
                            NucleusLogger.TRANSACTION.error(LOCALISER.msg("015038", "rollback", resourceManager,
                                getXAErrorCode(e), toString()));                       
View Full Code Here

            {
                Xid xid = (Xid) branchKeys.next();
                XAResource resourceManager = branches.get(xid);
                try
                {
                    resourceManager.rollback(xid);
                }
                catch (Throwable e)
                {
                    if (failures == null)
                    {
View Full Code Here

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

    xaRes.start(xidMock, XAResource.TMNOFLAGS);
    xaResControl.setMatcher(MockControl.ALWAYS_MATCHER);
    xaRes.end(xidMock, XAResource.TMFAIL);
    xaResControl.setMatcher(MockControl.ALWAYS_MATCHER);
    xaRes.rollback(xidMock);
    xaResControl.setMatcher(MockControl.ALWAYS_MATCHER);

    sfControl.replay();
    sessionControl.replay();
    xaResControl.replay();
View Full Code Here

    xaRes.start(xidMock, XAResource.TMNOFLAGS);
    xaResControl.setMatcher(MockControl.ALWAYS_MATCHER);
    xaRes.end(xidMock, XAResource.TMFAIL);
    xaResControl.setMatcher(MockControl.ALWAYS_MATCHER);
    xaRes.rollback(xidMock);
    xaResControl.setMatcher(MockControl.ALWAYS_MATCHER);

    sfControl.replay();
    sessionControl.replay();
    xaResControl.replay();
View Full Code Here

                Xid xid = recoveredStart[i];
                if (xid.getFormatId() == 1) {
                    // commit 1 with 2pc
                    xar.commit(xid, false);
                } else if (xid.getFormatId() == 2) {
                    xar.rollback(xid);
                } else {
                    System.out.println("FAIL: unknown xact");
                }
            }
View Full Code Here

            } catch (XAException e) {
                if (e.errorCode != XAException.XAER_NOTA)
                    throw e;
            }
            try {
                xar.rollback(xid11);
            } catch (XAException e) {
                if (e.errorCode != XAException.XAER_NOTA)
                    throw e;
            }
            try {
View Full Code Here

             xa_end xa_success 2;
             xa_rollback 2;
             */
            xar.commit(xid, false);
            xar.end(xid2, XAResource.TMSUCCESS);
            xar.rollback(xid2);

            XATestUtil.showXATransactionView(conn);
            rs = s.executeQuery("select * from APP.foo where A >= 2000");
            JDBCDisplayUtil.DisplayResults(System.out, rs, conn);
            rs.close();
View Full Code Here

                xar.end(xid3, XAResource.TMFAIL);
            } catch (XAException e) {
                if (e.errorCode != XAException.XA_RBROLLBACK)
                    throw e;
            }
            xar.rollback(xid3);

            conn = xac.getConnection();
            s = conn.createStatement();
            rs = s.executeQuery("select * from APP.foo where A >= 2000");
            JDBCDisplayUtil.DisplayResults(System.out, rs, conn);
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.