Package com.arjuna.mw.wst11

Examples of com.arjuna.mw.wst11.UserTransaction.rollback()


            ut.begin();
            System.out.println("[CLIENT] invoking makeBooking() on WS");
            client.makeBooking();
            System.out
                    .println("[CLIENT] rolling back Atomic Transaction (This will cause the AT and thus the enlisted back-end resources to rollback)");
            ut.rollback();

            // Check the booking is visible after the transaction has committed.
            Assert.assertEquals(0, client.getBookingCount());

        } finally {
View Full Code Here


            log.info("[CLIENT] Beginning Atomic Transaction (All calls to Web services that support WS-AT wil be included in this transaction)");
            ut.begin();
            log.info("[CLIENT] invoking makeBooking() on WS");
            client.makeBooking();
            log.info("[CLIENT] rolling back Atomic Transaction (This will cause the AT and thus the enlisted back-end resources to rollback)");
            ut.rollback();

            // Check the booking is visible after the transaction has committed.
            Assert.assertEquals("Rollback on the Durable2PC participant has not been invoked.", 0, client.getBookingCount());
            Assert.assertFalse("Commit on the Volatile2PC participant has been invoked.", client.wasVolatileCommit());
            Assert.assertTrue("Rollback on the Volatile2PC participant has not been invoked.", client.wasVolatileRollback());
View Full Code Here

        }
       
        if (ServiceCommand.isPresent(ROLLBACK_ONLY, serviceCommands)) {
            log.info("Intentionally the service settings transaction to rollback only - service command was set to: " + ROLLBACK_ONLY);
            try {
                userTransaction.rollback();
            } catch (Exception e) {
                throw new RuntimeException("The rollback is not possible", e);
            }
        }
View Full Code Here

            ut.begin();
            System.out.println("[CLIENT] invoking makeBooking() on WS");
            client.makeBooking();
            System.out
                    .println("[CLIENT] rolling back Atomic Transaction (This will cause the AT and thus the enlisted back-end resources to rollback)");
            ut.rollback();

            // Check the booking is visible after the transaction has committed.
            Assert.assertEquals(0, client.getBookingCount());

        } finally {
View Full Code Here

      ut.begin();
      try {
      tm.enlistForDurableTwoPhase(p, p.identifier());
        catch (Exception eouter) {
            try {
                ut.rollback();
            } catch(Exception einner) {
            }
            throw eouter;
        }
View Full Code Here

      tm.enlistForDurableTwoPhase(p1, "failure");
      tm.enlistForDurableTwoPhase(p2, p2.identifier());
    } catch (Exception eouter) {
        try {
            ut.rollback();
        } catch(Exception einner) {
        }
        throw eouter;
    }
  try {
View Full Code Here

      try {
      tm.enlistForDurableTwoPhase(p1, "failure");
      tm.enlistForDurableTwoPhase(p2, p2.identifier());
        catch (Exception eouter) {
            try {
                ut.rollback();
            } catch(Exception einner) {
            }
            throw eouter;
        }
View Full Code Here

            } catch(Exception einner) {
            }
            throw eouter;
        }

      ut.rollback();
    }
}
View Full Code Here

      tm.enlistForDurableTwoPhase(p2, p2.identifier());
      tm.enlistForDurableTwoPhase(p3, p3.identifier());
      tm.enlistForDurableTwoPhase(p4, p4.identifier());
        catch (Exception eouter) {
            try {
                ut.rollback();
            } catch(Exception einner) {
            }
            throw eouter;
        }
View Full Code Here

      tm.resume(ctx);

      System.out.println("\nCommitting first transaction.\n");
    catch (Exception eouter) {
        try {
            ut.rollback();
        } catch(Exception einner) {
        }
        throw eouter;
    }
      ut.commit();
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.