ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r577232 - in /webservices/sandesha/branches/sandesha2/java/1_3/modules: core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java mar/module.xml
Date Wed, 19 Sep 2007 10:03:07 GMT
Author: deepal
Date: Wed Sep 19 03:03:05 2007
New Revision: 577232

URL: http://svn.apache.org/viewvc?rev=577232&view=rev
Log:
when a duplicate message comes to the system Sandesha pick the message context and that some
time has a property saying addressing headers processed so we need to reset that for each
requests. otherwise Axis2 gives errors

Added:
    webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java
Modified:
    webservices/sandesha/branches/sandesha2/java/1_3/modules/mar/module.xml

Added: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java?rev=577232&view=auto
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java
(added)
+++ webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java
Wed Sep 19 03:03:05 2007
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sandesha2.handlers;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.handlers.AbstractHandler;
+
+/**
+ * This handler's only job is to to adjust a set of properties in
+ * message context when receiving duplicate messages
+ */
+public class MessageContextCorrectionHandler extends AbstractHandler {
+
+    public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
+        msgContext.setProperty("IsAddressingProcessed", Boolean.FALSE);
+        return InvocationResponse.CONTINUE;
+    }
+}

Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/mar/module.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/mar/module.xml?rev=577232&r1=577231&r2=577232&view=diff
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_3/modules/mar/module.xml (original)
+++ webservices/sandesha/branches/sandesha2/java/1_3/modules/mar/module.xml Wed Sep 19 03:03:05
2007
@@ -8,9 +8,13 @@
         <handler name="SandeshaGlobalInHandler" class="org.apache.sandesha2.handlers.SandeshaGlobalInHandler">
             <!-- Global In handler should come before addressing dispatching -->
             <order phase="Dispatch" phaseFirst="true"/>
+        </handler>
+        <handler name="MessageContextCorrectionHandler" class="org.apache.sandesha2.handlers.MessageContextCorrectionHandler">
+            <!-- A handler which handle the duplicate messages -->
+            <order phase="Transport"/>
         </handler> 
         
-       	<handler name="SequenceIDDispatcher" class="org.apache.sandesha2.handlers.SequenceIDDispatcher">
+           <handler name="SequenceIDDispatcher" class="org.apache.sandesha2.handlers.SequenceIDDispatcher">
             <order phase="Addressing" before="AddressingBasedDispatcher"  />
         </handler> 
         



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


Mime
View raw message