[jboss-svn-commits] JBL Code SVN: r34642 - in labs/jbossesb/branches/JBESB_4_7_CP/product: install/conf and 6 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Aug 11 12:47:33 EDT 2010


Author: kevin.conner at jboss.com
Date: 2010-08-11 12:47:32 -0400 (Wed, 11 Aug 2010)
New Revision: 34642

Added:
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client/
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java
Removed:
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java
Modified:
   labs/jbossesb/branches/JBESB_4_7_CP/product/.classpath
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/conf/jbossesb-properties.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/StaticWiretap.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/client/MessageMulticaster.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/JBESB_1201_UnitTest.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/JBESB_1204_1331_UnitTest.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/Nested_Splits_UnitTest.java
Log:
Pulled across fix for Aggregator meta data in properties: JBESB-3310

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/.classpath
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/.classpath	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/.classpath	2010-08-11 16:47:32 UTC (rev 34642)
@@ -28,7 +28,6 @@
 	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.0.1.jar"/>
 	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.1.0.jar"/>
 	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.2.0.jar"/>
-	<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-registry.jar"/>
 	<classpathentry kind="lib" path="build/lib/activation-1.1.jar"/>
 	<classpathentry kind="lib" path="build/lib/ant-1.7.0.jar"/>
 	<classpathentry kind="lib" path="build/lib/antlr-2.7.7.jar"/>

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/install/conf/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/conf/jbossesb-properties.xml	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/conf/jbossesb-properties.xml	2010-08-11 16:47:32 UTC (rev 34642)
@@ -105,6 +105,7 @@
     	<!--  Uncomment this to specify the WS response timeout when exposing an ESB service through WS
     	<property name="org.jboss.soa.esb.ws.timeout" value="30000"/>
     	-->
+    	<property name="org.jboss.soa.esb.aggregator.setOnProperties" value="false"/>
     </properties>
     <properties name="connection">
     	<property name="min-pool-size" value="5"/>

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -30,6 +30,8 @@
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+
 import static org.jboss.soa.esb.client.ServiceInvoker.DEAD_LETTER_SERVICE_NAME;
 import static org.jboss.soa.esb.client.ServiceInvoker.INTERNAL_SERVICE_CATEGORY;
 import org.jboss.soa.esb.helpers.ConfigTree;
@@ -69,15 +71,18 @@
     public final static String AGGEGRATOR_TAG = "aggregatorTag";
     public final static String SPLITTER_TIME_STAMP = "splitterTimeStamp";
     
+    public final static String AGGREGATOR_ON_PROPERTIES = "org.jboss.soa.esb.aggregator.setOnProperties";
+    
     private Map<String, Map< Integer, Message > > aggregatedMessageMap
         = new ConcurrentHashMap< String, Map< Integer, Message > >();  // can probably change this to a vanilla Map now
     private TimeoutChecker _timeoutChecker=null;
     
     protected ConfigTree config;
-    private Logger logger = Logger.getLogger(Aggregator.class);
+    private static Logger logger = Logger.getLogger(Aggregator.class);
     private Long timeoutInMillis=null;
     private Set<String> receivedSplits = new HashSet<String>();
     private String splitId;
+    private boolean aggregatorOnProperties = false; // By default... set on context.
 
     private Aggregator(){}
 
@@ -111,6 +116,8 @@
         
         logger.debug("Aggregator config:  timeoutInMillis=" + timeoutInMillis);
         splitId = config.getAttribute("splitId");
+        
+        aggregatorOnProperties = Aggregator.aggregatorOnProperties(config);        
     }
         
     /**
@@ -159,7 +166,7 @@
 	@SuppressWarnings("unchecked")
     public Message process(Message message) throws ActionProcessingException
 	{
-        List<String> aggregatorTags = getAggregatorTags(message);
+        List<String> aggregatorTags = getAggregatorTags(message, aggregatorOnProperties);
 
         if (aggregatorTags != null && aggregatorTags.size() > 0) {
             String aggregatorTag = aggregatorTags.get(aggregatorTags.size()-1);
@@ -239,28 +246,80 @@
         }
     }
 
+    /**
+     * @deprecated Use {@link #getAggregatorTags(Message, boolean)}.
+     */
     public static List<String> getAggregatorTags(Message message) {
-        return (List<String>) message.getProperties().getProperty(Aggregator.AGGEGRATOR_TAG);
+        return getAggregatorTags(message, false);
     }
 
