ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatf...@apache.org
Subject svn commit: r575313 - /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
Date Thu, 13 Sep 2007 13:43:49 GMT
Author: gatfora
Date: Thu Sep 13 06:43:49 2007
New Revision: 575313

URL: http://svn.apache.org/viewvc?rev=575313&view=rev
Log:
Ensure that 1-way LastMessages ack the message to ensure that the transport gets closed.

Modified:
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java?rev=575313&r1=575312&r2=575313&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
Thu Sep 13 06:43:49 2007
@@ -30,6 +30,7 @@
 import org.apache.axis2.engine.Handler.InvocationResponse;
 import org.apache.axis2.transport.RequestResponseTransport;
 import org.apache.axis2.transport.TransportUtils;
+import org.apache.axis2.transport.RequestResponseTransport.RequestResponseTransportStatus;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -332,6 +333,8 @@
 		boolean sendAck = false;
 		
 		boolean ackBackChannel = SpecSpecificConstants.sendAckInBackChannel (rmMsgCtx.getMessageType());
+		// If we are processing an inOnly message we must ack the back channel otherwise the connection
stays open
+		if (!ackBackChannel && mep == WSDLConstants.MEP_CONSTANT_IN_ONLY) ackBackChannel
= true;
 		EndpointReference acksTo = new EndpointReference (bean.getAcksToEPR());
 		if (acksTo.hasAnonymousAddress() && backchannelFree && ackBackChannel)
{
 			boolean responseWritten = TransportUtils.isResponseWritten(msgCtx);
@@ -354,7 +357,7 @@
 			t = (RequestResponseTransport) rmMsgCtx.getProperty(RequestResponseTransport.TRANSPORT_CONTROL);
 			
 			// Tell the transport that there will be no response message
-			if(t != null) {
+			if(t != null && RequestResponseTransportStatus.WAITING.equals(t.getStatus()))
{
 				TransportUtils.setResponseWritten(msgCtx, false);
 				t.acknowledgeMessage(msgCtx);
 			}
@@ -369,7 +372,7 @@
 		{
 			if (rmMsgCtx.getRelatesTo()==null) {
 				if (log.isDebugEnabled())
-					log.debug("Exit: SequenceProcessor::processReliableMessage, got WSRM 1.0 lastmessage");
+					log.debug("SequenceProcessor::processReliableMessage, got WSRM 1.0 lastmessage");
 				msgCtx.getAxisOperation().setMessageReceiver(new RMMessageReceiver ());
 			}
 		}



---------------------------------------------------------------------
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