[jboss-svn-commits] JBL Code SVN: r13186 - in labs/jbossesb/trunk/product/rosetta: src/org/jboss/soa/esb/listeners/config/mappers and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jul 6 15:58:35 EDT 2007


Author: tcunning
Date: 2007-07-06 15:58:35 -0400 (Fri, 06 Jul 2007)
New Revision: 13186

Added:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionStatusBean.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java
Modified:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/AbstractManagedLifecycle.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleController.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleControllerMBean.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounter.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounterMBean.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
Log:
bug:JBESB-544
Took some feedback from Burr Sutter and split the Service message counts out
so that we can have counts by individual action.    Changed the object name of 
ListenerControllers, added XML to ListenerController.     Also, added the
is-gateway flag to the ConfigTree if it's a gateway and fixed GeneratorUnitTest
and its serialized XML so that the change didn't break tests.


Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -52,6 +52,7 @@
     public static final String TARGET_SERVICE_CATEGORY_TAG	= "target-service-category";
 	public static final String TARGET_SERVICE_NAME_TAG	    = "target-service-name";
 	public static final String GATEWAY_CLASS_TAG            = "gatewayClass";
+	public static final String IS_GATEWAY_TAG				= "is-gateway";
 	
 	/** Listeners */
 	public static final String LISTENER_CLASS_TAG            = "listenerClass";
@@ -72,6 +73,7 @@
     public static final String GATEWAY_WAIT_MILLIS_TAG 		= "max-millis-for-response";
     /** Routing */
     public static final String DESTINATION_NAME_TAG         = "destination-name";
+    public static final String DESTINATION_TYPE_TAG 		= "destination-type";
     /** Content Based Routing */
     /** RuleSet reference (Filename) */
     public static final String CBR_CLASS                    = "cbrClass";

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -21,6 +21,7 @@
 
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
 import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
 import org.jboss.soa.esb.listeners.config.JbrBusDocument.JbrBus;
 import org.jboss.soa.esb.listeners.config.JbrListenerDocument.JbrListener;
@@ -67,6 +68,8 @@
             String host = provider.getHost();
 
             listenerNode.setAttribute("gatewayClass", JBossRemotingGatewayListener.class.getName());