+    public static List<String> getAggregatorTags(Message message, boolean aggregatorOnProperties) {
+    	if(aggregatorOnProperties) {
+    		return (List<String>) message.getProperties().getProperty(Aggregator.AGGEGRATOR_TAG);
+    	} else {
+    		return (List<String>) message.getContext().getContext(Aggregator.AGGEGRATOR_TAG);
+    	}
+    }
+
+    /**
+     * @deprecated Use {@link #setAggregatorTags(Message, List, boolean)}.
+     */
     public static void setAggregatorTags(Message message, List<String> tags) {
-        if(tags != null) {
-            message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, tags);
-        } else {
-            message.getProperties().remove(Aggregator.AGGEGRATOR_TAG);
-        }
+    	setAggregatorTags(message, tags, false);
     }
+    
+    public static void setAggregatorTags(Message message, List<String> tags, boolean aggregatorOnProperties) {
+    	if(aggregatorOnProperties) {
+	        if(tags != null) {
+	            message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, tags);
+	        } else {
+	            message.getProperties().remove(Aggregator.AGGEGRATOR_TAG);
+	        }
+    	} else {
+	        if(tags != null) {
+	            message.getContext().setContext(Aggregator.AGGEGRATOR_TAG, tags);
+	        } else {
+	            message.getContext().removeContext(Aggregator.AGGEGRATOR_TAG);
+	        }
+    	}
+    }
 
+    /**
+     * @deprecated Use {@link #getAggregatorDetails(Message, int, boolean)}.
+     */
     public static AggregationDetails getAggregatorDetails(Message message, int tagIndex) throws ActionProcessingException {
-        List<String> tags = getAggregatorTags(message);
+    	return getAggregatorDetails(message, tagIndex, false);
+    }
 
+    public static AggregationDetails getAggregatorDetails(Message message, int tagIndex, boolean aggregatorOnProperties) throws ActionProcessingException {
+        List<String> tags = getAggregatorTags(message, aggregatorOnProperties);
+
         if(tags == null || tags.isEmpty()) {
             return null;
         } else {
             return new AggregationDetails(tags.get(tagIndex));
         }
     }
+    
+    public static boolean aggregatorOnProperties(ConfigTree configTree) {
+        String value = configTree.getAttribute(AGGREGATOR_ON_PROPERTIES);
 
+        if(value != null) {        	
+        	return configTree.getBooleanAttribute(AGGREGATOR_ON_PROPERTIES, false);
+        } else {
+        	value = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE).getProperty(AGGREGATOR_ON_PROPERTIES);
+            if(value != null) {
+                try {
+                    return Boolean.parseBoolean(value.trim());
+                } catch(NumberFormatException e) {
+                    logger.error("Invalid value '" + value + "' for property '" + AGGREGATOR_ON_PROPERTIES + "'.  Must be an boolean value.  Returning default value 'false'.");
+                }
+            }        	
+        }
+        
+        return false;
+    }
+
     public static void decorate(Message message) {
 
     }
@@ -278,7 +337,7 @@
         // Create an aggregated message
         Message aggregatedMessage = MessageFactory.getInstance().getMessage();
 
