Author: deepal
Date: Wed Sep 19 03:03:13 2007
New Revision: 577233
URL: http://svn.apache.org/viewvc?rev=577233&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/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java
Modified:
webservices/sandesha/trunk/java/modules/mar/module.xml
Added:
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java?rev=577233&view=auto
==============================================================================
---
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java
(added)
+++
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/MessageContextCorrectionHandler.java
Wed Sep 19 03:03:13 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/trunk/java/modules/mar/module.xml
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/mar/module.xml?rev=577233&r1=577232&r2=577233&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/mar/module.xml (original)
+++ webservices/sandesha/trunk/java/modules/mar/module.xml Wed Sep 19 03:03:13
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]