use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method cancel.
/**
* Cancel.
* @param cancel The cancel notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void cancel(final NotificationType cancel, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
/**
* ensure the BA participant recovery manager is running
*/
XTSBARecoveryManager recoveryManager = XTSBARecoveryManager.getRecoveryManager();
if (recoveryManager == null) {
// log warning and drop this message -- it will be resent
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_cancel_3(instanceIdentifier.toString());
return;
}
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.cancel(cancel, map, arjunaContext);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from cancel:", th);
}
}
} else if (!recoveryManager.isParticipantRecoveryStarted()) {
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_cancel_4(instanceIdentifier.toString());
} else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null) {
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_cancel_5(instanceIdentifier.toString());
} else {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Cancel called on unknown participant: {0}", new Object[] { instanceIdentifier });
}
sendCancelled(map, arjunaContext);
}
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl 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 CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.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 participant: {0}", new Object[] { instanceIdentifier });
}
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method complete.
/**
* Complete.
* @param complete The complete notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void complete(final NotificationType complete, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
/**
* ensure the BA participant recovery manager is running
*/
XTSBARecoveryManager recoveryManager = XTSBARecoveryManager.getRecoveryManager();
if (recoveryManager == null) {
// log warning and drop this message -- it will be resent
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_complete_4(instanceIdentifier.toString());
return;
}
if (participant != null) {
try {
participant.complete(complete, map, arjunaContext);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from complete:", th);
}
}
} else if (!recoveryManager.isParticipantRecoveryStarted()) {
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_complete_5(instanceIdentifier.toString());
} else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null) {
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_complete_6(instanceIdentifier.toString());
} else {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Complete called on unknown participant: {0}", new Object[] { instanceIdentifier });
}
sendFail(map, arjunaContext, State.STATE_ENDED.getValue());
}
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method failed.
/**
* Failed.
* @param failed The failed notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void failed(final NotificationType failed, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.failed(failed, map, arjunaContext);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from failed ", th);
}
}
} else if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Failed called on unknown participant: {0}", instanceIdentifier);
}
}
use of com.arjuna.webservices11.wsarj.ArjunaContext in project narayana by jbosstm.
the class ParticipantCompletionCoordinatorProcessorImpl 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 ParticipantCompletionCoordinatorInboundEvents 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 });
}
}
Aggregations