-        setAggregatorTags(message, null);
+        setAggregatorTags(message, null, aggregatorOnProperties);
         try {
             aggregatedMessage.getAttachment().addItem(Util.serialize(message));
         } catch (ParserConfigurationException e) {
@@ -305,7 +364,7 @@
         //Push additional AggregatorTags onto the new message, so we can aggregate in case of nested splits.
         //Only need to get it from the first message, should be the same for the others.
         List<String> aggregatedMessageTags = copyAggregationTags(messageMap);
-        setAggregatorTags(aggregatedMessage, aggregatedMessageTags);
+        setAggregatorTags(aggregatedMessage, aggregatedMessageTags, false);
 
         for (Message attachmentMessage : messageMap.values()) {
             //Add the individual messages as attachments
@@ -313,7 +372,7 @@
                 // Clear the aggregation tags from the attachment message. Any future aggregation
                 // on the payload of these messages should be done within the context of the
                 // outer/aggregated message and it's tags.
-                setAggregatorTags(attachmentMessage, null);
+                setAggregatorTags(attachmentMessage, null, false);
                 aggregatedMessage.getAttachment().addItem(Util.serialize(attachmentMessage));
             } catch (ParserConfigurationException e) {
                 throw new ActionProcessingException("Message attachment serialization failure", e);
@@ -334,7 +393,7 @@
 
     private List<String> copyAggregationTags(Map<Integer, Message> messageMap) {
         // Get the tags from the first message...
-        List<String> nestedAggregationTags = getAggregatorTags(messageMap.values().iterator().next());
+        List<String> nestedAggregationTags = getAggregatorTags(messageMap.values().iterator().next(), aggregatorOnProperties);
 
         if(nestedAggregationTags != null && nestedAggregationTags.size() > 1) {
             // clone the tags, just incase they get zapped from the source list...
@@ -409,7 +468,7 @@
                         if (isTimedOut(timeStamp)) {
                             //We found a timed-out message. Let's go notify ourselves about it by resending a message,
                             //if we haven't done so already
-                            List<String> aggregatorTag = getAggregatorTags(message);
+                            List<String> aggregatorTag = getAggregatorTags(message, aggregatorOnProperties);
                             if(aggregatorTag != null && !aggregatorTag.isEmpty()) {
                                 AggregationDetails aggrDetails = new AggregationDetails(aggregatorTag.get(aggregatorTag.size() - 1));
 

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -125,6 +125,8 @@
         } catch (MessageDeliverException e) {
             throw new MessageRouterException(e);
         }
+        
+        messageMulticaster.setAggregatorOnProperties(Aggregator.aggregatorOnProperties(config));
     }
 
     public void initialise() { }

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/StaticWiretap.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/StaticWiretap.java	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/actions/StaticWiretap.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -70,6 +70,7 @@
     public void initialise() throws ActionLifecycleException
     {
         messageMulticaster = new MessageMulticaster(_config.getAttribute("action", "%unset%"));
+        messageMulticaster.setAggregatorOnProperties(Aggregator.aggregatorOnProperties(_config));
 
         ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
         if (null == destList || destList.length < 1)

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/client/MessageMulticaster.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/client/MessageMulticaster.java	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/client/MessageMulticaster.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -50,6 +50,7 @@
 
     private Map<Service, ServiceInvoker> invokers = new LinkedHashMap<Service, ServiceInvoker>();
     private String splitId;
+    private boolean aggregatorOnProperties = false; // By default... set on context.
 
     /**
      * Public default constructor.
@@ -151,16 +152,26 @@
         }
     }
 
-    private void addAggregationDetails(Message message, String uuId, int recipientCount, long seriesTimestamp, int messageIndex) {
+    protected void addAggregationDetails(Message message, String uuId, int recipientCount, long seriesTimestamp, int messageIndex) {
         AggregationDetails aggrDetails = new AggregationDetails(uuId, messageIndex, recipientCount, seriesTimestamp);
-        ArrayList<String> aggregatorTags = (ArrayList<String>) message.getProperties().getProperty(Aggregator.AGGEGRATOR_TAG);
+        ArrayList<String> aggregatorTags;
+        
+        if(aggregatorOnProperties) {
+        	aggregatorTags = (ArrayList<String>) message.getProperties().getProperty(Aggregator.AGGEGRATOR_TAG);
+        } else {
+        	aggregatorTags = (ArrayList<String>) message.getContext().getContext(Aggregator.AGGEGRATOR_TAG);
+        }
 
         // This is useful during aggregation - as a way of id'ing where the split occurred.
         aggrDetails.setSplitId(splitId);
 
         if(aggregatorTags == null) {
             aggregatorTags = new ArrayList<String>();
-            message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
+            if(aggregatorOnProperties) {
+            	message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
+            } else {
+            	message.getContext().setContext(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
+            }
         }
 
         if(messageIndex > 1) {
@@ -174,7 +185,11 @@
         }
     }
 
-    private ServiceInvoker getInvoker(Service recipient) throws RegistryException, MessageDeliverException {
+	public void setAggregatorOnProperties(boolean aggregatorOnProperties) {
+		this.aggregatorOnProperties = aggregatorOnProperties;
+	}
+
+	private ServiceInvoker getInvoker(Service recipient) throws RegistryException, MessageDeliverException {
         ServiceInvoker invoker = invokers.get(recipient);
 
         // We lazilly create the invokers...


Property changes on: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions
___________________________________________________________________
Name: svn:ignore
   - jbossesb-gateway.xml
jbossesb-listener.xml

   + jbossesb-gateway.xml
jbossesb-listener.xml


Deleted: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.java	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -1,175 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.soa.esb.actions;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.UUID;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.couriers.MockCourier;
-import org.jboss.internal.soa.esb.couriers.MockCourierFactory;
-import org.jboss.internal.soa.esb.services.registry.MockRegistry;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.jboss.soa.esb.testutils.FileUtil;
-import org.jboss.soa.esb.util.ClassUtil;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Test the Aggregator class
- *
- * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
- */
-
-
-public class AggregatorUnitTest
-{
-	static Logger logger = Logger.getLogger(AggregatorUnitTest.class);
-    static Message message = null;
-    
-    private static EPR epr1;
-    private static EPR epr2;
-    private static EPR epr3;
-    private static MockCourier courier1;
-    private static MockCourier courier2;
-    private static MockCourier courier3;
-    
-    private static ConfigTree[] actions;
-	
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(AggregatorUnitTest.class);
-    }
-    
-    @BeforeClass
-    public static void before() throws Exception {
-        MockCourierFactory.install();
-        MockRegistry.install();
-
-        epr1 = new EPR(new URI("test1"));
-        epr2 = new EPR(new URI("test2"));
-        epr3 = new EPR(new URI("DLS"));
-        courier1 = new MockCourier(true);
-        courier2 = new MockCourier(true);
-        courier3 = new MockCourier(true);
-
-        MockRegistry.register("test", "java", epr1, courier1);
-        MockRegistry.register("test", "xml", epr2, courier2);
-        MockRegistry.register("test", "aggregator", epr3, courier3);
- 
-        message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
-        message.getBody().add(("Hello Aggregator"));
-        
-        InputStream in = ClassUtil.getResourceAsStream("AggregatorUnitTest.xml", AggregatorUnitTest.class);
-        String xml = FileUtil.readStream(in);
-        actions = ConfigTree.fromXml(xml).getChildren("action");
-    }
-    
-    @Test
-	public void aggregateThreeMessages()
-    {
-		try {
-            Aggregator aggregator = new Aggregator(actions[0]);
-            int recipientCount=3;
-            String uuId = UUID.randomUUID().toString();
-            long timestamp = System.currentTimeMillis();
-            ArrayList<String> aggregatorTags = new ArrayList<String>();
-            
-            for(int i = 0; i < recipientCount; i++) 
-            {
-                String tag = uuId + ":" + (i + 1) + ":" + recipientCount + ":" + timestamp;
-                aggregatorTags.add(tag);
-                message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
-                Message responseMessage = aggregator.process(message);
-                if (i<recipientCount-1) {
-                    assertNull(responseMessage);
-                } else {
-                    assertNotNull(responseMessage);
-                }
-            }
-            
-		} catch (Exception e) {
-			e.printStackTrace();
-			assertTrue(false);
-		}
-    }
-    
-    @Test
-	public void aggregateWithoutTimeout()
-    {
-		try {
-			InputStream in = ClassUtil.getResourceAsStream("OtherAggregatorUnitTest.xml", AggregatorUnitTest.class);
-	        String xml = FileUtil.readStream(in);
-	        ConfigTree[] acts = ConfigTree.fromXml(xml).getChildren("action");
-	        
-            Aggregator aggregator = new Aggregator(acts[0]);
-		} catch (Exception e) {
-			assertTrue(false);
-		}
-    }
-    
-    @Test
-    public void aggregateTimeoutTest1()
-    {
-        try {
-            Aggregator aggregator = new Aggregator(actions[1]);
-            int recipientCount=3;
-            String uuId = UUID.randomUUID().toString();
-            long timestamp = System.currentTimeMillis();
-            ArrayList<String> aggregatorTags = new ArrayList<String>();
-            
-            for(int i = 0; i < recipientCount; i++) 
-            {
-                String tag = uuId + ":" + (i + 1) + ":" + recipientCount + ":" + timestamp;
-                aggregatorTags.add(tag);
-                message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
-                
-                try {
-                    Thread.sleep(200);
-                } catch (InterruptedException e) {}
-                
-                Message responseMessage = aggregator.process(message);
-                
-                //all message should be expired
-                assertNull(responseMessage);
-                
-            }
-            
-        } catch (Exception e) {
-            assertTrue(false);
-        }
-    }
-    
-}
\ No newline at end of file

Deleted: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.xml	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.xml	2010-08-11 16:47:32 UTC (rev 34642)
@@ -1,6 +0,0 @@
-<testActions>
-	<action class="org.jboss.soa.esb.actions.Aggregator" name="Aggregator" timeoutInMillies="60000"
-		service-category="test" service-name="Aggregator" />
-	<action class="org.jboss.soa.esb.actions.Aggregator" name="Aggregator" timeoutInMillies="100"
-		service-category="test" service-name="Aggregator"/>
-</testActions>

Copied: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.java (from rev 33515, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -0,0 +1,175 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.actions;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.UUID;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.couriers.MockCourier;
+import org.jboss.internal.soa.esb.couriers.MockCourierFactory;
+import org.jboss.internal.soa.esb.services.registry.MockRegistry;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.testutils.FileUtil;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test the Aggregator class
+ *
+ * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
+ */
+
+
+public class Aggregator_On_Context_UnitTest
+{
+	static Logger logger = Logger.getLogger(Aggregator_On_Context_UnitTest.class);
+    static Message message = null;
+    
+    private static EPR epr1;
+    private static EPR epr2;
+    private static EPR epr3;
+    private static MockCourier courier1;
+    private static MockCourier courier2;
+    private static MockCourier courier3;
+    
+    private static ConfigTree[] actions;
+	
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter(Aggregator_On_Context_UnitTest.class);
+    }
+    
+    @BeforeClass
+    public static void before() throws Exception {
+        MockCourierFactory.install();
+        MockRegistry.install();
+
+        epr1 = new EPR(new URI("test1"));
+        epr2 = new EPR(new URI("test2"));
+        epr3 = new EPR(new URI("DLS"));
+        courier1 = new MockCourier(true);
+        courier2 = new MockCourier(true);
+        courier3 = new MockCourier(true);
+
+        MockRegistry.register("test", "java", epr1, courier1);
+        MockRegistry.register("test", "xml", epr2, courier2);
+        MockRegistry.register("test", "aggregator", epr3, courier3);
+ 
+        message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+        message.getBody().add(("Hello Aggregator"));
+        
+        InputStream in = ClassUtil.getResourceAsStream("Aggregator_On_Context_UnitTest.xml", Aggregator_On_Context_UnitTest.class);
+        String xml = FileUtil.readStream(in);
+        actions = ConfigTree.fromXml(xml).getChildren("action");
+    }
+    
+    @Test
+	public void aggregateThreeMessages()
+    {
+		try {
+            Aggregator aggregator = new Aggregator(actions[0]);
+            int recipientCount=3;
+            String uuId = UUID.randomUUID().toString();
+            long timestamp = System.currentTimeMillis();
+            ArrayList<String> aggregatorTags = new ArrayList<String>();
+            
+            for(int i = 0; i < recipientCount; i++) 
+            {
+                String tag = uuId + ":" + (i + 1) + ":" + recipientCount + ":" + timestamp;
+                aggregatorTags.add(tag);
+                message.getContext().setContext(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
+                Message responseMessage = aggregator.process(message);
+                if (i<recipientCount-1) {
+                    assertNull(responseMessage);
+                } else {
+                    assertNotNull(responseMessage);
+                }
+            }
+            
+		} catch (Exception e) {
+			e.printStackTrace();
+			assertTrue(false);
+		}
+    }
+    
+    @Test
+	public void aggregateWithoutTimeout()
+    {
+		try {
+			InputStream in = ClassUtil.getResourceAsStream("OtherAggregatorUnitTest.xml", Aggregator_On_Context_UnitTest.class);
+	        String xml = FileUtil.readStream(in);
+	        ConfigTree[] acts = ConfigTree.fromXml(xml).getChildren("action");
+	        
+            Aggregator aggregator = new Aggregator(acts[0]);
+		} catch (Exception e) {
+			assertTrue(false);
+		}
+    }
+    
+    @Test
+    public void aggregateTimeoutTest1()
+    {
+        try {
+            Aggregator aggregator = new Aggregator(actions[1]);
+            int recipientCount=3;
+            String uuId = UUID.randomUUID().toString();
+            long timestamp = System.currentTimeMillis();
+            ArrayList<String> aggregatorTags = new ArrayList<String>();
+            
+            for(int i = 0; i < recipientCount; i++) 
+            {
+                String tag = uuId + ":" + (i + 1) + ":" + recipientCount + ":" + timestamp;
+                aggregatorTags.add(tag);
+                message.getContext().setContext(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
+                
+                try {
+                    Thread.sleep(200);
+                } catch (InterruptedException e) {}
+                
+                Message responseMessage = aggregator.process(message);
+                
+                //all message should be expired
+                assertNull(responseMessage);
+                
+            }
+            
+        } catch (Exception e) {
+            assertTrue(false);
+        }
+    }
+    
+}
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.xml (from rev 33515, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Context_UnitTest.xml	2010-08-11 16:47:32 UTC (rev 34642)
@@ -0,0 +1,6 @@
+<testActions>
+	<action class="org.jboss.soa.esb.actions.Aggregator" name="Aggregator" timeoutInMillies="60000"
+		service-category="test" service-name="Aggregator" />
+	<action class="org.jboss.soa.esb.actions.Aggregator" name="Aggregator" timeoutInMillies="100"
+		service-category="test" service-name="Aggregator"/>
+</testActions>

Copied: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.java (from rev 33515, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -0,0 +1,175 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.actions;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.UUID;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.couriers.MockCourier;
+import org.jboss.internal.soa.esb.couriers.MockCourierFactory;
+import org.jboss.internal.soa.esb.services.registry.MockRegistry;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.testutils.FileUtil;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test the Aggregator class
+ *
+ * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
+ */
+
+
+public class Aggregator_On_Properties_UnitTest
+{
+	static Logger logger = Logger.getLogger(Aggregator_On_Properties_UnitTest.class);
+    static Message message = null;
+    
+    private static EPR epr1;
+    private static EPR epr2;
+    private static EPR epr3;
+    private static MockCourier courier1;
+    private static MockCourier courier2;
+    private static MockCourier courier3;
+    
+    private static ConfigTree[] actions;
+	
+    public static junit.framework.Test suite()
+    {
+        return new JUnit4TestAdapter(Aggregator_On_Properties_UnitTest.class);
+    }
+    
+    @BeforeClass
+    public static void before() throws Exception {
+        MockCourierFactory.install();
+        MockRegistry.install();
+
+        epr1 = new EPR(new URI("test1"));
+        epr2 = new EPR(new URI("test2"));
+        epr3 = new EPR(new URI("DLS"));
+        courier1 = new MockCourier(true);
+        courier2 = new MockCourier(true);
+        courier3 = new MockCourier(true);
+
+        MockRegistry.register("test", "java", epr1, courier1);
+        MockRegistry.register("test", "xml", epr2, courier2);
+        MockRegistry.register("test", "aggregator", epr3, courier3);
+ 
+        message = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
+        message.getBody().add(("Hello Aggregator"));
+        
+        InputStream in = ClassUtil.getResourceAsStream("Aggregator_On_Properties_UnitTest.xml", Aggregator_On_Properties_UnitTest.class);
+        String xml = FileUtil.readStream(in);
+        actions = ConfigTree.fromXml(xml).getChildren("action");
+    }
+    
+    @Test
+	public void aggregateThreeMessages()
+    {
+		try {
+            Aggregator aggregator = new Aggregator(actions[0]);
+            int recipientCount=3;
+            String uuId = UUID.randomUUID().toString();
+            long timestamp = System.currentTimeMillis();
+            ArrayList<String> aggregatorTags = new ArrayList<String>();
+            
+            for(int i = 0; i < recipientCount; i++) 
+            {
+                String tag = uuId + ":" + (i + 1) + ":" + recipientCount + ":" + timestamp;
+                aggregatorTags.add(tag);
+                message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
+                Message responseMessage = aggregator.process(message);
+                if (i<recipientCount-1) {
+                    assertNull(responseMessage);
+                } else {
+                    assertNotNull(responseMessage);
+                }
+            }
+            
+		} catch (Exception e) {
+			e.printStackTrace();
+			assertTrue(false);
+		}
+    }
+    
+    @Test
+	public void aggregateWithoutTimeout()
+    {
+		try {
+			InputStream in = ClassUtil.getResourceAsStream("OtherAggregatorUnitTest.xml", Aggregator_On_Properties_UnitTest.class);
+	        String xml = FileUtil.readStream(in);
+	        ConfigTree[] acts = ConfigTree.fromXml(xml).getChildren("action");
+	        
+            Aggregator aggregator = new Aggregator(acts[0]);
+		} catch (Exception e) {
+			assertTrue(false);
+		}
+    }
+    
+    @Test
+    public void aggregateTimeoutTest1()
+    {
+        try {
+            Aggregator aggregator = new Aggregator(actions[1]);
+            int recipientCount=3;
+            String uuId = UUID.randomUUID().toString();
+            long timestamp = System.currentTimeMillis();
+            ArrayList<String> aggregatorTags = new ArrayList<String>();
+            
+            for(int i = 0; i < recipientCount; i++) 
+            {
+                String tag = uuId + ":" + (i + 1) + ":" + recipientCount + ":" + timestamp;
+                aggregatorTags.add(tag);
+                message.getProperties().setProperty(Aggregator.AGGEGRATOR_TAG, aggregatorTags);
+                
+                try {
+                    Thread.sleep(200);
+                } catch (InterruptedException e) {}
+                
+                Message responseMessage = aggregator.process(message);
+                
+                //all message should be expired
+                assertNull(responseMessage);
+                
+            }
+            
+        } catch (Exception e) {
+            assertTrue(false);
+        }
+    }
+    
+}
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.xml (from rev 33515, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/Aggregator_On_Properties_UnitTest.xml	2010-08-11 16:47:32 UTC (rev 34642)
@@ -0,0 +1,6 @@
+<testActions>
+	<action class="org.jboss.soa.esb.actions.Aggregator" name="Aggregator" timeoutInMillies="60000"
+		service-category="test" service-name="Aggregator" org.jboss.soa.esb.aggregator.setOnProperties="true" />
+	<action class="org.jboss.soa.esb.actions.Aggregator" name="Aggregator" timeoutInMillies="100"
+		service-category="test" service-name="Aggregator" org.jboss.soa.esb.aggregator.setOnProperties="true" />
+</testActions>

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/JBESB_1201_UnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/JBESB_1201_UnitTest.java	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/JBESB_1201_UnitTest.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -116,7 +116,7 @@
 
         // Manually deliver the message to the splitter service...
         splitter.process(messageIn);
-        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0);
+        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0, false);
         assertNotNull(service1Message);
 
         // Manually deliver the message in service1Courier into service1...
@@ -154,7 +154,7 @@
 
         // Manually deliver the message to the splitter service...
         splitter.process(messageIn);
-        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0);
+        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0, false);
         assertNotNull(service1Message);
 
         // The aggregator timeout is 2000ms... sleep here for 3000ms to force all
@@ -198,7 +198,7 @@
 
         // Manually deliver the message to the splitter service...
         splitter.process(messageIn);
-        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0);
+        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0, false);
         assertNotNull(service1Message);
 
         // Manually deliver the message in service1Courier into service1...
@@ -251,7 +251,7 @@
 
         // Manually deliver the message to the splitter service...
         splitter.process(messageIn);
-        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0);
+        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0, false);
         assertNotNull(service1Message);
 
         // Manually deliver the message in service1Courier into service1...

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/JBESB_1204_1331_UnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/JBESB_1204_1331_UnitTest.java	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/JBESB_1204_1331_UnitTest.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -119,10 +119,10 @@
         assertEquals(1, service2Courier.messages.size());
 
         // The 2 messages should each have 1 aggregation info string (no more)...
-        aggrTags = Aggregator.getAggregatorTags(service1Courier.messages.get(0));
+        aggrTags = Aggregator.getAggregatorTags(service1Courier.messages.get(0), false);
         assertEquals(1, aggrTags.size());
         aggrDetailsS1 = new AggregationDetails(aggrTags.get(0));
-        aggrTags = Aggregator.getAggregatorTags(service2Courier.messages.get(0));
+        aggrTags = Aggregator.getAggregatorTags(service2Courier.messages.get(0), false);
         assertEquals(1, aggrTags.size());
         aggrDetailsS2 = new AggregationDetails(aggrTags.get(0));        
 
@@ -136,12 +136,12 @@
         assertEquals(2, aggregatorCourier.messages.size());
 
         // Extract aggr details from first message...
-        aggrTags = Aggregator.getAggregatorTags(aggregatorCourier.messages.get(0));
+        aggrTags = Aggregator.getAggregatorTags(aggregatorCourier.messages.get(0), false);
         assertEquals(1, aggrTags.size());
         aggrDetailsAggrM1 = new AggregationDetails(aggrTags.get(0));
 
         // Extract aggr details from second message...
-        aggrTags = Aggregator.getAggregatorTags(aggregatorCourier.messages.get(1));
+        aggrTags = Aggregator.getAggregatorTags(aggregatorCourier.messages.get(1), false);
         assertEquals(1, aggrTags.size());
         aggrDetailsAggrM2 = new AggregationDetails(aggrTags.get(0));
 

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/Nested_Splits_UnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/Nested_Splits_UnitTest.java	2010-08-11 16:06:29 UTC (rev 34641)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/actions/aggregation/Nested_Splits_UnitTest.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -146,7 +146,7 @@
 
         // Manually deliver the message to the splitter1 service...
         splitter1.process(messageIn);
-        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0);
+        AggregationDetails service1Message = Aggregator.getAggregatorDetails(service1Courier.messages.get(0), 0, false);
         assertNotNull(service1Message);
 
         // Manually deliver the message in service1Courier into service1...
