Package com.arjuna.mw.wst11

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


        System.out.println("[CLIENT] Creating a new WS-AT User Transaction");
        UserTransaction ut = UserTransactionFactory.userTransaction();
        try {
            System.out
                    .println("[CLIENT] Beginning Atomic Transaction (All calls to Web services that support WS-AT wil be included in this transaction)");
            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();
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


        // start the transaction

        try {
            tx.begin();
        } catch (WrongStateException e) {
            exception = e;
        } catch (SystemException e) {
            exception = e;
        }
View Full Code Here


        // start the transaction

        try {
            tx.begin();
        } catch (WrongStateException e) {
            exception = e;
        } catch (SystemException e) {
            exception = e;
        }
View Full Code Here

        UserTransaction tx = UserTransactionFactory.userTransaction();

        // start the transaction

        try {
            tx.begin();
        } catch (WrongStateException e) {
            exception = e;
        } catch (SystemException e) {
            exception = e;
        }
View Full Code Here

        UserTransaction tx = UserTransactionFactory.userTransaction();

        // start the transaction

        try {
            tx.begin();
        } catch (WrongStateException e) {
            exception = e;
        } catch (SystemException e) {
            exception = e;
        }
View Full Code Here

    {
      UserTransaction ut = UserTransaction.getUserTransaction();
      TransactionManager tm = TransactionManager.getTransactionManager();
      DemoDurableParticipant p = new DemoDurableParticipant();

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

            throws Exception
    {
      UserTransaction ut = UserTransaction.getUserTransaction();
      TransactionManager tm = TransactionManager.getTransactionManager();

      ut.begin();

      TxContext ctx = tm.suspend();

      System.out.println("Suspended: "+ctx);
    }
View Full Code Here

  {
      TransactionManager tm = TransactionManager.getTransactionManager();
      FailureParticipant p1 = new FailureParticipant(FailureParticipant.FAIL_IN_PREPARE, FailureParticipant.WRONG_STATE);
      DemoDurableParticipant p2 = new DemoDurableParticipant();

      ut.begin();

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

    public static void testPrintTransaction()
            throws Exception
    {
      UserTransaction ut = UserTransaction.getUserTransaction();

      ut.begin();

      System.out.println("Started: "+ut);

      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.