in src/org/apache/kandula/participant/ba/BAParticipantTransactionSentCoordinator.java [71:105]
public void closed(ParticipantContext context) throws AbstractKandulaException {
BACoordinatorCompletionCoordinatorServiceStub coordinatorStub;
switch (context.getStatus()) {
case (Status.BAParticipantStatus.STATUS_ACTIVE):
case (Status.BAParticipantStatus.STATUS_CANCELLING):
case (Status.BAParticipantStatus.STATUS_COMPLETING):
case (Status.BAParticipantStatus.STATUS_COMPLETED):
case (Status.BAParticipantStatus.STATUS_COMPENSATING):
case (Status.BAParticipantStatus.STATUS_FAULTING):
case (Status.BAParticipantStatus.STATUS_EXITING):
log.fatal("WS_BA : " + context.getCoordinationContext().getActivityID() + " : closed :"
+ context.getID() + " : " + " Participant is in" + context.getStatus()
+ " (invalid) state");
throw new InvalidStateException(" Participant is in" + context.getStatus()
+ " (invalid) state");
case (Status.BAParticipantStatus.STATUS_CLOSING):
case (Status.BAParticipantStatus.STATUS_ENDED):
try {
coordinatorStub = new BACoordinatorCompletionCoordinatorServiceStub(MessageContext
.getCurrentMessageContext().getConfigurationContext(), null);
coordinatorStub._getServiceClient().getOptions()
.setTo(context.getCoordinationEPR());
Closed closed = new Closed();
closed.setClosed(new NotificationType());
coordinatorStub.ClosedOperation(closed);
context.setStatus(Status.BAParticipantStatus.STATUS_ENDED);
StorageUtils.forgetContext(context.getID());
} catch (Exception e) {
log.fatal("WS_BA : " + context.getCoordinationContext().getActivityID()
+ " : closed :" + context.getID() + " : " + e);
throw new KandulaGeneralException(e);
}
break;
}
}