You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ml...@apache.org on 2007/03/15 15:50:46 UTC

svn commit: r518646 - /webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java

Author: mlovett
Date: Thu Mar 15 07:50:45 2007
New Revision: 518646

URL: http://svn.apache.org/viewvc?view=rev&rev=518646
Log:
Make the SandeshaInHandler a no-op when RM is not enabled

Modified:
    webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java

Modified: webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java?view=diff&rev=518646&r1=518645&r2=518646
==============================================================================
--- webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java (original)
+++ webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaInHandler.java Thu Mar 15 07:50:45 2007
@@ -21,12 +21,14 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.sandesha2.MessageValidator;
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.client.SandeshaClientConstants;
 import org.apache.sandesha2.i18n.SandeshaMessageHelper;
 import org.apache.sandesha2.i18n.SandeshaMessageKeys;
 import org.apache.sandesha2.msgprocessors.AckRequestedProcessor;
@@ -75,6 +77,15 @@
 			return returnValue;
 		}
 		
+		// look at the service to see if RM is totally disabled. This allows the user to disable RM using
+		// a property on the service, even when Sandesha is engaged.
+		if (msgCtx.getAxisService() != null) {
+			Parameter unreliableParam = msgCtx.getAxisService().getParameter(SandeshaClientConstants.UNRELIABLE_MESSAGE);
+			if (null != unreliableParam && "true".equals(unreliableParam.getValue())) {
+				log.debug("Exit: SandeshaInHandler::invoke, Service has disabled RM " + returnValue);
+				return returnValue;
+			}
+		}
 		if (log.isDebugEnabled()) log.debug("SandeshaInHandler::invoke Continuing beyond basic checks");
 
 		Transaction transaction = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org