Examples of DummyTransactionParticipant


Examples of com.sun.sgs.test.util.DummyTransactionParticipant

    @Test
    public void testRegisterListenerPrepareAndCommitting() throws Exception {
  final DummyTransactionListener listener =
      new DummyTransactionListener();
  final Exception[] exception = { null };
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant() {
    public void prepareAndCommit(Transaction txn)
        throws Exception
    {
        try {
      txn.registerListener(listener);
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionParticipant

      exception[0] = e;
        }
        super.commit(txn);
    }
      },
      new DummyTransactionParticipant()
  };
  for (TransactionParticipant participant : participants) {
      txn.join(participant);
  }
  handle.commit();
View Full Code Here

Examples of com.sun.sgs.test.util.DummyTransactionParticipant

    void assertCommitted() {
  assertFalse(txn.isAborted());
  assertEquals(null, txn.getAbortCause());
  try {
      handle.getTransaction().join(new DummyTransactionParticipant());
      fail("Transaction was active");
  } catch (IllegalStateException e) {
  } catch (RuntimeException e) {
      fail("Unexpected exception: " + 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.