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

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


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

      cm.enlistParticipant(new TwoPhaseParticipant(null));
     
      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.enlistParticipant(new TwoPhaseParticipant(null));
      cm.enlistParticipant(new TwoPhaseParticipant(null));
      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)
      {
    System.out.println("Hierarchy still active.");

    cm.cancel();
      }
      else
      {
    System.out.println("Resumed: "+hier+"\n");
   
    cm.resume(hier);
   
    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.