@@ -154,7 +154,7 @@
 
         // Manually deliver the message in splitter2Courier into splitter2...
         splitter2.process(splitter2Courier.messages.get(0));
-        AggregationDetails service2Message = Aggregator.getAggregatorDetails(service2Courier.messages.get(0), 0);
+        AggregationDetails service2Message = Aggregator.getAggregatorDetails(service2Courier.messages.get(0), 0, false);
         assertNotNull(service2Message);
 
         // Manually deliver the message in aggregator2Courier into aggregator2 (this is the message from service1)...
@@ -171,7 +171,7 @@
         assertEquals(2, aggregator1Courier.messages.size());
 
         // Should be 2 aggrTags before aggregation...
-        List<String> aggrTags = Aggregator.getAggregatorTags(aggregator1Courier.messages.get(1));
+        List<String> aggrTags = Aggregator.getAggregatorTags(aggregator1Courier.messages.get(1), false);
         assertEquals(2, aggrTags.size());
 
         // Manually deliver the 2 messages to aggregator1...
@@ -179,9 +179,9 @@
         Message aggregator1Message = aggregator1.process(aggregator1Courier.messages.get(1));
         assertNoAggregationTags(aggregator1Courier.messages.get(0));
         assertNoAggregationTags(aggregator1Courier.messages.get(1));
