ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatf...@apache.org
Subject svn commit: r706560 - in /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2: msgprocessors/ storage/inmemory/ util/
Date Tue, 21 Oct 2008 09:26:53 GMT
Author: gatfora
Date: Tue Oct 21 02:26:50 2008
New Revision: 706560

URL: http://svn.apache.org/viewvc?rev=706560&view=rev
Log:
For a 2-way sequence, the LastMessage never gets sent for a response sequence if the sequence
was setup to use async communications.  This patch changes to send the response sequence to
the defined reply to address which had been set on the sequence.  There is a bit of cleanup
surrounding Ack processing for terminated sequences and removed several unused imports.

Modified:
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?rev=706560&r1=706559&r2=706560&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
Tue Oct 21 02:26:50 2008
@@ -87,7 +87,6 @@
 			log.debug("Enter: AcknowledgementProcessor::processAckHeader " + soapHeader);
 		
 		boolean piggybackedAck = !(rmMsgCtx.getMessageType()==Sandesha2Constants.MessageTypes.ACK);
-		
 		MessageContext msgCtx = rmMsgCtx.getMessageContext();
 		ConfigurationContext configCtx = msgCtx.getConfigurationContext();
 
@@ -110,7 +109,10 @@
 			log.debug(message);
 			throw new SandeshaException(message);
 		}
-		if (FaultManager.checkForSequenceTerminated(rmMsgCtx, outSequenceId, rmsBean, piggybackedAck))
{
+		// If the message type is terminate sequence, then there may be a piggy backed ACK for
a 
+		// sequence that has been terminated
+		if (rmMsgCtx.getMessageType()!=Sandesha2Constants.MessageTypes.TERMINATE_SEQ &&

+		    FaultManager.checkForSequenceTerminated(rmMsgCtx, outSequenceId, rmsBean, piggybackedAck))
{
 			if (log.isDebugEnabled())
 				log.debug("Exit: AcknowledgementProcessor::processAckHeader, Sequence terminated");
 			return;

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=706560&r1=706559&r2=706560&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
Tue Oct 21 02:26:50 2008
@@ -400,8 +400,15 @@
 					lastMessage = true;
 			}
 			
-			if (lastMessage) 
-				rmsBean.setLastOutMessage(messageNumber);		
+			if (lastMessage) {
+				rmsBean.setLastOutMessage(messageNumber);
+				
+				if (msgContext.getTo() == null || (msgContext.getTo() != null && msgContext.getTo().isWSAddressingAnonymous()))
{
+				  if (log.isDebugEnabled())
+				    log.debug("Rewriting anonymous EPR for LastMessage to the one stored in the RMSBean");
+				  msgContext.setTo(rmsBean.getToEndpointReference());
+				}
+			}
 	
 			// set this as the response highest message.
 			rmsBean.setHighestOutMessageNumber(messageNumber);

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java?rev=706560&r1=706559&r2=706560&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
Tue Oct 21 02:26:50 2008
@@ -19,8 +19,6 @@
 
 package org.apache.sandesha2.msgprocessors;
 
-import java.util.Collection;
-
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAP12Constants;

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java?rev=706560&r1=706559&r2=706560&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java
Tue Oct 21 02:26:50 2008
@@ -26,9 +26,6 @@
 
 import org.apache.axis2.context.AbstractContext;
 import org.apache.sandesha2.Sandesha2Constants;
-import org.apache.sandesha2.SandeshaException;
-import org.apache.sandesha2.i18n.SandeshaMessageHelper;
-import org.apache.sandesha2.i18n.SandeshaMessageKeys;
 import org.apache.sandesha2.storage.SandeshaStorageException;
 import org.apache.sandesha2.storage.beanmanagers.RMSBeanMgr;
 import org.apache.sandesha2.storage.beans.RMSBean;

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java?rev=706560&r1=706559&r2=706560&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java
Tue Oct 21 02:26:50 2008
@@ -114,8 +114,10 @@
 				if (LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled())
 					log.debug("Piggybacking ack for sequence: " + inboundSequence);
 				RMDBean sequence = storageManager.getRMDBeanMgr().retrieve(inboundSequence);
-				RMMsgCreator.addAckMessage(rmMessageContext, inboundSequence, sequence, false);
-				((Sender) storageManager.getSender()).removeScheduledAcknowledgement(inboundSequence);
+				if (sequence != null && !sequence.isTerminated()) {				  
+    				RMMsgCreator.addAckMessage(rmMessageContext, inboundSequence, sequence, false);
+    				((Sender) storageManager.getSender()).removeScheduledAcknowledgement(inboundSequence);
+				}
 			} else {
 				RMDBean findRMDBean = new RMDBean();
 				findRMDBean.setAcksToEndpointReference(target);

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java?rev=706560&r1=706559&r2=706560&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/MsgInitializer.java
Tue Oct 21 02:26:50 2008
@@ -23,7 +23,6 @@
 
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.context.MessageContext;
 import org.apache.sandesha2.RMMsgContext;
 import org.apache.sandesha2.Sandesha2Constants;



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