Examples of DummyTransactionParticipant


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

    }

    @Test
    public void testCheckTimeoutAborting() throws Exception {
  final Exception[] checkTimeoutException = { null };
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant() {
    public void abort(Transaction txn) {
        try {
      txn.checkTimeout();
        } catch (RuntimeException e) {
      checkTimeoutException[0] = e;
View Full Code Here

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

    }

    @Test
    public void testCheckTimeoutAbortingTimedOut() throws Exception {
  final Exception[] checkTimeoutException = { null };
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant() {
    public void abort(Transaction txn) {
        try {
      txn.checkTimeout();
        } catch (RuntimeException e) {
      checkTimeoutException[0] = e;
View Full Code Here

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

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

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

      checkTimeoutException[0] = e;
      throw e;
        }
    }
      },
      new DummyTransactionParticipant()
  };
  for (DummyTransactionParticipant participant : participants) {
      txn.join(participant);
  }
  Thread.sleep(TIMED_OUT);
View Full Code Here

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

    }

    @Test
    public void testCheckTimeoutPrepareAndCommitting() throws Exception {
  final Exception[] checkTimeoutException = { null };
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant() {
    public void prepareAndCommit(Transaction txn) {
        try {
      txn.checkTimeout();
        } catch (RuntimeException e) {
      checkTimeoutException[0] = e;
View Full Code Here

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

    @Test
    public void testCheckTimeoutPrepareAndCommittingTimedOut()
  throws Exception
    {
  final Exception[] checkTimeoutException = { null };
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant() {
    public void prepareAndCommit(Transaction txn) {
        try {
      txn.checkTimeout();
        } catch (RuntimeException e) {
      checkTimeoutException[0] = e;
View Full Code Here

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

    }

    @Test
    public void testCheckTimeoutCommitting() throws Exception {
  final Exception[] checkTimeoutException = { null };
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant() {
    public void commit(Transaction txn) {
        try {
      txn.checkTimeout();
        } catch (RuntimeException e) {
      checkTimeoutException[0] = e;
View Full Code Here

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

    }

    @Test
    public void testCheckTimeoutCommittingTimedOut() throws Exception {
  final Exception[] checkTimeoutException = { null };
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant() {
    public void commit(Transaction txn) {
        try {
      txn.checkTimeout();
        } catch (RuntimeException e) {
      checkTimeoutException[0] = e;
View Full Code Here

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

    @Test
    public void testRegisterListenerAborting() {
  final DummyTransactionListener listener =
      new DummyTransactionListener();
  final Exception[] exception = { null };
  DummyTransactionParticipant participant =
      new DummyTransactionParticipant() {
    public void abort(Transaction txn) {
        try {
      txn.registerListener(listener);
        } catch (Exception e) {
      exception[0] = e;
View Full Code Here

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

      exception[0] = e;
        }
        return super.prepare(txn);
    }
      },
      new DummyTransactionParticipant()
  };
  for (TransactionParticipant participant : participants) {
      txn.join(participant);
  }
  handle.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.