Examples of CoordinatorManager


Examples of com.arjuna.mw.wscf.model.as.CoordinatorManager

     
      doc.appendChild(root);

      System.out.println(com.arjuna.mw.wscf.utils.DomUtil.nodeAsString(doc));

      CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();
     
      cm.addParticipant(new DemoParticipant(), Priorities.PARTICIPANT, null);
     
      Outcome res = ua.end();

      if (res instanceof CoordinationOutcome)
      {
View Full Code Here

Examples of com.arjuna.mw.wscf.model.as.CoordinatorManager

      {
    for (int i = 0; i < contexts.length; i++)
        System.out.println(contexts[i]);
      }

      CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager();
     
      cm.addParticipant(new DemoParticipant(), Priorities.PARTICIPANT, null);

      Outcome res = ua.end();

      if (res instanceof CoordinationOutcome)
      {
View Full Code Here

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

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

    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

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

    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

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

    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

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)
  {
        WSCF11TestUtils.cleanup(cm);
        throw ex;
View Full Code Here

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

    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

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

    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

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

    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
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.