System.exit(0);
}
try
{
UserCoordinator ua = UserCoordinatorFactory.userCoordinator(implementationDoc);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
org.w3c.dom.Document doc = builder.newDocument();
org.w3c.dom.Element root = doc.createElement("TopLevel3-test");
ua.start();
System.out.println("Started: "+ua.activityName()+"\n");
DeploymentContext manager = DeploymentContextFactory.deploymentContext();
Context theContext = manager.context();
((SOAPContext)theContext).serialiseToElement(root) ;
doc.appendChild(root);
System.out.println(DomUtil.nodeAsString(doc));
CoordinatorManager cm = CoordinatorManagerFactory.coordinatorManager(implementationDoc);
// cm.addParticipant(new DemoXAParticipant(), Priorities.PARTICIPANT, null);
cm.addParticipant(new DemoXAParticipant(false), 0, null);
cm.addParticipant(new DemoXAParticipant(false), 0, null);
System.out.println("\nEnding coordination.");
ua.setCompletionStatus(Success.instance());
Outcome res = ua.end();
if (res instanceof XAOutcome)
{
XAOutcome out = (XAOutcome) res;