if(log.isDebugEnabled()) log.debug("MsgReceiver got type: " + SandeshaUtil.getMessageTypeString(rmMsgCtx.getMessageType()));
// Note that some messages (such as stand-alone acks) will be routed here, but
// the headers will already have been processed. Therefore we should not assume
// that we will have a MsgProcessor every time.
MsgProcessor msgProcessor = MsgProcessorFactory.getMessageProcessor(rmMsgCtx);
if(msgProcessor != null) {
Transaction transaction = null;
if (msgCtx.getAxisService() != null) {
Parameter unreliableParam = msgCtx.getAxisService().getParameter(SandeshaClientConstants.UNRELIABLE_MESSAGE);
if (null != unreliableParam && "true".equals(unreliableParam.getValue())) {
if (rmMsgCtx.getMessageType() == Sandesha2Constants.MessageTypes.CREATE_SEQ)
FaultManager.makeCreateSequenceRefusedFault(rmMsgCtx,
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.reliableMessagingNotEnabled, msgCtx.getAxisService().getName()),
new Exception(), null);
else
throw new AxisFault(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.reliableMessagingNotEnabled, msgCtx.getAxisService().getName()));
if (log.isDebugEnabled())
log.debug("Exit: RMMessageReceiver::invokeBusinessLogic, Service has disabled RM ");
return;
}
}
try {
ConfigurationContext context = msgCtx.getConfigurationContext();
StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context, context.getAxisConfiguration());
transaction = storageManager.getTransaction();
msgProcessor.processInMessage(rmMsgCtx, transaction);
if(transaction != null && transaction.isActive()) transaction.commit();
transaction = null;
} catch (Exception e) {