* create a participant engine to manage commit or rollback processing for the
* participant and install it in the active participants table
*/
public void activate() {
if (isParticipantCompletion) {
ParticipantCompletionParticipantEngine engine = new ParticipantCompletionParticipantEngine(id, endpoint, participant, State.STATE_COMPLETED, true);
ParticipantCompletionParticipantProcessor.getProcessor().activateParticipant(engine, getId());
engine.recovery();
} else {
BusinessAgreementWithCoordinatorCompletionParticipant coordinatorCompletionParticipant = (BusinessAgreementWithCoordinatorCompletionParticipant) participant;
CoordinatorCompletionParticipantEngine engine = new CoordinatorCompletionParticipantEngine(id, endpoint, coordinatorCompletionParticipant, State.STATE_COMPLETED, true);
CoordinatorCompletionParticipantProcessor.getProcessor().activateParticipant(engine, getId());
engine.recovery();
}
}