use of com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method soapFault.
/**
* SOAP Fault.
* @param fault The SOAP fault notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void soapFault(final SoapFault fault, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.soapFault(fault, 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 participant: {0}", new Object[] { instanceIdentifier });
}
}
use of com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method notCompleted.
/**
* Not Completed.
* @param notCompleted The not completed notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void notCompleted(final NotificationType notCompleted, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.notCompleted(notCompleted, map, arjunaContext);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from notCompleted:", th);
}
}
} else if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("NotCompleted called on unknown participant: {0}", new Object[] { instanceIdentifier });
}
}
use of com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method getStatus.
/**
* Get Status.
* @param getStatus The get status notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void getStatus(final NotificationType getStatus, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.getStatus(getStatus, map, arjunaContext);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from getStatus:", th);
}
}
} else {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("GetStatus called on unknown participant: {0}", new Object[] { instanceIdentifier });
}
// send an invalid state fault
final String messageId = MessageId.getMessageId();
final MAP faultMAP = AddressingHelper.createFaultContext(map, messageId);
try {
final SoapFault11 soapFault = new SoapFault11(SoapFaultType.FAULT_SENDER, CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_STATE_QNAME, WSTLogger.i18NLogger.get_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_getStatus_4());
CoordinatorCompletionCoordinatorClient.getClient().sendSoapFault(soapFault, null, faultMAP, getFaultAction());
} catch (final Throwable th) {
WSTLogger.i18NLogger.info_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_getStatus_3(instanceIdentifier.toString(), th);
}
}
}
use of com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method close.
/**
* Close.
* @param close The close notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void close(final NotificationType close, 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_close_3(instanceIdentifier.toString());
return;
}
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.close(close, map, arjunaContext);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from close:", th);
}
}
} else if (!recoveryManager.isParticipantRecoveryStarted()) {
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_close_4(instanceIdentifier.toString());
} else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null) {
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_close_5(instanceIdentifier.toString());
} else {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Close called on unknown participant: {0}", new Object[] { instanceIdentifier });
}
sendClosed(map, arjunaContext);
}
}
use of com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents in project narayana by jbosstm.
the class CoordinatorCompletionParticipantProcessorImpl method compensate.
/**
* Compensate.
* @param compensate The compensate notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void compensate(final NotificationType compensate, 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_compensate_3(instanceIdentifier.toString());
return;
}
final CoordinatorCompletionParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.compensate(compensate, map, arjunaContext);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception thrown from compensate:", th);
}
}
} else if (!recoveryManager.isParticipantRecoveryStarted()) {
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_compensate_4(instanceIdentifier.toString());
} else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null) {
WSTLogger.i18NLogger.warn_wst11_messaging_CoordinatorCompletionParticipantProcessorImpl_compensate_5(instanceIdentifier.toString());
} else {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Compensate called on unknown participant: {0}", new Object[] { instanceIdentifier });
}
sendCompensated(map, arjunaContext);
}
}
Aggregations