Author: mlovett
Date: Tue Mar 20 04:30:29 2007
New Revision: 520367
URL: http://svn.apache.org/viewvc?view=rev&rev=520367
Log:
Use the HOLD_RESPONSE property to hold the transport for sync 2-way messages
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java?view=diff&rev=520367&r1=520366&r2=520367
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
Tue Mar 20 04:30:29 2007
@@ -20,8 +20,10 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.axis2.transport.RequestResponseTransport;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.sandesha2.RMMsgContext;
@@ -136,6 +138,14 @@
}
}
+ // Server-side, when we are suspend the outbound flow
we may still be connected to an
+ // inbound transport. If we are then they don't see the
InvocationResponse that we
+ // return, so we need to set a flag on the operation
context too.
+ OperationContext opCtx = msgCtx.getOperationContext();
+ if(opCtx != null && returnValue ==
InvocationResponse.SUSPEND) {
+ if(log.isDebugEnabled()) log.debug("Setting
HOLD_RESPONSE property");
+
opCtx.setProperty(RequestResponseTransport.HOLD_RESPONSE, Boolean.TRUE);
+ }
} catch (Exception e) {
// message should not be sent in a exception situation.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]