+			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+
             if(host != null) {
                 listenerNode.setAttribute(JBossRemotingGatewayListener.JBR_SERVER_HOST, host);
             }

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -78,7 +78,10 @@
 		// Map the <property> elements targeted at the listener - from the listener itself.
 		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
 		if(listener.getIsGateway()) {
+
 			listenerNode.setAttribute("gatewayClass", JmsGatewayListener.class.getName());
+			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+
 			// Map EPR related attributes onto the listener - from the bus and provider and listener.
 			// Note: This will change - the Gateways will also support the EPR element...
 			mapJmsEprProperties(listenerNode, provider, messageFilter);
@@ -86,9 +89,11 @@
 		} else {
 			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
 
+			
 			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
 			mapJmsEprProperties(eprNode, provider, messageFilter);
 			eprNode.setAttribute(ListenerTagNames.PROTOCOL_TAG, JMSEpr.JMS_PROTOCOL);
+
 			MapperUtil.mapEPRProperties(listener, eprNode, model);
 			// Remove any empty attributes set on the EPR config...
 			YADOMUtil.removeEmptyAttributes(eprNode);

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -78,12 +78,15 @@
 		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);			
 		if(listener.getIsGateway()) {
 			listenerNode.setAttribute("gatewayClass", SqlTableGatewayListener.class.getName());
+			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+
 			// Map EPR related attributes onto the listener - from the bus and provider and listener.
 			// Note: This will change - the Gateways will also support the EPR element...
 			mapSqlEprProperties(listenerNode, provider, messageFilter);
 			MapperUtil.mapEPRProperties(listener, listenerNode, model);
 		} else {
 			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
+
 			// Map EPR related attributes onto the EPR - from the bus and provider and listener...
 			mapSqlEprProperties(eprNode, provider, messageFilter);
 			MapperUtil.mapEPRProperties(listener, eprNode, model);

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -66,10 +66,15 @@
 		MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
 
 		if(listener.getIsGateway()) {
+			listenerNode.setAttribute(ListenerTagNames.IS_GATEWAY_TAG, Boolean.toString(listener.getIsGateway()));
+			
 			MapperUtil.mapEPRProperties(listener, listenerNode, model);
+
 		} else {
+
 			Element eprNode = YADOMUtil.addElement(listenerNode, ListenerTagNames.EPR_TAG);
 			MapperUtil.mapEPRProperties(listener, eprNode, model);
+
 			// Remove any empty attributes set on the EPR config...
 			YADOMUtil.removeEmptyAttributes(eprNode);
 		}

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/AbstractManagedLifecycle.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/AbstractManagedLifecycle.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/AbstractManagedLifecycle.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -78,6 +78,8 @@
      */
     private ConfigTree config;
 
+    private LifecycleController lifecycleController;
+    
     /**
      * Construct the managed lifecycle.
      * @param config The configuration associated with this instance.
@@ -107,8 +109,10 @@
 
         this.config = config;
         
-        LifecycleController lc = new LifecycleController(this, config);
-        lc.registerMBean();
+
+        lifecycleController = new LifecycleController(this, config);
+        lifecycleController.registerMBean();
+
     }
     
     /**
@@ -163,10 +167,12 @@
         {
             doStart() ;
             changeState(ManagedLifecycleState.STARTED) ;
+            lifecycleController.setStartTime(System.currentTimeMillis());
         }
         catch (final ManagedLifecycleException mle)
         {
-            changeState(ManagedLifecycleState.STOPPED) ;
+            changeState(ManagedLifecycleState.STOPPED);
+            lifecycleController.unsetStartTime();
             throw mle ;
         }
         catch (final Exception ex)
@@ -214,6 +220,7 @@
         finally
         {
             changeState(ManagedLifecycleState.STOPPED) ;
+            lifecycleController.unsetStartTime();
         }
     }
 
@@ -252,6 +259,7 @@
         finally
         {
             changeState(ManagedLifecycleState.DESTROYED) ;
+            lifecycleController.unsetStartTime();
         }
     }
 

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleController.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleController.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleController.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -21,6 +21,7 @@
  */
 package org.jboss.soa.esb.listeners.lifecycle;
 
+import java.sql.Timestamp;
 import java.util.Iterator;
 import java.util.Set;
 import java.util.SortedSet;
@@ -56,7 +57,17 @@
 public class LifecycleController implements DynamicMBean {
 	private ManagedLifecycle m_lifecycle;
 	private ConfigTree m_config;
+	private String m_startTime;
 	
+	public static final String LIFECYCLESTATE_ATTRIB = "LifeCycleState";
+	public static final String STARTTIME_ATTRIB = "StartTime";
+	public static final String XML_ATTRIB = "ListenerXMLAsHtml";
+	
+	public static final String INIT_ACTION = "initialise";
+	public static final String START_ACTION = "start";
+	public static final String STOP_ACTION = "stop";
+	public static final String DESTROY_ACTION = "destroy";
+		
 	/**
 	 * Constructor using lifecycle and config tree.
 	 * @param f_lifecycle lifecycle
@@ -65,9 +76,26 @@
 	public LifecycleController(ManagedLifecycle f_lifecycle, ConfigTree f_configtree) {
 		m_lifecycle = f_lifecycle;
 		m_config = f_configtree;
+		m_startTime = "";
 	}
 
 	/**
+	 * StartTime mutator.
+	 * @param f_startTime start time
+	 */
+	protected void setStartTime(long f_startTime) {
+		Timestamp ts = new Timestamp(f_startTime);
+		m_startTime = ts.toString();
+	}
+	
+	/**
+	 * 
+	 */
+	protected void unsetStartTime() {
+		m_startTime = "";
+	}
+	
+	/**
 	 * Lifecycle mutator.
 	 * @param f_aml lifecycle
 	 */
@@ -75,6 +103,14 @@
 		m_lifecycle = f_aml;
 	}
 
+    /**
+     * Gets the configtree XML as escaped HTML.
+     * @return configtree XML
+     */
+    public String getListenerXMLAsHtml() {
+    	return m_config.toXml().replace("<", "&lt;").replace(">", "&gt;");
+    }
+	
 	/**
 	 * ConfigTree mutator.
 	 * @param f_ct config tree
@@ -110,7 +146,7 @@
 	public void stop() throws ManagedLifecycleException {
 		m_lifecycle.stop();
 	}
-		
+	
 	/**
 	 * Register this MBean with JBoss.
 	 */
@@ -126,19 +162,35 @@
 		
 		ObjectName listObjectName = null;
 		try {
-			String name = m_config.getName();
+			String categoryName = m_config.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+			String serviceName = m_config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+			String listenerName = m_config.getName();
 
-			String serviceName = m_config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
-			String targetName = m_config.getAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG);
+			StringBuffer objectName = new StringBuffer();
+			if (categoryName != null) {
+				objectName.append(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG + "=" + categoryName);
+			}
+			
 			if (serviceName != null) {
-				listObjectName = new ObjectName("jboss.esb:name=" + name 
-						+ "," + ListenerTagNames.SERVICE_NAME_TAG + "=" + serviceName);
-			} else if (targetName != null) {
-				listObjectName = new ObjectName("jboss.esb:name=" + name
-						+ "," + ListenerTagNames.TARGET_SERVICE_NAME_TAG + "=" + targetName );				
-			} else {
-				listObjectName = new ObjectName("jboss.esb:name=" + name);
+				if (objectName.length() > 0) {
+					objectName.append(",");
+				}
+				objectName.append(ListenerTagNames.SERVICE_NAME_TAG + "=" + serviceName);
 			}
+			
+			if (listenerName != null) {
+				if (objectName.length() > 0) {
+					objectName.append(",");
+				}
+				if ("true".equals(m_config.getAttribute(ListenerTagNames.IS_GATEWAY_TAG))) {
+					objectName.append("gateway-name=" + listenerName);
+				} else {
+					objectName.append("listener-name=" +  listenerName);					
+				}
+				
+			}
+			
+			listObjectName = new ObjectName("jboss.esb:" + objectName.toString());
 		} catch (MalformedObjectNameException e1) {
 			e1.printStackTrace();
 		} catch (NullPointerException e1) {
@@ -167,7 +219,8 @@
 	}
 
 	/**
-	 * Gets the list of attributes.    We return all Lifecycle attributes from 
+	 * Gets the list of attributes.    We return all Lifecycle attributes from the ConfigTree, 
+	 * and the start time, configtree XML, and the lifecycle state.
 	 */
 	public AttributeList getAttributes(String[] arg0) {
 		AttributeList attributeList = new AttributeList();
@@ -179,9 +232,15 @@
 		}
 		
 		// Add lifecycle state to the list of properties
