in src/org/apache/kandula/context/impl/BAActivityContext.java [52:80]
public EndpointReference addParticipant(EndpointReference participantEPR, String protocol,
String enlistmentID) throws AbstractKandulaException {
if (enlistmentID == null) {
enlistmentID = EndpointReferenceFactory.getRandomStringOf18Characters();
}
if (Constants.WS_BA_CC.equals(protocol)) {
addCoordinatorCompletionParticipants(participantEPR, enlistmentID);
if (this.coordinationType.equals(Constants.WS_BA_ATOMIC)) {
return EndpointReferenceFactory.getInstance().getAtomicOutcomeCCCoordinatorEndpoint(
activityID, enlistmentID);
} else if (this.coordinationType.equals(Constants.WS_BA_MIXED)) {
return EndpointReferenceFactory.getInstance().getMixedOutcomeCCCoordinatorEndpoint(
activityID, enlistmentID);
}
} else if (Constants.WS_BA_PC.equals(protocol)) {
addParticipantCompletionParticipants(participantEPR, enlistmentID);
incrementCompletingParticipantCount();
if (this.coordinationType.equals(Constants.WS_BA_ATOMIC)) {
return EndpointReferenceFactory.getInstance().getAtomicOutcomePCCoordinatorEndpoint(
activityID, enlistmentID);
} else if (this.coordinationType.equals(Constants.WS_BA_MIXED)) {
return EndpointReferenceFactory.getInstance().getMixedOutcomePCCoordinatorEndpoint(
activityID, enlistmentID);
}
} else {
throw new InvalidProtocolException();
}
return null;
}