-        aggrTags = Aggregator.getAggregatorTags(aggregator1Message);
+        aggrTags = Aggregator.getAggregatorTags(aggregator1Message, false);
         assertEquals(1, aggrTags.size());
-        AggregationDetails aggregator1MessageAggrDetails = Aggregator.getAggregatorDetails(aggregator1Message, 0);
+        AggregationDetails aggregator1MessageAggrDetails = Aggregator.getAggregatorDetails(aggregator1Message, 0, false);
         assertEquals(service1Message.getSeriesUuid(), aggregator1MessageAggrDetails.getSeriesUuid());
 
         // Manually deliver the aggregator1Message to aggregator2...
@@ -222,20 +222,20 @@
         aggrDetails = new AggregationDetails("xx", 1, 2, 123123);
         aggrDetails.setSplitId(splitId1);
         aggrTags.add(aggrDetails.toString());
-        Aggregator.setAggregatorTags(messageIn, aggrTags);
+        Aggregator.setAggregatorTags(messageIn, aggrTags, false);
         aggregator.process(messageIn);
 
         aggrDetails = new AggregationDetails("cc", 1, 2, 123123);
         aggrDetails.setSplitId(splitId1);
         aggrTags.add(aggrDetails.toString());
-        Aggregator.setAggregatorTags(messageIn, aggrTags);
+        Aggregator.setAggregatorTags(messageIn, aggrTags, false);
         aggregator.process(messageIn);
 
     }
 
     private void assertNoAggregationTags(Message aggregator1Message) {
         List<String> aggrTags;
-        aggrTags = Aggregator.getAggregatorTags(aggregator1Message);
+        aggrTags = Aggregator.getAggregatorTags(aggregator1Message, false);
         assertNull(aggrTags);
     }
 }
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client (from rev 33515, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/client)

