Package com.arjuna.mw.wst

Examples of com.arjuna.mw.wst.UserTransaction.begin()


    {
  try
  {
      UserTransaction ut = UserTransaction.getUserTransaction();
 
      ut.begin();

      System.out.println("Thread "+Thread.currentThread()+" started "+ut);

      Thread.yield();
     
View Full Code Here


        UserTransaction ut = UserTransactionFactory.userTransaction();

        System.out.println("CLIENT: starting the transaction...");

        ut.begin();

        System.out.println("CLIENT: transaction ID= " + ut.toString());

        System.out.println("CLIENT: calling business Web Services...");
View Full Code Here

        ut.begin();
        final TxContext tx = tm.suspend();
        tm.resume(tx);
        tm.enlistForDurableTwoPhase(p1, p1.identifier());
        tm.enlistForVolatileTwoPhase(p2, p2.identifier());
        ust.begin();
        final TxContext stx = tm.suspend();
        tm.resume(stx);
        tm.enlistForDurableTwoPhase(p3, "failure in prepare");
        tm.enlistForVolatileTwoPhase(p4, p4.identifier());
View Full Code Here

      DemoDurableParticipant p3 = new DemoDurableParticipant();
      DemoDurableParticipant p4 = new DemoDurableParticipant();

      System.out.println("Starting first transaction.\n");
     
      ut.begin();
    try {
      tm.enlistForDurableTwoPhase(p1, p1.identifier());
      tm.enlistForDurableTwoPhase(p2, p2.identifier());
      tm.enlistForDurableTwoPhase(p3, p3.identifier());
      tm.enlistForDurableTwoPhase(p4, p4.identifier());
View Full Code Here

      TxContext ctx = tm.suspend();
     
      System.out.println("Suspended: "+ctx);

      ut.begin();
     
      System.out.println("\nStarted second transaction.");
     
      tm.resume(ctx);
     
View Full Code Here

  try
  {

      // nesting not supported, so each is a separate top-level tx.

      ut.begin();
     
      ut.begin();
     
      ut.commit();
View Full Code Here

      // nesting not supported, so each is a separate top-level tx.

      ut.begin();
     
      ut.begin();
     
      ut.commit();

      ut.commit();
View Full Code Here

  {
      TransactionManager tm = TransactionManager.getTransactionManager();
      FailureParticipant p1 = new FailureParticipant(FailureParticipant.FAIL_IN_PREPARE, FailureParticipant.NONE);
      DemoDurableParticipant p2 = new DemoDurableParticipant();
     
      ut.begin();
     
      tm.enlistForDurableTwoPhase(p1, "failure");
      tm.enlistForDurableTwoPhase(p2, p2.identifier());
    catch (Exception eouter) {
        try {
View Full Code Here

        ut.begin();
        final TxContext tx = tm.suspend();
        tm.resume(tx);
        tm.enlistForDurableTwoPhase(p1, p1.identifier());
        tm.enlistForVolatileTwoPhase(p2, p2.identifier());
        ust.begin();
        final TxContext stx = tm.suspend();
        tm.resume(stx);
        tm.enlistForDurableTwoPhase(p3, "failure in prepare");
        tm.enlistForVolatileTwoPhase(p4, p4.identifier());
View Full Code Here

    public static void testNullRollbackTransaction()
            throws Exception
    {
      UserTransaction ut = UserTransaction.getUserTransaction();
 
      ut.begin();
     
      ut.rollback();
    }
}
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.