-		Attribute lifecycleState = new Attribute("LifecycleState", m_lifecycle.getState().toString());
+		Attribute lifecycleState = new Attribute(LIFECYCLESTATE_ATTRIB, m_lifecycle.getState().toString());
 		attributeList.add(lifecycleState);
 		
+		Attribute startTimeAttrib = new Attribute(STARTTIME_ATTRIB, m_startTime);
+		attributeList.add(startTimeAttrib);
+		
+		Attribute xmlAttrib = new Attribute(XML_ATTRIB, getListenerXMLAsHtml());
+		attributeList.add(xmlAttrib);
+		
 		return attributeList;
 	}
 
@@ -190,8 +249,12 @@
 	 */
     public synchronized String getAttribute(String name) throws AttributeNotFoundException {
     	String value = null;
-    	if (name.equals("LifecycleState")) {
+    	if (name.equals(LIFECYCLESTATE_ATTRIB)) {
         	value = m_lifecycle.getState().toString();
+        } else if (name.equals(STARTTIME_ATTRIB)) {
+        	value = m_startTime.toString();
+        } else if (name.equals(XML_ATTRIB)) {
+        	value = getListenerXMLAsHtml();
         } else {
         	value = m_config.getAttribute(name);
         }
@@ -211,7 +274,9 @@
 		SortedSet<String> names = new TreeSet<String>();
         for (Object name : m_config.getAttributeNames())
             names.add((String) name);
-        names.add("LifecycleState");
+        names.add(LIFECYCLESTATE_ATTRIB);
+        names.add(STARTTIME_ATTRIB);
+        names.add(XML_ATTRIB);
         MBeanAttributeInfo[] attrs = new MBeanAttributeInfo[names.size()];
         Iterator<String> it = names.iterator();
         for (int i = 0; i < attrs.length; i++) {
@@ -220,18 +285,19 @@
                     name, "java.lang.String", "Property " + name, true, false, false);
         }
         MBeanOperationInfo[] opers = {
+        	new MBeanOperationInfo(
+        			INIT_ACTION, "Initialise the lifecycle",
+                	null, "void", MBeanOperationInfo.ACTION),
             new MBeanOperationInfo(
-            		"start", "Start the lifecycle",
+            		START_ACTION, "Start the lifecycle",
                     null, "void", MBeanOperationInfo.ACTION),
+
             new MBeanOperationInfo(
-                    "initialise", "Initialise the lifecycle",
+            		STOP_ACTION, "Stop the lifecycle",
                     null, "void", MBeanOperationInfo.ACTION),
             new MBeanOperationInfo(
-            		"stop", "Stop the lifecycle",
+            		DESTROY_ACTION, "Destroy the lifecycle",
                     null, "void", MBeanOperationInfo.ACTION),
-            new MBeanOperationInfo(
-            		"destroy", "Destroy the lifecycle",
-                    null, "void", MBeanOperationInfo.ACTION),
         };
         return new MBeanInfo(
                 this.getClass().getName(), "Lifecycle Controller MBean",
@@ -245,28 +311,28 @@
      * an exception.
      */
 	public Object invoke(String method, Object[] arg1, String[] arg2) throws MBeanException, ReflectionException {
-		if (method.equalsIgnoreCase("start")) {
+		if (method.equalsIgnoreCase(START_ACTION)) {
 			try {
 				start();
 			} catch (ManagedLifecycleException e) {
 				throw new MBeanException(e);
 			}
 			return "Invoking the " + method + " on the lifecycle.";
-		} else if (method.equalsIgnoreCase("initialise")) {
+		} else if (method.equalsIgnoreCase(INIT_ACTION)) {
 			try {
 				initialise();
 			} catch (ManagedLifecycleException e) {
 				throw new MBeanException(e);
 			}
 			return "Invoking the " + method + " on the lifecycle.";
-		} else if (method.equalsIgnoreCase("stop")) {
+		} else if (method.equalsIgnoreCase(STOP_ACTION)) {
 			try {
 				stop();
 			} catch (ManagedLifecycleException e) {
 				throw new MBeanException(e);
 			}
 			return "Invoking the " + method + " on the lifecycle.";
-		} else if (method.equalsIgnoreCase("destroy")) {
+		} else if (method.equalsIgnoreCase(DESTROY_ACTION)) {
 			try {
 				destroy();
 			} catch (ManagedLifecycleException e) {
@@ -290,7 +356,6 @@
 	 * not used because all of the attributes provided are read-only.
 	 */
 	public AttributeList setAttributes(AttributeList arg0) {
-		// TODO Auto-generated method stub
 		return null;
 	}	
 }

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleControllerMBean.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleControllerMBean.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/LifecycleControllerMBean.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -28,7 +28,6 @@
  * @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
  */
 public interface LifecycleControllerMBean {
-	
 	public void initialise() throws ManagedLifecycleException;
 	public void start() throws ManagedLifecycleException;
 	public void stop() throws ManagedLifecycleException;

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -70,6 +70,11 @@
 	private final AtomicBoolean active = new AtomicBoolean(false);
 
 	/**
+	 * 
+	 */
+	private ServiceMessageCounter serviceMessageCounter;
+	
+	/**
 	 * public constructor
 	 * 
 	 * @param config
@@ -94,10 +99,13 @@
 
 		final ArrayList<ActionPipelineProcessor> processorList = new ArrayList<ActionPipelineProcessor>();
 
+		serviceMessageCounter = new ServiceMessageCounter(config);
+		serviceMessageCounter.registerMBean();
+		
 		for (final ConfigTree actionConfig : actionList)
 		{
 			final String actionClassTag = actionConfig
-					.getAttribute(ListenerTagNames.ACTION_CLASS_TAG);
+ 					.getAttribute(ListenerTagNames.ACTION_CLASS_TAG);
 			if (LOGGER.isDebugEnabled())
 			{
 				LOGGER.debug("Registering action class " + actionClassTag);
@@ -228,7 +236,7 @@
 	public boolean process(final Message message)
 	{
 		final EPR faultToAddress = getFaultToAddress(message);
-		long start = System.currentTimeMillis();
+		long start = System.nanoTime();
 		
 		if (active.get())
 		{
@@ -288,12 +296,16 @@
 						faultTo(faultToAddress, Factory.createErrorMessage(Factory.UNEXPECTED_ERROR, message, ex));
 					}
 
-					long procTime = System.currentTimeMillis() - start;
+					long procTime = System.nanoTime() - start;
+					serviceMessageCounter.update(new ActionStatusBean(procTime, count,
+							ActionStatusBean.ACTION_FAILED));
 		        	DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message, 
 		        			MessageStatusBean.MESSAGE_FAILED));
 					
 					return false;
 				}
+				serviceMessageCounter.update(new ActionStatusBean((System.nanoTime() - start), count,
+						ActionStatusBean.ACTION_SENT));
 			}
 
 			// Reply...
@@ -303,7 +315,7 @@
 			}
 
 			notifySuccess(messages);
-			long procTime = System.currentTimeMillis() - start;
+			long procTime = System.nanoTime() - start;
         	DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message, 
         			MessageStatusBean.MESSAGE_SENT));
 			return true;
@@ -313,7 +325,7 @@
 			LOGGER.debug("pipeline process disabled for message");
 
 			faultTo(faultToAddress, Factory.createErrorMessage(Factory.NOT_ENABLED, message, null));
-			long procTime = System.currentTimeMillis() - start;
+			long procTime = System.nanoTime() - start;
         	DeliveryObservableLogger.getInstance().logMessage(new MessageStatusBean(procTime, message, 
         			MessageStatusBean.MESSAGE_FAILED));
         	

Added: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionStatusBean.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionStatusBean.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionStatusBean.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -0,0 +1,75 @@
+/*
+ * 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.listeners.message;
+
+/**
+ * ActionStatusBean is a bean which wraps the information necessary to update the
+ * ServiceMessageCounter MBean.
+ * 
+ * @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
+ * @since Version 4.2
+ */
+public class ActionStatusBean {
+	private int m_procCount;
+	private String m_status;
+	private long m_procTime;
+	
+	public static final String ACTION_SENT = "SENT";
+	public static final String ACTION_FAILED = "FAILED";
+	
+	/**
+	 * Constructor
+	 * @param procTime processing time
+	 * @param f_procCount counter that identifies the action processor in the ConfigTree
+	 * @param f_status status string
+	 */
+	public ActionStatusBean(long procTime, int f_procCount, String f_status) {
+		m_procTime = procTime;
+		m_procCount = f_procCount;
+		m_status = f_status;
+	}
+	
+	/**
+	 * Process counter getter.
+	 * @return counter that identifies the action processor in the ConfigTree
+	 */
+	public int getProcCount() {
+		return m_procCount;
+	}
+	
+	/**
+	 * Status getter.
+	 * @return status of action process
+	 */
+	public String getStatus() {
+		return m_status;
+	}
+	
+	/**
+	 * Processing Time getter.
+	 * @return processing time elapsed
+	 */
+	public long getProcTime() {
+		return m_procTime;
+	}
+}

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounter.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounter.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounter.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -35,7 +35,8 @@
  */
 public class MessageCounter extends ServiceMBeanSupport implements MessageCounterMBean, Observer {
 
-	private String lastMessageTime;
+	private String lastSuccessfulMessageTime;
+	private String lastFailedMessageTime;
 	private int failedMessageCount;
 	private int successMessageCount;
 	private long totalProcessTime;
@@ -61,11 +62,23 @@
 	 * Get the time the last message was processed at.
 	 * @return time the last message was processed at
 	 */
-	public String getLastMessageTime() {
-		return lastMessageTime;
+	public String getLastSuccessfulMessageTime() {
+		return lastSuccessfulMessageTime;
 	}
 
 	/**
+	 * Get the time the last message was processed at.
+	 * @return time the last message was processed at
+	 */
+	public String getLastFailedMessageTime() {
+		if (lastFailedMessageTime != null) {
+			return lastFailedMessageTime;
+		} else {
+			return "No messages failed";
+		}
+	}
+	
+	/**
 	 * Get the total number of processed messages, both successful and failed.
 	 * @return total number of processed messages
 	 */
@@ -92,11 +105,13 @@
 		
 		if (msb.getMessageStatus().equals(MessageStatusBean.MESSAGE_SENT)) {
 			successMessageCount++;
+			Timestamp ts = new Timestamp(msb.getMessageTime());
+			lastSuccessfulMessageTime = ts.toString();
 		} else if (msb.getMessageStatus().equals(MessageStatusBean.MESSAGE_FAILED)) {
 			failedMessageCount++;
+			Timestamp ts = new Timestamp(msb.getMessageTime());
+			lastFailedMessageTime = ts.toString();
 		}
-		Timestamp ts = new Timestamp(msb.getMessageTime());
-		lastMessageTime = ts.toString();
 		
 		totalProcessTime += msb.getProcessTime();
         byte[] byteArray = msb.getMessage().getBody().getByteArray();
@@ -110,11 +125,12 @@
 	 * Get the average time to process a message.
 	 * @return average time to process a message 
 	 */
-	public long getAverageTime() {
-		if ((successMessageCount + failedMessageCount ) > 0) {
-			return (totalProcessTime / (successMessageCount + failedMessageCount));
+	public String getAverageSuccessTime() {
+		if ((successMessageCount) > 0) {
+			double ms = (double) totalProcessTime / (1000000 * successMessageCount);
+			return ms + " ms";
 		} else {
-			return 0;
+			return "No successful messages processed.";
 		}
 	}
 
@@ -122,9 +138,9 @@
 	 * Get the average bytes of the processed messages.
 	 * @return average bytes of the messages processed
 	 */
-	public long getAverageBytes() {
-		if ((successMessageCount + failedMessageCount) > 0 ) {
-			return (totalBytes / (successMessageCount + failedMessageCount));			
+	public long getAverageSuccessBytes() {
+		if ((successMessageCount) > 0 ) {
+			return (totalBytes / (successMessageCount));			
 		} else {
 			return 0;
 		}
@@ -134,7 +150,8 @@
 	 * Reset the counts - this resets the totals and the last message time. 
 	 */
 	public void resetCounts() {
-		lastMessageTime = null;
+		lastSuccessfulMessageTime = null;
+		lastFailedMessageTime = null;
 		successMessageCount = 0;
 		failedMessageCount = 0;
 		totalProcessTime = 0;

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounterMBean.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounterMBean.java	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounterMBean.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -36,11 +36,13 @@
 	
 	public int getFailedMessageCount();
 	
-	public String getLastMessageTime();
+	public String getLastSuccessfulMessageTime();
 
-	public long getAverageTime();
+	public String getLastFailedMessageTime();
 	
-	public long getAverageBytes();
+	public String getAverageSuccessTime();
 	
+	public long getAverageSuccessBytes();
+	
 	public void resetCounts();
 }

Added: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/ServiceMessageCounter.java	2007-07-06 19:58:35 UTC (rev 13186)
@@ -0,0 +1,344 @@
+/*
+ * 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.listeners.message;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.AttributeNotFoundException;
+import javax.management.DynamicMBean;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.InstanceNotFoundException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanException;
+import javax.management.MBeanInfo;
+import javax.management.MBeanOperationInfo;
+import javax.management.MBeanRegistrationException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+
+/**
+ * Service message counter is a MBean that displays an action-by-action breakdown of
+ * how many failed and successful messages have been processed and shows the processing time
+ * of each.
+ * 
+ * @author <a href="mailto:tcunning at redhat.com">tcunning at redhat.com</a>
+ * @since Version 4.2
+ */
+public class ServiceMessageCounter implements DynamicMBean {
+	private HashMap<String, Integer> actionCounterHash;
+	private HashMap<String, Integer> actionFailedCounterHash;
+	private HashMap<String, Long> actionProcessTimeHash;
+	private ConfigTree m_config;
+	private ConfigTree[] actionArray;
+	
+	public static final String RESET_COUNTER = "resetCounter";
+	private static final String MESSAGE_COUNTER = "messages successfully processed";
+	private static final String FAILED_MESSAGE_COUNTER = "messages failed";
+	private static final String PROCESSING_TIME = "processing time";
+
+	/**
+	 * Constructor
+	 * @param f_config config tree
+	 */
+	public ServiceMessageCounter(ConfigTree f_config) {
+		actionCounterHash = new HashMap<String, Integer>();
+		actionFailedCounterHash = new HashMap<String, Integer>();
+		actionProcessTimeHash = new HashMap<String, Long>();
+		
+		m_config = f_config;
+		actionArray = m_config.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
+
+		initHashes();
+	}
+	
+	/**
+	 * Return an action id.   If there's an action name, use that, if not,
+	 * use the "action" attribute on the action.
+	 * @param ct config tree
+	 * @return action id
+	 */
+	public String getActionId(ConfigTree ct) {
+		if (ct.getAttribute("name") != null) {
+			return ct.getAttribute("name");
+		} else if (ct.getAttribute("action") != null) {
+			return ct.getAttribute("action");
+		}
+		return null;
+	}
+	
+	/**
+	 * Initialize the hashes by setting the counts and the processing time to an initial value of 0. 
+	 */
+	public void initHashes() {
+		ConfigTree[] actionList = m_config.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
+		
+		for (ConfigTree actionConfig : actionList) {
+			String actionId = getActionId(actionConfig);
+		 	actionCounterHash.put(actionId + " " + MESSAGE_COUNTER, new Integer(0));
+			actionFailedCounterHash.put(actionId + " " + FAILED_MESSAGE_COUNTER, new Integer(0));
+			actionProcessTimeHash.put(actionId + " " + PROCESSING_TIME, new Long(0));
+		}		
+	}
+	
+	/**
+	 * Reset the counters - set all the entries in the action counter hash 
+	 * and in the action process time hash to zero.
+	 */
+	public void resetCounter() {
+		for (String key : actionCounterHash.keySet()) {
+			actionCounterHash.put(key + " " + MESSAGE_COUNTER, new Integer(0));
+		}
+		
+		for (String key : actionFailedCounterHash.keySet()) {
+			actionFailedCounterHash.put(key + " " + FAILED_MESSAGE_COUNTER, new Integer(0));
+		}
+		
+		for (String key : actionProcessTimeHash.keySet()) {
+			actionProcessTimeHash.put(key + " " + PROCESSING_TIME, new Long(0));
+		}
+	}
+	
+	/**
+	 *  This creates the MBeanInfo object provided.     We are returning generic 
+	 *  text for the attribute descriptions (the word Property and the name of the 
+	 *  attribute), all of the attributes are read-only, and we provide four 
+	 *  invocation methods - start/stop/initialise/destroy on the Lifecycle. 
+	 */
+    public MBeanInfo getMBeanInfo() {
+		SortedSet<String> names = new TreeSet<String>();
+		
+		for (String key : actionCounterHash.keySet()) {
+			names.add(key);
+		}
+		
+		for (String key : actionProcessTimeHash.keySet()) {
+			names.add(key);
+		}
+		
+		for (String key : actionFailedCounterHash.keySet()) {
+			names.add(key);
+		}
+		
+        MBeanAttributeInfo[] attrs = new MBeanAttributeInfo[names.size()];
+        Iterator<String> it = names.iterator();
+        for (int i = 0; i < attrs.length; i++) {
+            String name = it.next();
+            attrs[i] = new MBeanAttributeInfo(
+                    name, "java.lang.String", "Property " + name, true, false, false);
+        }
+        MBeanOperationInfo[] opers = {
+        	new MBeanOperationInfo(
+        			RESET_COUNTER, "Reset the counter",
+                	null, "void", MBeanOperationInfo.ACTION)
+        };
+        return new MBeanInfo(
+                this.getClass().getName(), "Service Message Counter MBean",
+                attrs, null, opers, null); // notifications
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.management.DynamicMBean#getAttribute(java.lang.String)
+	 */
+	public Object getAttribute(String key) throws AttributeNotFoundException, MBeanException, ReflectionException {
+    	String value = null;
+    	
+    	if (actionCounterHash.containsKey(key)) {
+    		value = actionCounterHash.get(key).toString();
+    	} else if (actionProcessTimeHash.containsKey(key)) {
+    		Long processTotal = actionProcessTimeHash.get(key);
+    		String actionId = key.substring(0, key.indexOf(PROCESSING_TIME)-1);
+    		Integer successCount = actionCounterHash.get(actionId + " " + MESSAGE_COUNTER);
+    		value = "-----";
+    		if (successCount.intValue() > 0) {
+    			value = ((double) processTotal / successCount.intValue()) + " ns";
+    		}
+    	} else if (actionFailedCounterHash.containsKey(key)) {
+    		value = actionFailedCounterHash.get(key).toString();
+    	}
+
+    	if (value != null)
+            return value;
+        else
+            throw new AttributeNotFoundException("No such property: " + key);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.management.DynamicMBean#getAttributes(java.lang.String[])
+	 */
+	public AttributeList getAttributes(String[] arg0) {
+		AttributeList attributeList = new AttributeList();
+		for (String key : actionCounterHash.keySet()) {
+			Attribute at = new Attribute(key, actionCounterHash.get(key).toString());
+			attributeList.add(at);
+		}
+		
+		for (String key : actionProcessTimeHash.keySet()) {
+			Long processTotal = actionProcessTimeHash.get(key);
+			String actionId = key.substring(0, key.indexOf(PROCESSING_TIME));
+			Integer successCount = actionCounterHash.get(actionId + " " + MESSAGE_COUNTER);
+			String avgTime = "-----";
+			if (successCount.intValue() > 0) {
+				avgTime = ((double) processTotal / successCount.intValue()) + " ns";
+			}
+			Attribute at = new Attribute(key, avgTime);
+			attributeList.add(at);
+		}
+		
+		for (String key : actionFailedCounterHash.keySet()) {
+			Attribute at = new Attribute(key, actionFailedCounterHash.get(key).toString());
+			attributeList.add(at);
+		}
+
+		return attributeList;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.management.DynamicMBean#invoke(java.lang.String, java.lang.Object[], java.lang.String[])
+	 */
+	public Object invoke(String method, Object[] arg1, String[] arg2) throws MBeanException, ReflectionException {
+		if (method.equalsIgnoreCase(RESET_COUNTER)) {
+				resetCounter();
+			return "Invoking the " + method + " on the lifecycle.";
+		} else {
+			throw new ReflectionException(new NoSuchMethodException(method));
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.management.DynamicMBean#setAttribute(javax.management.Attribute)
+	 */
+	public void setAttribute(Attribute arg0) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException {
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.management.DynamicMBean#setAttributes(javax.management.AttributeList)
+	 */
+	public AttributeList setAttributes(AttributeList arg0) {
+		return null;
+	}
+
+	/**
+	 * Register this MBean with JBoss.
+	 */
+	protected void registerMBean() {
+		MBeanServer mbeanServer = null;
+		try {
+			mbeanServer = MBeanServerLocator.locateJBoss();
+		} catch (IllegalStateException ise) {
+			// If we can't find a JBoss MBeanServer, just return
+			// Needed for unit tests
+			return;
+		}
+		
+		ObjectName listObjectName = null;
+		try {
+			String categoryName = m_config.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+			String serviceName = m_config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+			String listenerName = m_config.getName();
+
+			StringBuffer objectName = new StringBuffer("category=MessageCounter,");
+			if (categoryName != null) {
+				objectName.append(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG + "=" + categoryName);
+			}
+			
+			if (serviceName != null) {
+				if (objectName.length() > 0) {
+					objectName.append(",");
+				}
+				objectName.append(ListenerTagNames.SERVICE_NAME_TAG + "=" + serviceName);
+			}
+			
+			if (listenerName != null) {
+				if (objectName.length() > 0) {
+					objectName.append(",");
+				}
+				if ("true".equals(m_config.getAttribute(ListenerTagNames.IS_GATEWAY_TAG))) {
+					objectName.append("gateway-name=" + listenerName);
+				} else {
+					objectName.append("listener-name=" +  listenerName);					
+				}
+				
+			}
+			
+			listObjectName = new ObjectName("jboss.esb:" + objectName.toString());
+		} catch (MalformedObjectNameException e1) {
+			e1.printStackTrace();
+		} catch (NullPointerException e1) {
+			e1.printStackTrace();
+		}
+		
+		if (mbeanServer.isRegistered(listObjectName)) {
+	    	try {
+	    		mbeanServer.unregisterMBean(listObjectName);
+			} catch (InstanceNotFoundException e) {
+				e.printStackTrace();
+			} catch (MBeanRegistrationException e) {
+				e.printStackTrace();
+			}
+        }
+		
+	    try {
+	    	mbeanServer.registerMBean(this, listObjectName);
+		} catch (InstanceAlreadyExistsException e) {
+			e.printStackTrace();
+		} catch (MBeanRegistrationException e) {
+			e.printStackTrace();
+		} catch (NotCompliantMBeanException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	/**
+	 * Update the ServiceMessageCounter
+	 * @param asb ActionStatusBean
+	 */
+	public void update(ActionStatusBean asb) {		
+		String actionName = getActionId(actionArray[asb.getProcCount()]); 
+
+		if (ActionStatusBean.ACTION_SENT.equals(asb.getStatus())) {
+			Integer count = actionCounterHash.get(actionName + " " + MESSAGE_COUNTER);
+			count = count.intValue() + 1;
+			actionCounterHash.put(actionName + " " + MESSAGE_COUNTER, count);
+			Long time = actionProcessTimeHash.get(actionName + " " + PROCESSING_TIME);
+			time = time.longValue() + asb.getProcTime();
+			actionProcessTimeHash.put(actionName + " " + PROCESSING_TIME, time);
+		} else if (ActionStatusBean.ACTION_FAILED.equals(asb.getStatus())) {
+			Integer count = actionFailedCounterHash.get(actionName + " " + FAILED_MESSAGE_COUNTER);
+			count = count.intValue() + 1;
+			actionFailedCounterHash.put(actionName + " " + FAILED_MESSAGE_COUNTER, count);
+		}		
+	}
+}

Modified: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml	2007-07-06 19:58:35 UTC (rev 13186)
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><!--	NOTE: DO NOT MODIFY	This file was auto-generated.--><jbossesb-listeners parameterReloadSecs="180"><Bank-Listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" protocol="jms"/><action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue">						This is some complex..						<!-- property -->						value.						<xxxx>							boooo							<yyyy/>						</xxxx>						 Some CDATA data...					</action></Bank-Listener><Bank-Listener-Generic listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" my-generic-listener="my-generic-listener#someattribvalue" !
 service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR my-generic-bus="my-generic-bus#someattribvalue" my-generic-provider="my-generic-provider#someattribvalue"/><action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue">						This is some complex..						<!-- property -->						value.						<xxxx>							boooo							<yyyy/>						</xxxx>						 Some CDATA data...					</action></Bank-Listener-Generic><test-ftp-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" pollLatencySeconds="10" service-category="Test2" service-description="FTP server Test" service-name="FTPTest"><EPR URL="ftp://joe:secret@localhost:21/Temp" errorDelete="true" inputSuffix=".txt" passive="false" postDelete="true" workSuffix=".esbInProcess"/><action action="TestFtpRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/></test-ftp-listener><test-sq!
 l-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageA
wareListener" maxThreads="1" pollLatencySeconds="10" service-category="Test3" service-description="SQL server Test" service-name="SQLTest"><EPR URL="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" errorDelete="true" insert_timestamp_column="insert_timestamp" message_column="message" message_id_column="message_id" password="secret" postDelete="true" status_column="status" tablename="testtable" username="joe"/><action action="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/></test-sql-listener></jbossesb-listeners>
+<?xml version="1.0" encoding="UTF-8"?><!--	NOTE: DO NOT MODIFY	This file was auto-generated.--><jbossesb-listeners parameterReloadSecs="180"><Bank-Listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" protocol="jms"/><action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue">						This is some complex..						<!-- property -->						value.						<xxxx>							boooo							<yyyy/>						</xxxx>						 Some CDATA data...					</action></Bank-Listener><Bank-Listener-Generic listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" my-generic-listener="my-generic-listener#someattribvalue" !
 service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR my-generic-bus="my-generic-bus#someattribvalue" my-generic-provider="my-generic-provider#someattribvalue"/><action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue">						This is some complex..						<!-- property -->						value.						<xxxx>							boooo							<yyyy/>						</xxxx>						 Some CDATA data...					</action></Bank-Listener-Generic><test-ftp-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" pollLatencySeconds="10" service-category="Test2" service-description="FTP server Test" service-name="FTPTest"><EPR URL="ftp://joe:secret@localhost:21/Temp" errorDelete="true" inputSuffix=".txt" passive="false" postDelete="true" workSuffix=".esbInProcess"/><action action="TestFtpRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/></test-ftp-listener><test-sq!
 l-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageA
wareListener" maxThreads="1" pollLatencySeconds="10" service-category="Test3" service-description="SQL server Test" service-name="SQLTest"><EPR URL="jdbc:postgresql://myhost:5432/testDB" driver="org.postgresql.Driver" errorDelete="true" insert_timestamp_column="insert_timestamp" message_column="message" message_id_column="message_id" password="secret" postDelete="true" status_column="status" tablename="testtable" username="joe"/><action action="TestSqlRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter"/></test-sql-listener></jbossesb-listeners>
\ No newline at end of file

Modified: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml	2007-07-06 19:39:19 UTC (rev 13185)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml	2007-07-06 19:58:35 UTC (rev 13186)
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><!--	NOTE: DO NOT MODIFY	This file was auto-generated.--><jbossesb-gateways parameterReloadSecs="180"><Bank-JMS-Gateway connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/><Bank-HTTP-Gateway gatewayClass="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" jbr-serverBindAddress="192.168.1.111" jbr-serverBindPort="8765" jbr-serverProtocol="http" maxThreads="1" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/></jbossesb-gateways>        
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><!--	NOTE: DO NOT MODIFY	This file was auto-generated.--><jbossesb-gateways parameterReloadSecs="180"><Bank-JMS-Gateway connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" is-gateway="true" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/><Bank-HTTP-Gateway gatewayClass="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" is-gateway="true" jbr-serverBindAddress="192.168.1.111" jbr-serverBindPort="8765" jbr-serverProtocol="http" maxThreads="1" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliati!
 on"/></jbossesb-gateways>
\ No newline at end of file




More information about the jboss-svn-commits mailing list