Package com.sleepycat.je

Examples of com.sleepycat.je.XAEnvironment.commit()


      assertTrue(sawXid1 && sawXid2);

      xaEnv2 = (XAEnvironment) env;
      Transaction recoveryXATxn1 = xaEnv2.getXATransaction(xid1);
      Transaction recoveryXATxn2 = xaEnv2.getXATransaction(xid2);
      xaEnv2.commit(xid1, false);
      xaEnv2.rollback(xid2);
      verifyData(expectedData1, false, 0, NUM_DBS);
      verifyData(expectedData2, false, NUM_DBS, NUM_DBS << 1);
      forceCloseEnvOnly();
      xaRecoverOnly(NUM_DBS);
View Full Code Here


       */
      try {
    xid = new XidImpl(1, "TwoPCTest6".getBytes(), null);
    xaEnv.start(xid, XAResource.TMNOFLAGS);
    xaEnv.end(xid, XAResource.TMFAIL);
    xaEnv.commit(xid, false);
      } catch (XAException XAE) {
    /* Expect this. */
    assertTrue(XAE.errorCode == XAException.XA_RBROLLBACK);
      }
      xaEnv.rollback(xid);
View Full Code Here

       * Check TMSUCCESS.
       */
      xid = new XidImpl(1, "TwoPCTest6".getBytes(), null);
      xaEnv.start(xid, XAResource.TMNOFLAGS);
      xaEnv.end(xid, XAResource.TMSUCCESS);
      xaEnv.commit(xid, false);

      /*
       * Check start(); end(SUSPEND); end(SUCCESS).  This is a case that
       * JBoss causes to happen.  It should succeed.
       */
 
View Full Code Here

       */
      xid = new XidImpl(1, "TwoPCTest7".getBytes(), null);
      xaEnv.start(xid, XAResource.TMNOFLAGS);
      xaEnv.end(xid, XAResource.TMSUSPEND);
      xaEnv.end(xid, XAResource.TMSUCCESS);
      xaEnv.commit(xid, false);

      /*
       * Check end(SUSPEND); end(SUCCESS) [with no start() call.].
       * This should fail.
       */
 
View Full Code Here

       * This should fail.
       */
      try {
    xid = new XidImpl(1, "TwoPCTest8".getBytes(), null);
    xaEnv.end(xid, XAResource.TMFAIL);
    xaEnv.commit(xid, false);
      } catch (XAException XAE) {
    /* Expect this. */
    assertTrue(XAE.errorCode == XAException.XAER_NOTA);
      }
  } catch (Throwable t) {
View Full Code Here

    xaRecoverOnly(NUM_DBS);
    xaEnv = (XAEnvironment) env;
      }

      if (commit) {
    xaEnv.commit(xid, false);
      } else {
    xaEnv.rollback(xid);
      }

      if (recover) {
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.