Search in sources :

Example 6 with ParticipantCompletionCoordinatorInboundEvents

use of com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents in project narayana by jbosstm.

the class ParticipantCompletionCoordinatorProcessorImpl method exit.

/**
 * Exit.
 * @param exit The exit notification.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void exit(final NotificationType exit, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.exit(exit, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from exit:", th);
            }
        }
    } else {
        if (WSTLogger.logger.isTraceEnabled()) {
            WSTLogger.logger.tracev("Exit called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
        }
        sendExited(map, arjunaContext);
    }
}
Also used : ParticipantCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier)

Example 7 with ParticipantCompletionCoordinatorInboundEvents

use of com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents in project narayana by jbosstm.

the class ParticipantCompletionCoordinatorProcessorImpl method compensated.

/**
 * Compensated.
 * @param compensated The compensated notification.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void compensated(final NotificationType compensated, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.compensated(compensated, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from compensated:", th);
            }
        }
    } else if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.tracev("Compensated called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
    }
}
Also used : ParticipantCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier)

Example 8 with ParticipantCompletionCoordinatorInboundEvents

use of com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents in project narayana by jbosstm.

the class ParticipantCompletionCoordinatorProcessorImpl method soapFault.

/**
 * SOAP fault.
 * @param soapFault The SOAP fault.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void soapFault(final SoapFault soapFault, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.soapFault(soapFault, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from soapFault:", th);
            }
        }
    } else if (WSTLogger.logger.isTraceEnabled()) {
        WSTLogger.logger.tracev("SoapFault called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
    }
}
Also used : ParticipantCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier)

Example 9 with ParticipantCompletionCoordinatorInboundEvents

use of com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents in project narayana by jbosstm.

the class ParticipantCompletionCoordinatorProcessorImpl method completed.

/**
 * Completed.
 * @param completed The completed notification.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void completed(final NotificationType completed, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.completed(completed, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from completed:", th);
            }
        }
    } else if (WSTLogger.logger.isTraceEnabled()) {
        if (areRecoveryLogEntriesAccountedFor()) {
            // this is a resend for a lost participant
            WSTLogger.logger.tracev("Completed called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
        } else {
            // this may be a resend for a participant still pending recovery
            WSTLogger.logger.tracev("Ignoring completed called on unidentified coordinator until recovery pass is complete: {0}", new Object[] { instanceIdentifier });
        }
    }
}
Also used : ParticipantCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier)

Example 10 with ParticipantCompletionCoordinatorInboundEvents

use of com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents in project narayana by jbosstm.

the class ParticipantCompletionCoordinatorProcessorImpl method fail.

/**
 * Fail.
 * @param fail The fail notification.
 * @param map The addressing context.
 * @param arjunaContext The arjuna context.
 */
public void fail(final ExceptionType fail, final MAP map, final ArjunaContext arjunaContext) {
    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
    final ParticipantCompletionCoordinatorInboundEvents coordinator = getCoordinator(instanceIdentifier);
    if (coordinator != null) {
        try {
            coordinator.fail(fail, map, arjunaContext);
        } catch (final Throwable th) {
            if (WSTLogger.logger.isTraceEnabled()) {
                WSTLogger.logger.tracev("Unexpected exception thrown from fail:", th);
            }
        }
    } else if (areRecoveryLogEntriesAccountedFor()) {
        // we can respond with a failed as the participant is not pending recovery
        if (WSTLogger.logger.isTraceEnabled()) {
            WSTLogger.logger.tracev("Fail called on unknown coordinator: {0}", new Object[] { instanceIdentifier });
        }
        sendFailed(map, arjunaContext);
    } else {
        // we must delay responding until we can be sure there is no participant pending recovery
        if (WSTLogger.logger.isTraceEnabled()) {
            WSTLogger.logger.tracev("Ignoring fail called on unidentified coordinator until recovery pass is complete: {0}", new Object[] { instanceIdentifier });
        }
    }
}
Also used : ParticipantCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier)

Aggregations

InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)10 ParticipantCompletionCoordinatorInboundEvents (com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents)10 SoapFault11 (com.arjuna.webservices11.SoapFault11)1 MAP (org.jboss.ws.api.addressing.MAP)1