Package com.sleepycat.je

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


      /*
       * 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


       * Check start(); end(SUSPEND); end(SUCCESS).  This is a case that
       * JBoss causes to happen.  It should succeed.
       */
      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.].
View Full Code Here

       * JBoss causes to happen.  It should succeed.
       */
      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

       * Check end(SUSPEND); end(SUCCESS) [with no start() call.].
       * 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);
      }
View Full Code Here

      } else {
    xaEnv.start(xid, 0);
      }
            insertData(txn, 0, numRecs - 1, expectedData, 1, commit, NUM_DBS);
      if (!explicitTxn) {
    xaEnv.end(xid, 0);
      }

      xaEnv.prepare(xid);

      if (recover) {
View Full Code Here

          Thread.yield();
          insertData(txn1, 0, numRecs - 1, expectedData1, 1,
               true, 0, NUM_DBS);
          Thread.yield();
          if (!explicitTxn) {
        xaEnv.end(xid1, 0);
          }
          Thread.yield();
      } catch (Exception E) {
          fail("unexpected: " + E);
      }
View Full Code Here

          insertData(txn2, numRecs, numRecs << 1,
               expectedData2, 1, false, NUM_DBS,
               NUM_DBS << 1);
          Thread.yield();
          if (!explicitTxn) {
        xaEnv.end(xid2, 0);
          }
          Thread.yield();
      } catch (Exception E) {
          fail("unexpected: " + E);
      }
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.