in src/org/apache/kandula/participant/ba/BAParticipantTransactionCoordinator.java [19:65]
public void complete(ParticipantContext context) throws AbstractKandulaException {
BAParticipantTransactionSentCoordinator sentCoordinator;
switch (context.getStatus()) {
case (Status.BAParticipantStatus.STATUS_ACTIVE):
KandulaBusinessActivityResource resource = (KandulaBusinessActivityResource) context
.getResource();
context.setStatus(Status.BAParticipantStatus.STATUS_COMPLETING);
resource.complete();
sentCoordinator = new BAParticipantTransactionSentCoordinator();
sentCoordinator.completed(context);
break;
case (Status.BAParticipantStatus.STATUS_COMPLETED):
sentCoordinator = new BAParticipantTransactionSentCoordinator();
sentCoordinator.completed(context);
break;
case (Status.BAParticipantStatus.STATUS_WORK_DONE):
context.setStatus(Status.BAParticipantStatus.STATUS_COMPLETING);
sentCoordinator = new BAParticipantTransactionSentCoordinator();
sentCoordinator.completed(context);
break;
case (Status.BAParticipantStatus.STATUS_CANCELLING):
case (Status.BAParticipantStatus.STATUS_COMPLETING):
case (Status.BAParticipantStatus.STATUS_CLOSING):
case (Status.BAParticipantStatus.STATUS_COMPENSATING):
case (Status.BAParticipantStatus.STATUS_FAULTING_COMPENSATING):
case (Status.BAParticipantStatus.STATUS_ENDED):
break;
case (Status.BAParticipantStatus.STATUS_FAULTING_ACTIVE):
case (Status.BAParticipantStatus.STATUS_FAULTING_COMPLETED):
// TODO resend fault
// try{
// CCPStub = new BACoordinatorCompletionParticipantServiceStub();
// Failed failed= new Failed();
// CCPStub.FailedOperation(failed);
// context.setStatus(Status.BAParticipantStatus.STATUS_FAULTING_ACTIVE_COMPLETED);
// }catch(Exception e){
//
// }
break;
case (Status.BAParticipantStatus.STATUS_EXITING):
sentCoordinator = new BAParticipantTransactionSentCoordinator();
sentCoordinator.exit(context);
break;
}
}