You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2007/08/22 20:01:16 UTC
svn commit: r568716 - in
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2:
context/OperationContext.java engine/AxisEngine.java
Author: scheu
Date: Wed Aug 22 11:01:15 2007
New Revision: 568716
URL: http://svn.apache.org/viewvc?rev=568716&view=rev
Log:
AXIS2-3132
Contributor:Ming Cheung
Remove the incoming message context during InvocationResponse.ABORT processing.
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java?rev=568716&r1=568715&r2=568716&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java Wed Aug 22 11:01:15 2007
@@ -272,6 +272,24 @@
}
+ /**
+ * Remove the indicated message context.
+ * Example Usage: The exchange is aborted and we need to
+ * undo the work and free resources.
+ * @param label
+ * @throws AxisFault
+ */
+ public void removeMessageContext(String label) throws AxisFault {
+
+ MessageContext mc = getMessageContext(label);
+ if (mc != null) {
+ messageContexts.remove(mc);
+ setComplete(false);
+ touch();
+ }
+ }
+
+
public HashMap getMessageContexts() {
return messageContexts;
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?rev=568716&r1=568715&r2=568716&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java Wed Aug 22 11:01:15 2007
@@ -30,12 +30,14 @@
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.WSDL2Constants;
import org.apache.axis2.engine.Handler.InvocationResponse;
import org.apache.axis2.i18n.Messages;
import org.apache.axis2.transport.TransportSender;
import org.apache.axis2.util.CallbackReceiver;
import org.apache.axis2.util.LoggingControl;
import org.apache.axis2.util.MessageContextBuilder;
+import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -149,6 +151,20 @@
return pi;
} else if (pi.equals(InvocationResponse.ABORT)) {
flowComplete(msgContext);
+ // Undo any partial work.
+ // Remove the incoming message context
+ if (log.isDebugEnabled()) {
+ log.debug("InvocationResponse is aborted. " +
+ "The incoming MessageContext is removed, " +
+ "and the OperationContext is marked as incomplete");
+ }
+ String mepURI = msgContext.getAxisOperation().getMessageExchangePattern();
+ if (WSDL2Constants.MEP_URI_OUT_IN.equals(mepURI)) {
+ OperationContext opCtx = msgContext.getOperationContext();
+ if (opCtx != null) {
+ opCtx.removeMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+ }
+ }
return pi;
} else {
String errorMsg =
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org