axis-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From parso...@apache.org
Subject svn commit: r1005095 - in /axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors: CloseSequenceProcessor.java TerminateSeqMsgProcessor.java
Date Wed, 06 Oct 2010 15:59:01 GMT
Author: parsonsd
Date: Wed Oct  6 15:59:00 2010
New Revision: 1005095

URL: http://svn.apache.org/viewvc?rev=1005095&view=rev
Log:
PiggyBacked acks sent on closeSeq & terminateSeq with mustUnderstand set to true breaks
RSP spec.  Fixed so that all piggybacked acks are sent with mustUnderstand set to false.

Modified:
    axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
    axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java

Modified: axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java?rev=1005095&r1=1005094&r2=1005095&view=diff
==============================================================================
--- axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
(original)
+++ axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java
Wed Oct  6 15:59:00 2010
@@ -95,25 +95,18 @@ public class CloseSequenceProcessor exte
 		}
 
 		rmBean.setClosed(true);
-		Iterator<SequenceAcknowledgement> sequenceAckIter = null;
+
+		RMMsgContext closeSeqResponseRMMsg = RMMsgCreator.createCloseSeqResponseMsg(rmMsgCtx, rmBean);
+		MessageContext closeSequenceResponseMsg = closeSeqResponseRMMsg.getMessageContext();		
 		if(rmBean instanceof RMDBean){
 			storageManager.getRMDBeanMgr().update((RMDBean)rmBean);
-			RMMsgContext ackRMMsgCtx = AcknowledgementManager.generateAckMessage(rmMsgCtx, (RMDBean)rmBean,
sequenceId, storageManager, true);
-			// adding the ack part(s) to the envelope.
-			sequenceAckIter = ackRMMsgCtx.getSequenceAcknowledgements();
+			//Piggyback an ack for the sequence being closed on the closeSequenceResponse
+			RMMsgCreator.addAckMessage(closeSeqResponseRMMsg, sequenceId, (RMDBean)rmBean, false,
true);
 		}
 		else{
 			storageManager.getRMSBeanMgr().update((RMSBean)rmBean);
 		}
 
-		RMMsgContext closeSeqResponseRMMsg = RMMsgCreator.createCloseSeqResponseMsg(rmMsgCtx, rmBean);
-		MessageContext closeSequenceResponseMsg = closeSeqResponseRMMsg.getMessageContext();
-
-		while (sequenceAckIter!=null && sequenceAckIter.hasNext()) {
-			SequenceAcknowledgement sequenceAcknowledgement = (SequenceAcknowledgement) sequenceAckIter.next();
-			closeSeqResponseRMMsg.addSequenceAcknowledgement(sequenceAcknowledgement);
-		}
-		
 		closeSeqResponseRMMsg.setFlow(MessageContext.OUT_FLOW);
 		closeSeqResponseRMMsg.setProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE, "true");
 		closeSequenceResponseMsg.setResponseWritten(true);

Modified: axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java?rev=1005095&r1=1005094&r2=1005095&view=diff
==============================================================================
--- axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
(original)
+++ axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
Wed Oct  6 15:59:00 2010
@@ -328,15 +328,8 @@ public class TerminateSeqMsgProcessor ex
 		MessageContext outMessage = terminateSeqResponseRMMsg.getMessageContext();
 		
 		if(rmBean instanceof RMDBean){
-			RMMsgContext ackRMMessage = AcknowledgementManager.generateAckMessage(terminateSeqRMMsg,
(RMDBean)rmBean, 
-					sequenceId,	storageManager, true);
-			
-			// copy over the ack parts
-			Iterator<SequenceAcknowledgement> iter = ackRMMessage.getSequenceAcknowledgements();
-			while (iter.hasNext()) {
-				SequenceAcknowledgement seqAck = (SequenceAcknowledgement) iter.next();
-				terminateSeqResponseRMMsg.addSequenceAcknowledgement(seqAck);
-			}
+			//Piggyback an ack for the sequence being terminated on the terminateSequenceResponse
+			RMMsgCreator.addAckMessage(terminateSeqResponseRMMsg, sequenceId, (RMDBean)rmBean, false,
true);
 		}		
 		terminateSeqResponseRMMsg.addSOAPEnvelope();
 



Mime
View raw message