Deleted: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java	2010-06-15 22:04:52 UTC (rev 33515)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.client;
-
-import org.jboss.soa.esb.actions.Aggregator;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-
-import junit.framework.TestCase;
-
-/**
- * @author <a href="mailto:tom.fennelly at gmail.com">tom.fennelly at gmail.com</a>
- */
-public class MessageMulticasterUnitTest extends TestCase {
-
-	public void test_on_properties() {
-		MessageMulticaster multicaster = new MessageMulticaster();
-		Message message = MessageFactory.getInstance().getMessage();
-		
-		multicaster.setAggregatorOnProperties(true);
-		
-		assertTrue(Aggregator.getAggregatorTags(message, true) == null);		
-		multicaster.addAggregationDetails(message, "uuid", 3, 123123123123L, 1);
-		assertTrue(Aggregator.getAggregatorTags(message, true) != null);		
-	}
-
-	public void test_on_context() {
-		MessageMulticaster multicaster = new MessageMulticaster();
-		Message message = MessageFactory.getInstance().getMessage();
-		
-		assertTrue(Aggregator.getAggregatorTags(message, false) == null);		
-		multicaster.addAggregationDetails(message, "uuid", 3, 123123123123L, 1);
-		assertTrue(Aggregator.getAggregatorTags(message, false) != null);		
-	}
-}

