use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class ParticipantProcessorImpl method prepare.
/**
* Prepare.
* @param prepare The prepare notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void prepare(final Notification prepare, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
final ParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.prepare(prepare, map, arjunaContext);
} catch (final Throwable th) {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_prepare_1(th);
}
} else {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_prepare_2(instanceIdentifier.toString());
sendAborted(map, arjunaContext);
}
}
use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class ParticipantProcessorImpl method rollback.
/**
* Rollback.
* @param rollback The rollback notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void rollback(final Notification rollback, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
/**
* ensure the AT participant recovery manager is running
*/
XTSATRecoveryManager recoveryManager = XTSATRecoveryManager.getRecoveryManager();
if (recoveryManager == null) {
// log warning and drop this message -- it will be resent
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_rollback_3(instanceIdentifier.toString());
}
final ParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.rollback(rollback, map, arjunaContext);
} catch (final Throwable th) {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_rollback_1(th);
}
} else if (!recoveryManager.isParticipantRecoveryStarted()) {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_rollback_4(instanceIdentifier.toString());
} else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null) {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_rollback_5(instanceIdentifier.toString());
} else {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_rollback_2(instanceIdentifier.toString());
sendAborted(map, arjunaContext);
}
}
use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class ParticipantProcessorImpl method commit.
/**
* Commit.
* @param commit The commit notification.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
public void commit(final Notification commit, final MAP map, final ArjunaContext arjunaContext) {
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
/**
* ensure the AT participant recovery manager is running
*/
XTSATRecoveryManager recoveryManager = XTSATRecoveryManager.getRecoveryManager();
if (recoveryManager == null) {
// log warning and drop this message -- it will be resent
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_commit_3(instanceIdentifier.toString());
return;
}
final ParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.commit(commit, map, arjunaContext);
} catch (final Throwable th) {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_commit_1(th);
}
} else if (!recoveryManager.isParticipantRecoveryStarted()) {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_commit_4(instanceIdentifier.toString());
} else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null) {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_commit_5(instanceIdentifier.toString());
} else {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_commit_2(instanceIdentifier.toString());
sendCommitted(map, arjunaContext);
}
}
use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class ParticipantProcessorImpl method sendAborted.
/**
* Send an aborted message.
*
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/
private void sendAborted(final MAP map, final ArjunaContext arjunaContext) {
// KEV add check for recovery
final String messageId = MessageId.getMessageId();
final MAP responseMAP = AddressingHelper.createResponseContext(map, messageId);
final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
try {
CoordinatorClient.getClient().sendAborted(null, responseMAP, instanceIdentifier);
} catch (final Throwable th) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.tracev("Unexpected exception while sending Aborted", th);
}
}
}
use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.
the class ParticipantProcessorImpl 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 ParticipantInboundEvents participant = getParticipant(instanceIdentifier);
if (participant != null) {
try {
participant.soapFault(fault, map, arjunaContext);
} catch (final Throwable th) {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_soapFault_1(th);
}
} else {
WSTLogger.i18NLogger.warn_wst11_messaging_ParticipantProcessorImpl_soapFault_2(instanceIdentifier.toString());
}
}
Aggregations