Package com.arjuna.mw.wst11

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


                    .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] committing Atomic Transaction (This will cause the AT to complete successfully)");
            ut.commit();

            out.write("<p><i>Go to your WildFly console or Server log to see the result of the transaction</i></p>");

        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here


                    .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] committing Atomic Transaction (This will cause the AT to complete successfully)");
            ut.commit();

            // Check the booking is visible after the transaction has committed.
            Assert.assertEquals(1, 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] committing Atomic Transaction (This will cause the AT to complete successfully)");
            ut.commit();

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

        final TransactionalService transactionalService = TransactionalClient.newInstance(deploymentUrl);
        final UserTransaction userTransaction = UserTransaction.getUserTransaction();

        userTransaction.begin();
        final boolean isTransactionActive = transactionalService.isTransactionActive();
        userTransaction.commit();

        Assert.assertEquals(true, isTransactionActive);
    }

    private String getDeploymentUrl() {
View Full Code Here

                    .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] committing Atomic Transaction (This will cause the AT to complete successfully)");
            ut.commit();

            out.write("<p><b>Transaction succeeded!</b></p>");

        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

                    .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] committing Atomic Transaction (This will cause the AT to complete successfully)");
            ut.commit();

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

        } finally {
View Full Code Here

            taxiAT.bookTaxi();
        }

        System.out.println("CLIENT: calling commit on the transaction...");

        ut.commit();

        System.out.println("done.");
        System.out.flush();
    }
View Full Code Here

        }

        // now commit the transaction

        try {
            tx.commit();
        } catch (TransactionRolledBackException e) {
            exception = e;
        } catch (UnknownTransactionException e) {
            exception = e;
        } catch (SystemException e) {
View Full Code Here

        }

        // now commit the transaction

        try {
            tx.commit();
        } catch (TransactionRolledBackException e) {
            exception = e;
        } catch (UnknownTransactionException e) {
            exception = e;
        } catch (SystemException e) {
View Full Code Here

        }

        // now commit the transaction

        try {
            tx.commit();
        } catch (TransactionRolledBackException e) {
            exception = e;
        } catch (UnknownTransactionException e) {
            exception = e;
        } catch (SystemException 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.