Package com.sun.sgs.test.util

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


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

    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

Related Classes of com.sun.sgs.test.util.DummyTransactionParticipant

Copyright © 2018 www.massapicom. 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.