Search in sources :

Example 1 with CoordinatorCompletionCoordinatorInboundEvents

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

the class CoordinatorCompletionCoordinatorProcessorImpl 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 CoordinatorCompletionCoordinatorInboundEvents 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 : InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)

Example 2 with CoordinatorCompletionCoordinatorInboundEvents

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

the class CoordinatorCompletionCoordinatorProcessorImpl method fail.

/**
 * Fail.
 * @param fail The fail exceptionnotification.
 * @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 CoordinatorCompletionCoordinatorInboundEvents 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 failed:", th);
            }
        }
    } else if (areRecoveryLogEntriesAccountedFor()) {
        // we can respond with a failed as the participant is not pending recovery
        if (WSTLogger.logger.isTraceEnabled()) {
            WSTLogger.logger.tracev("Failed 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 : InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)

Example 3 with CoordinatorCompletionCoordinatorInboundEvents

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

the class CoordinatorCompletionCoordinatorProcessorImpl 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 CoordinatorCompletionCoordinatorInboundEvents 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 : InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionCoordinatorInboundEvents(com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)

Example 4 with CoordinatorCompletionCoordinatorInboundEvents

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

the class CoordinatorCompletionCoordinatorProcessorImpl method status.

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

Example 5 with CoordinatorCompletionCoordinatorInboundEvents

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

the class CoordinatorCompletionCoordinatorProcessorImpl method closed.

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

Aggregations

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