Package com.arjuna.mw.wscf.model.twophase.api

Examples of com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager


    public void testAddSynchronization()
            throws Exception
    {
        System.out.println("Running test : " + this.getClass().getName());

        CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();

  try
  {
      cm.begin();

      cm.enlistSynchronization(new TwoPhaseSynchronization());
     
      System.out.println("Started: "+cm.identifier()+"\n");

      cm.confirm();
  }
  catch (Exception ex)
  {
        WSCFTestUtils.cleanup(cm);
        throw ex;
View Full Code Here


    public void testAddParticipant()
            throws Exception
    {
        System.out.println("Running test : " + this.getClass().getName());

        CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();

  try
  {
      cm.begin();

      cm.enlistParticipant(new TwoPhaseParticipant(null));
     
      System.out.println("Started: "+cm.identifier()+"\n");

      cm.confirm();
  }
  catch (Exception ex)
  {
      WSCFTestUtils.cleanup(cm);
        throw ex;
View Full Code Here

    public void testSuspendParticipant()
            throws Exception
    {
        System.out.println("Running test : " + this.getClass().getName());

        CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();

  try
  {
      cm.begin();

      cm.enlistParticipant(new TwoPhaseParticipant("p1"));
      cm.enlistParticipant(new TwoPhaseParticipant("p2"));
      cm.enlistSynchronization(new TwoPhaseSynchronization());

      System.out.println("Started: "+cm.identifier()+"\n");

      ActivityHierarchy hier = cm.suspend();

      System.out.println("Suspended: "+hier+"\n");

      if (cm.currentActivity() != null)
      {
            WSCF11TestUtils.cleanup(cm);

            fail("Hierarchy still active.");
      }
    cm.resume(hier);

        System.out.println("Resumed: "+hier+"\n");

    cm.confirm();
  }
  catch (Exception ex)
  {
      WSCF11TestUtils.cleanup(cm);
View Full Code Here

    public void testParticipantSynchronization()
            throws Exception
    {
        System.out.println("Running test : " + this.getClass().getName());

        CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();

  try
  {
      cm.begin();

      cm.enlistParticipant(new TwoPhaseParticipant(null));
      cm.enlistParticipant(new TwoPhaseParticipant(null));
      cm.enlistSynchronization(new TwoPhaseSynchronization());

      System.out.println("Started: "+cm.identifier()+"\n");

      cm.confirm();
  }
  catch (Exception ex)
  {
      WSCF11TestUtils.cleanup(cm);
  }
View Full Code Here

    public void testAddSynchronization()
            throws Exception
    {
        System.out.println("Running test : " + this.getClass().getName());

        CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();

  try
  {
      cm.begin();

      cm.enlistSynchronization(new TwoPhaseSynchronization());

      System.out.println("Started: "+cm.identifier()+"\n");

      cm.confirm();
  }
  catch (Exception ex)
  {
        WSCF11TestUtils.cleanup(cm);
        throw ex;
View Full Code Here

    public void testSuspendParticipant()
            throws Exception
    {
        System.out.println("Running test : " + this.getClass().getName());

        CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();

  try
  {
      cm.begin();

      cm.enlistParticipant(new TwoPhaseParticipant("p1"));
      cm.enlistParticipant(new TwoPhaseParticipant("p2"));
      cm.enlistSynchronization(new TwoPhaseSynchronization());
     
      System.out.println("Started: "+cm.identifier()+"\n");

      ActivityHierarchy hier = cm.suspend();

      System.out.println("Suspended: "+hier+"\n");

      if (cm.currentActivity() != null)
      {
            WSCFTestUtils.cleanup(cm);

            fail("Hierarchy still active.");
      }
    cm.resume(hier);
   
        System.out.println("Resumed: "+hier+"\n");

    cm.confirm();
  }
  catch (Exception ex)
  {
      WSCFTestUtils.cleanup(cm);
View Full Code Here

    public void testParticipantSynchronization()
            throws Exception
    {
        System.out.println("Running test : " + this.getClass().getName());

        CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();

  try
  {
      cm.begin();

      cm.enlistParticipant(new TwoPhaseParticipant(null));
      cm.enlistParticipant(new TwoPhaseParticipant(null));
      cm.enlistSynchronization(new TwoPhaseSynchronization());
     
      System.out.println("Started: "+cm.identifier()+"\n");

      cm.confirm();
  }
  catch (Exception ex)
  {
      WSCFTestUtils.cleanup(cm);
  }
View Full Code Here

    public void testAddParticipant()
            throws Exception
    {
        System.out.println("Running test : " + this.getClass().getName());

        CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();

  try
  {
      cm.begin();

      cm.enlistParticipant(new TwoPhaseParticipant(null));

      System.out.println("Started: "+cm.identifier()+"\n");

      cm.confirm();
  }
  catch (Exception ex)
  {
      WSCF11TestUtils.cleanup(cm);
        throw ex;
View Full Code Here

    {
  boolean passed = false;
 
  try
  {
      CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();
     
      cm.begin();

      cm.enlistParticipant(new TwoPhaseParticipant(null));
      cm.enlistParticipant(new TwoPhaseParticipant(null));
      cm.enlistSynchronization(new TwoPhaseSynchronization());
     
      System.out.println("Started: "+cm.identifier()+"\n");

      cm.confirm();

      passed = true;
  }
  catch (Exception ex)
  {
View Full Code Here

    {
  boolean passed = false;
 
  try
  {
      CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();
     
      cm.begin();

      cm.enlistSynchronization(new TwoPhaseSynchronization());
     
      System.out.println("Started: "+cm.identifier()+"\n");

      cm.confirm();

      passed = true;
  }
  catch (Exception ex)
  {
View Full Code Here

TOP

Related Classes of com.arjuna.mw.wscf.model.twophase.api.CoordinatorManager

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.