You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2008/05/12 18:52:35 UTC

svn commit: r655557 - /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java

Author: davidillsley
Date: Mon May 12 09:52:34 2008
New Revision: 655557

URL: http://svn.apache.org/viewvc?rev=655557&view=rev
Log:
Performance: Include MessageOut in retransmittable phases to prevent WS-A headers from being copied.
Thanks to Sara Mitchell for help with this patch

Modified:
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java?rev=655557&r1=655556&r2=655557&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java Mon May 12 09:52:34 2008
@@ -977,34 +977,20 @@
 			return; //This message is aimed to be stored only if, Sandesha2TransportOutDescription is set.
 		
 		ArrayList executionChain = message.getExecutionChain();
-		ArrayList retransmittablePhaseNames = getRetransmittablePhaseNameList();
 		ArrayList retransmittablePhases = new ArrayList ();
 		
-		for (Iterator it=executionChain.iterator();it.hasNext();) {
-			Handler handler = (Handler) it.next();
-			
-			if (retransmittablePhaseNames.contains(handler.getName())) {
+		int executionChainLength = executionChain.size();
+		for(int i=0;i<executionChainLength;i++){
+			Handler handler = (Handler)executionChain.get(i);
+			if("Security".equals(handler.getName())||"MessageOut".equals(handler.getName())){
 				retransmittablePhases.add(handler);
-				
-				it.remove();
+				executionChain.remove(i);
+				executionChainLength=executionChain.size();
 			}
 		}
-		
 		message.setProperty(Sandesha2Constants.RETRANSMITTABLE_PHASES, retransmittablePhases);
 	}
 	
-	private static ArrayList getRetransmittablePhaseNameList () {
-		
-		//TODO get this phase list from a property
-		
-		String security = "Security";
-		
-		ArrayList phases = new ArrayList ();
-		phases.add(security);
-		
-		return phases;
-	}
-	
         /**
          * Clone the MessageContext
          * @param oldMsg



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org