Copied: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java (from rev 33515, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/tests/src/org/jboss/soa/esb/client/MessageMulticasterUnitTest.java	2010-08-11 16:47:32 UTC (rev 34642)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.client;
+
+import org.jboss.soa.esb.actions.Aggregator;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:tom.fennelly at gmail.com">tom.fennelly at gmail.com</a>
+ */
+public class MessageMulticasterUnitTest extends TestCase {
+
+	public void test_on_properties() {
+		MessageMulticaster multicaster = new MessageMulticaster();
+		Message message = MessageFactory.getInstance().getMessage();
+		
+		multicaster.setAggregatorOnProperties(true);
+		
+		assertTrue(Aggregator.getAggregatorTags(message, true) == null);		
+		multicaster.addAggregationDetails(message, "uuid", 3, 123123123123L, 1);
+		assertTrue(Aggregator.getAggregatorTags(message, true) != null);		
+	}
+
+	public void test_on_context() {
+		MessageMulticaster multicaster = new MessageMulticaster();
+		Message message = MessageFactory.getInstance().getMessage();
+		
+		assertTrue(Aggregator.getAggregatorTags(message, false) == null);		
+		multicaster.addAggregationDetails(message, "uuid", 3, 123123123123L, 1);
+		assertTrue(Aggregator.getAggregatorTags(message, false) != null);		
+	}
+}



More information about the jboss-svn-commits mailing list