[jboss-svn-commits] JBL Code SVN: r21139 - in labs/jbossesb/workspace/dbevenius/security: product and 28 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jul 21 02:32:32 EDT 2008


Author: beve
Date: 2008-07-21 02:32:32 -0400 (Mon, 21 Jul 2008)
New Revision: 21139

Added:
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBRIntegratedUnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/async_response.txt
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-01.xml
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-02.xml
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java
Removed:
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/DisplayMemoryUsageAction.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/DisplayTimeAction.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/converters/FileToStream.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/DisplayMemoryUsageActionUnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/DisplayTimeActionUnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/converters/FileToStreamUnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/jboss-esb.xml
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java
Modified:
   labs/jbossesb/workspace/dbevenius/security/
   labs/jbossesb/workspace/dbevenius/security/product/build.xml
   labs/jbossesb/workspace/dbevenius/security/product/docs/ProgrammersGuide.odt
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/InVMListenerUnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/testutils/ESBConfigUtil.java
   labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/aggregator/build.xml
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/jboss-esb-unfiltered.xml
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/build.xml
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/readme.txt
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_date_manipulation/readme.txt
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_simple/build.xml
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_simple/readme.txt
   labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_stream/build.xml
   labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java
   labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionDiscoveryComponent.java
   labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
   labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/resources/META-INF/rhq-plugin.xml
   labs/jbossesb/workspace/dbevenius/security/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BusinessRulesServiceTest.java
Log:
Merge from main



Property changes on: labs/jbossesb/workspace/dbevenius/security
___________________________________________________________________
Name: svnmerge-integrated
   - /labs/jbossesb/trunk:1-21030
   + /labs/jbossesb/trunk:1-21136

Modified: labs/jbossesb/workspace/dbevenius/security/product/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/build.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/build.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -37,7 +37,7 @@
 	<property name="org.jboss.esb.internal.jar.dest" location="build/jbossesb/lib"/>
 
 	<!-- JBoss ESB version -->
-	<property name="version" value="4.3.GA"/>
+	<property name="version" value="4.4.GA"/>
 	<property name="esb.server.name" value="jbossesb-server-${version}"/>
 	<property name="esbserver.dist.dir" value="${org.jboss.esb.internal.dest}/${esb.server.name}"/>
 

Modified: labs/jbossesb/workspace/dbevenius/security/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -29,14 +29,16 @@
 import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
 import org.jboss.soa.esb.common.TransactionStrategy;
 import org.jboss.soa.esb.common.TransactionStrategyException;
-import org.jboss.soa.esb.couriers.*;
-import org.jboss.soa.esb.listeners.message.errors.Factory;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.couriers.CourierTimeoutException;
+import org.jboss.soa.esb.couriers.CourierTransportException;
+import org.jboss.soa.esb.couriers.FaultMessageException;
 import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.util.Type;
 import org.jboss.soa.esb.util.Util;
 
-import java.io.Reader;
+import java.io.ByteArrayInputStream;
 import java.io.Serializable;
+import java.io.StringReader;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.sql.Blob;
@@ -57,6 +59,8 @@
 
     protected boolean deleteOnSuccess, deleteOnError;
 	protected boolean _isReceiver;
+	
+	private int messageType = Types.OTHER ;
 
     private JDBCEprDBResourceFactory jdbcFactory;
 
@@ -89,7 +93,7 @@
 		deleteOnError = Boolean.TRUE.equals(Boolean.valueOf(epr
 		        .getErrorDelete()));
 
-        jdbcFactory = new JDBCEprDBResourceFactory(epr);
+	        jdbcFactory = new JDBCEprDBResourceFactory(epr);
 	}
 
 	public void cleanup() {
@@ -145,7 +149,34 @@
             PreparedStatement insertStatement = jdbcFactory.createInsertStatement(connection);
             try {
                 insertStatement.setString(1, msgId);
-                insertStatement.setObject(2, serializedMessage);
+                
+                final int type = getMessageType(connection) ;
+                switch(type)
+                {
+                case Types.BLOB:
+                    final byte[] blobData =  serializedMessage.toString().getBytes() ;
+                    final ByteArrayInputStream bais = new ByteArrayInputStream(blobData) ;
+                    insertStatement.setBinaryStream(2, bais, blobData.length) ;
+                    break ;
+                case Types.BINARY:
+                case Types.VARBINARY:
+                case Types.LONGVARBINARY:
+                    final byte[] data = serializedMessage.toString().getBytes() ;
+                    insertStatement.setBytes(2, data) ;
+                    break ;
+                case Types.CLOB:
+                    final String clobData = serializedMessage.toString() ;
+                    final StringReader clobReader = new StringReader(clobData) ;
+                    insertStatement.setCharacterStream(2, clobReader, clobData.length()) ;
+                    break ;
+                case Types.CHAR:
+                case Types.VARCHAR:
+                case Types.LONGVARCHAR:
+                    insertStatement.setString(2, serializedMessage.toString()) ;
+                    break ;
+                default:
+                    insertStatement.setObject(2, serializedMessage);
+                }
                 insertStatement.setString(3, State.Pending.getColumnValue());
                 insertStatement.setLong(4, System.currentTimeMillis());
 
@@ -276,8 +307,6 @@
             selectUpdateStatement.setString(2, State.Pending.getColumnValue());
 
             ResultSet resultSet = selectUpdateStatement.executeQuery();
-            final ResultSetMetaData metaData = resultSet.getMetaData() ;
-            final int type = metaData.getColumnType(1) ;
             try
             {
                 if (resultSet.next())
@@ -287,19 +316,32 @@
                     try
                     {
                         final Serializable value ;
-                        if (type == Types.BLOB)
+                        final int type = getMessageType(resultSet) ;
+                        switch (type)
                         {
+                        case Types.BLOB:
                             final Blob blob = resultSet.getBlob(1) ;
-                            value = StreamUtils.readStreamString(blob.getBinaryStream(), "UTF-8");
-                        }
-                        else if (type == Types.CLOB)
-                        {
+                            final byte[] blobData = StreamUtils.readStream(blob.getBinaryStream()) ;
+                            value = new String(blobData) ;
+                            break ;
+                        case Types.BINARY:
+                        case Types.VARBINARY:
+                        case Types.LONGVARBINARY:
+                            final byte[] binaryData = StreamUtils.readStream(resultSet.getBinaryStream(1)) ;
+                            value = new String(binaryData) ;
+                            break ;
+                        case Types.CLOB:
                             final Clob clob = resultSet.getClob(1) ;
                             value = StreamUtils.readReader(clob.getCharacterStream());
-                        }
-                        else
-                        {
+                            break ;
+                        case Types.CHAR:
+                        case Types.VARCHAR:
+                        case Types.LONGVARCHAR:
+                            value = resultSet.getString(1) ;
+                            break ;
+                        default:
                             value = (Serializable) resultSet.getObject(1);
+                            break ;
                         }
                         result = Util.deserialize(value);
                     }
@@ -411,4 +453,53 @@
         }
         return transactional;
     }
+    
+    private synchronized int getMessageType(final Connection connection)
+        throws SQLException
+    {
+        if (messageType != Types.OTHER)
+        {
+            return messageType ;
+        }
+        
+        final PreparedStatement ps = jdbcFactory.createSelect4UpdateStatement(connection) ;
+        try
+        {
+                ps.setString(1, "");
+                ps.setString(2, State.Pending.getColumnValue());
+
+                final ResultSet resultSet = ps.executeQuery();
+                try
+                {
+                    return getMessageType(resultSet) ;
+                }
+                finally
+                {
+                    try
+                    {
+                        resultSet.close() ;
+                    }
+                    catch (final Throwable th) {} // ignore
+                }
+        }
+        finally
+        {
+            try
+            {
+                ps.close() ;
+            }
+            catch (final Throwable th) {} // ignore
+        }
+    }
+    
+    private synchronized int getMessageType(final ResultSet resultSet)
+        throws SQLException
+    {
+        if (messageType == Types.OTHER)
+        {
+            final ResultSetMetaData metaData = resultSet.getMetaData() ;
+            messageType = metaData.getColumnType(1) ;
+        }
+        return messageType ;
+    }
 }
\ No newline at end of file

Deleted: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/DisplayMemoryUsageAction.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/DisplayMemoryUsageAction.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/DisplayMemoryUsageAction.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,60 +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 org.jboss.soa.esb.message.Message;
-
-/**
- * Simple action that shows JVM memory usage. 
- * </p>
- * Exemple configuration:
- * <pre>
- *&lt;action name="logMemoryUsageAfter" class="org.jboss.soa.esb.actions.DisplayMemoryUsageAction"&gt;
- *&lt;/action&gt;
- * </pre>
- * This action support all configuration properties that {@link LogAction} supports.
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- * @since 4.3
- *
- */
-public class DisplayMemoryUsageAction extends LogAction implements BeanConfiguredAction
-{
-	public Message process( final Message message )
-	{
-		final Runtime runtime = Runtime.getRuntime();
-		final long maxMemory = runtime.maxMemory();
-		final long allocatedMemory = runtime.totalMemory();
-		final long freeMemory = runtime.freeMemory();
-		
-		StringBuilder sb = new StringBuilder();
-		sb.append( "Max mem [" ).append( maxMemory /1024 );
-		sb.append( "], Allocated mem [" ).append( allocatedMemory / 1024 );
-		sb.append( "], Free mem [" ).append( freeMemory / 1024 );
-		sb.append( "], Total Free mem [" ).append( (freeMemory + (maxMemory - allocatedMemory)) / 1024 );
-		sb.append( "]");
-		log( sb.toString() );
-		
-		return message;
-	}
-
-}

Deleted: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/DisplayTimeAction.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/DisplayTimeAction.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/DisplayTimeAction.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,66 +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 java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.jboss.soa.esb.message.Message;
-
-/**
- * Simple action that displays the current time.
- * </p>
- * Exemple configuration:
- * <pre>
- *&lt;action name="displayTime" class="org.jboss.soa.esb.actions.DisplayTimeAction"&gt;
- *	&lt;property name="format" value="HH:mm:ss:S"/&gt;
- *&lt;/action&gt;
- * </pre>
- * This action support all configuration properties that {@link LogAction} supports.
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- * @since 4.3
- *
- */
-public class DisplayTimeAction extends LogAction
-{
-	private String format;
-	
-	public Message process( final Message message )
-	{
-		SimpleDateFormat formatter = format == null ? new SimpleDateFormat() : new SimpleDateFormat( format );
-		log( formatter.format( new Date() ) );
-		
-		return message;
-	}
-
-	public String getFormat()
-	{
-		return format;
-	}
-
-	public void setFormat( String format )
-	{
-		this.format = format;
-	}
-
-}

Deleted: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/converters/FileToStream.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/converters/FileToStream.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/actions/converters/FileToStream.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,128 +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.converters;
-
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.actions.BeanConfiguredAction;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * FileToStream is a converter that open a Stream to the filename
- * specified by the property filename.
- * Usage:
- * <pre>
- * &lt;action name="fileToStream" class="org.jboss.soa.esb.actions.converters.FileToStream"&gt;
- * &lt;/action&gt;
- * 
- * Optional parameters (default value(s) shown):
- *    &lt;proptery name="fileNameLocation" value="org.jboss.soa.esb.gateway.file" /&gt;
- * </pre>
- * Note that 'fileNameLocation' defaults to {@link Environment#ORIGINAL_FILE}
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- *
- */
-public class FileToStream implements BeanConfiguredAction
-{
-	private Logger log = Logger.getLogger( FileToStream.class );
-	
-	private String fileNameLocation;
-	
-	public FileToStream()
-	{
-	}
-	
-	/**
-	 * Populates the ESB Message objects body with a InputStream for
-	 * the file identified by the {@link #fileNameLocation} field.
-	 * 
-	 * @param message 	- ESB message object
-	 * @return Message	- ESB message object which a payload that is an InputStream
-	 * @throws ActionProcessingException
-	 */
-	public Message process( final Message message ) throws ActionProcessingException
-	{
-		BufferedInputStream bin = getInputStream( getFileName( message ) );
-		message.getBody().add( bin );
-		
-		return message;
-	}
-
-	public String getFileNameLocation()
-	{
-		return fileNameLocation;
-	}
-
-	public void setFileNameLocation( final String fileNameLocation )
-	{
-		this.fileNameLocation = fileNameLocation;
-	}
-	
-	private String getFileName (final Message message ) throws ActionProcessingException
-	{
-		String fileName = fileNameLocation == null ? 
-				(String) message.getBody().get() :
-				(String) message.getBody().get( fileNameLocation );
-		
-		log.debug( "FileName : [" + fileName + "]" );
-		
-		if ( fileName == null )
-			throw new ActionProcessingException( "Didn't find a file as in property location [" + fileNameLocation + "] or as the default object in the message body." );
-		
-		return fileName;
-	}
-	
-	private BufferedInputStream getInputStream( final String fileName ) throws ActionProcessingException
-	{
-		BufferedInputStream bin = null;
-		try
-		{
-			bin = new BufferedInputStream( new FileInputStream ( fileName ));
-		} 
-		catch (FileNotFoundException e)
-		{
-			log.error( "FileNotFoundException : ", e);
-			if ( bin != null )
-			{
-				try
-				{
-					bin.close();
-				} 
-				catch (IOException e1)
-				{
-					log.error( "IOException while trying to clone FileInputStream to file : [" + fileName + "]", e1);
-				}
-			}
-			throw new ActionProcessingException( "IOException while creating InputStream for file : [" + fileName + "]", e );
-		}
-		return bin;
-	}
-
-
-}

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -85,13 +85,22 @@
 
         try {
 	        List<Service> services = model.getServices();
-	        HashMap<String, String> hm = new HashMap<String, String>();
+	        HashMap<String, HashMap> hm = new HashMap<String, HashMap>();
 	        for (Service service : services) {
-	        	if (hm.containsKey(service.getName())) {
-	        		throw new ConfigurationException("Service names must be unique.    The service name " + service.getName()
-	        				+ " is already defined within the <services> tag.");
+	        	if (hm.containsKey(service.getCategory())) {
+	        		HashMap<String, String> hc = hm.get(service.getCategory());
+	        		
+	        		if (hc.containsKey(service.getName())) {
+	        			throw new ConfigurationException("Service names must be unique within a category.  "
+	        					+ "The service name " + service.getName()
+	        					+ " is already defined within the " + service.getCategory() + " category.");
+	        		} else {
+	        			hc.put(service.getName(), service.getName());
+	        		}
 	        	} else {
-	        		hm.put(service.getName(), service.getName());
+	        		HashMap <String,String> hc = new HashMap<String,String>();
+	        		hc.put(service.getName(), service.getName());
+	        		hm.put(service.getCategory(), hc);
 	        	}
 	        }
         } catch (ConfigurationException ce) {

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FsListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -51,11 +51,13 @@
 	 * @throws ConfigurationException Invalid listener configuration.
 	 */
 	public static Element map(Element root, FsListener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
 		FsBus bus;
 		FsProvider provider;
-		
-		try {
+
+        listenerNode.setAttribute("name", listener.getName());
+
+        try {
 			bus = (FsBus) model.getBus(listener.getBusidref());
 		} catch (ClassCastException e) {
 			throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <fs-listener> must reference a <fs-bus>.");

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -53,9 +53,11 @@
 	 * @throws ConfigurationException Invalid listener configuration.
 	 */
 	public static Element map(Element root, FtpListener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
 		FtpBus bus;
 		FtpProvider provider;
+
+        listenerNode.setAttribute("name", listener.getName());
 		
 		try {
 			bus = (FtpBus) model.getBus(listener.getBusidref());

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -36,8 +36,10 @@
 public class GroovyListenerMapper {
 
     public static Element map(Element root, GroovyListenerDocument.GroovyListener listener, Generator.XMLBeansModel model) throws ConfigurationException {
-        Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+        Element listenerNode = YADOMUtil.addElement(root, "listener");
 
+        listenerNode.setAttribute("name", listener.getName());
+
         // Map the standard listener attributes - common across all listener types...
         MapperUtil.mapDefaultAttributes(listener, listenerNode, model);
         // Map the <property> elements targeted at the listener - from the listener itself.

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/HibernateListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -52,10 +52,12 @@
 	 * @throws ConfigurationException Invalid listener configuration.
 	 */
 	public static Element map(Element root, HibernateListener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
 		HibernateBus bus;
 		HibernateProvider provider;
-		
+
+        listenerNode.setAttribute("name", listener.getName());
+
 		try {
 			bus = (HibernateBus) model.getBus(listener.getBusidref());
 		} catch (ClassCastException e) {

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JbrListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -44,10 +44,12 @@
      * @throws org.jboss.soa.esb.ConfigurationException Invalid listener configuration.
      */
     public static Element map(Element root, JbrListener listener, XMLBeansModel model) throws ConfigurationException {
-        Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+        Element listenerNode = YADOMUtil.addElement(root, "listener");
         JbrBus bus;
         JbrProvider provider;
 
+        listenerNode.setAttribute("name", listener.getName());
+
         try {
             bus = (JbrBus) model.getBus(listener.getBusidref());
         } catch (ClassCastException e) {

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JcaGatewayMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -40,9 +40,11 @@
 {
    public static Element map(Element root, JcaGateway gateway, Generator.XMLBeansModel model) throws ConfigurationException
    {
-      Element listenerNode = YADOMUtil.addElement(root, gateway.getName());
+      Element listenerNode = YADOMUtil.addElement(root, "listener");
       gateway.setIsGateway(true);
 
+      listenerNode.setAttribute("name", gateway.getName());
+
       ServiceDocument.Service service = model.getService(gateway);
       listenerNode.setAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG, service.getDescription());	
       listenerNode.setAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG, service.getCategory());

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -72,10 +72,12 @@
 	 * @throws ConfigurationException Invalid listener configuration.
 	 */
 	public static Element map(Element root, JmsListener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
 		JmsBus bus;
 		JmsProviderType provider;
-		
+
+        listenerNode.setAttribute("name", listener.getName());
+
 		try {
 			bus = (JmsBus) model.getBus(listener.getBusidref());
 		} catch (ClassCastException e) {

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/ScheduledListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -30,17 +30,19 @@
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public class ScheduledListenerMapper {
-    public static Element map(Element root, ScheduledListenerDocument.ScheduledListener scheduledListener) {
-        Element listenerNode = YADOMUtil.addElement(root, scheduledListener.getName());
+    public static Element map(Element root, ScheduledListenerDocument.ScheduledListener listener) {
+        Element listenerNode = YADOMUtil.addElement(root, "listener");
 
-        listenerNode.setAttribute("event-processor", scheduledListener.getEventProcessor());
+        listenerNode.setAttribute("name", listener.getName());
+
+        listenerNode.setAttribute("event-processor", listener.getEventProcessor());
         listenerNode.setAttribute(ListenerTagNames.LISTENER_CLASS_TAG, ScheduleListener.class.getName());
-        if (scheduledListener.isSetTransacted()) {
-            listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(scheduledListener.getTransacted()));
+        if (listener.isSetTransacted()) {
+            listenerNode.setAttribute(ListenerTagNames.TRANSACTED_TAG, Boolean.toString(listener.getTransacted()));
         }
 
         // Map the <property> elements targeted at the listener - from the listener itself.
-        MapperUtil.mapProperties(scheduledListener.getPropertyList(), listenerNode);
+        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
 
         return listenerNode;
     }

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/SqlListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -49,10 +49,12 @@
 	 * @throws ConfigurationException Invalid listener configuration.
 	 */
 	public static Element map(Element root, SqlListener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
 		SqlBus bus;
 		SqlProvider provider;
-		
+
+        listenerNode.setAttribute("name", listener.getName());
+
 		try {
 			bus = (SqlBus) model.getBus(listener.getBusidref());
 		} catch (ClassCastException e) {

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/UntypedListenerMapper.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -56,8 +56,10 @@
 	 * @throws ConfigurationException Invalid listener configuration.
 	 */
 	public static Element map(Element root, Listener listener, XMLBeansModel model) throws ConfigurationException {
-		Element listenerNode = YADOMUtil.addElement(root, listener.getName());
-		
+		Element listenerNode = YADOMUtil.addElement(root, "listener");
+
+        listenerNode.setAttribute("name", listener.getName());
+
 		assertListenerConfigOK(listener, model);
 		
 		// Map the standard listener attributes - common across all listener types...

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -22,6 +22,7 @@
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.remoting.HttpMarshaller;
 import org.jboss.internal.soa.esb.remoting.HttpUnmarshaller;
+import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.remoting.InvocationRequest;
 import org.jboss.remoting.InvokerLocator;
 import org.jboss.remoting.ServerInvocationHandler;
@@ -48,6 +49,7 @@
 import org.jboss.soa.esb.message.body.content.BytesBody;
 import org.jboss.soa.esb.services.registry.RegistryException;
 import org.jboss.soa.esb.services.registry.RegistryFactory;
+import org.jboss.soa.esb.util.ClassUtil;
 
 import javax.management.MBeanServer;
 import java.net.InetAddress;
@@ -141,6 +143,10 @@
      * Is the listener synchronous.
      */
     private boolean synchronous = true;
+    /**
+     * Asynchronous response.
+     */
+    private String asyncResponse;
 
     /**
      * Install our own marshaller/unmarshaller for HTTP.
@@ -163,6 +169,13 @@
         serviceCategory = config.getAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG);
         serviceName = config.getAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG);
         synchronous = !config.getAttribute("synchronous", "true").equalsIgnoreCase("false");
+        asyncResponse = config.getAttribute("asyncResponse");
+
+        if(asyncResponse != null) {
+            if(ClassUtil.getResourceAsStream(asyncResponse, getClass()) == null) {
+                throw new ConfigurationException("Asynchronous response resource file '" + asyncResponse + "' not found on classpath.");
+            }
+        }
     }
 
     /**
@@ -322,12 +335,6 @@
                     logger.debug("Returning response [" + response + "].");
                 }
 
-                /*
-                if(response instanceof String) {
-                    response = ((String)response).getBytes("UTF-8");
-                }
-                */
-                
                 return response;
             } else {
                 messageDeliveryAdapter.deliverAsync(invocationRequest);
@@ -340,7 +347,11 @@
             throw t;
         }
 
-        return "<ack/>";
+        if(asyncResponse == null) {
+            return "<ack/>";
+        } else {
+            return StreamUtils.readStreamString(getClass().getResourceAsStream(asyncResponse), "UTF-8");
+        }
     }
 
     public void setMBeanServer(MBeanServer mBeanServer) {

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -154,43 +154,39 @@
             if (null != msgIn) {
                 try {
                     Object obj = _processMethod.invoke(_composer, new Object[] {msgIn});
-                    // commit and acknowledge the reception of the message
-                    // this is done after extracting the content of the JMS Message.
-                    if (jmsSession.getTransacted()) {
-                        jmsSession.commit() ;
-                    } else {
-                        msgIn.acknowledge() ;
-                    }
                     
                     if (null == obj) {
                         _logger.warn("Action class method <"
                                 + _processMethod.getName()
                                 + "> returned a null object");
-                        continue;
-                    }
-                    // try to deliverAsync the composed message, using the
-                    // appropriate courier
-                    // to the target service
+                    } else {
+                        // try to deliverAsync the composed message, using the
+                        // appropriate courier
+                        // to the target service
 
-                    Map<String, Object> params = new HashMap<String, Object>();
+                        Map<String, Object> params = new HashMap<String, Object>();
 
-                    params.put(Environment.GATEWAY_CONFIG, _config);
+                        params.put(Environment.GATEWAY_CONFIG, _config);
 
-                    obj = FilterManager.getInstance().doOutputWork((Message) obj, params);
+                        obj = FilterManager.getInstance().doOutputWork((Message) obj, params);
 
-                    try {
-                    	Message message = (Message) obj;
-                    	_serviceInvoker.deliverAsync(message);
+                        try {
+                        	Message message = (Message) obj;
+                        	_serviceInvoker.deliverAsync(message);
+                        }
+                        catch (ClassCastException e) {
+                            _logger.error("Action class method <"
+                                    + _processMethod.getName()
+                                    + "> returned a non Message object", e);
+                            
+                            rollbackJMSTransaction();
+                        }
                     }
-                    catch (ClassCastException e) {
-                        _logger.error("Action class method <"
-                                + _processMethod.getName()
-                                + "> returned a non Message object", e);
-                        
-	                    rollbackJMSTransaction();
-                        continue;
+                    if (jmsSession.getTransacted()) {
+                        jmsSession.commit() ;
+                    } else {
+                        msgIn.acknowledge() ;
                     }
-                    continue;
                 }
                 catch (InvocationTargetException e) {
                     _logger.error("Problems invoking method <"

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -341,10 +341,13 @@
             throw new ConfigurationException(
                     "A valid inProcessField attribute must be specified");
         _timestamp = ListenerUtil.getValue(_config,
-        		JDBCEpr.TIMESTAMP_COLUMN_TAG, "");
-        if (_timestamp.trim().length() < 1) 
+        		JDBCEpr.TIMESTAMP_COLUMN_TAG);
+        if ((_timestamp == null)  || (_timestamp.trim().length() == 0))
+        {
             _logger.debug("No value specified for: "
                     + ListenerTagNames.SQL_TIMESTAMP_TAG);
+            _timestamp = null ;
+        }
         _where = ListenerUtil.getValue(_config,
                 ListenerTagNames.SQL_WHERE_CONDITION_TAG, "");
         if (_where.trim().length() < 1)
@@ -604,7 +607,7 @@
     protected String updateStatement() {
         StringBuilder sb = new StringBuilder().append("update ").append(
                 _tableName).append(" set ").append(_inProcessField).append(" = ? ");
-        if (_timestamp.trim().length() < 1) {
+        if (_timestamp != null) {
         	sb.append(", " + _timestamp + " = ? ");
         }
         sb.append("where ").append(_inProcessField).append(" = ?");
@@ -701,7 +704,7 @@
 
         try {
             int iParm = 3;
-            if (_timestamp.trim().length() < 1) {
+            if (_timestamp != null) {
             	iParm++;
             }
             
@@ -734,7 +737,7 @@
             try {
             	int counter = 1;
                 _PSupdate.setString(counter++, getStatus(toState));
-                if (_timestamp.trim().length() < 1) {
+                if (_timestamp != null) {
                 	Date now = new Date();
                 	_PSupdate.setString(counter++, now.toString());
                 }

Deleted: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/DisplayMemoryUsageActionUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/DisplayMemoryUsageActionUnitTest.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/DisplayMemoryUsageActionUnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,52 +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.assertEquals;
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Level;
-import org.junit.Test;
-
-/**
- * Unit test for DisplayMemoryUsageAction
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- *
- */
-public class DisplayMemoryUsageActionUnitTest
-{
-	@Test
-	public void setLogLevelToInfo()
-	{
-		DisplayMemoryUsageAction action = new DisplayMemoryUsageAction();
-		action.setLogger( action.getClass().getName() );
-		action.setLogLevel( "info" );
-		assertEquals( Level.INFO, action.getLevel() );
-	}
-	
-	public static junit.framework.Test suite()
-	{
-		return new JUnit4TestAdapter( DisplayMemoryUsageActionUnitTest.class );
-	}
-
-}

Deleted: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/DisplayTimeActionUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/DisplayTimeActionUnitTest.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/DisplayTimeActionUnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,52 +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.*;
-import junit.framework.JUnit4TestAdapter;
-
-import org.junit.Test;
-
-/**
- * Unit test for {@link DisplyTimeAction}
- * <p/> 
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- *
- */
-public class DisplayTimeActionUnitTest
-{
-	@Test
-	public void process()
-	{
-		final String format = "HH:mm:ss:S"; 
-		DisplayTimeAction action = new DisplayTimeAction();
-		action.setFormat( format );
-		assertEquals( format, action.getFormat() );
-	}
-	
-	public static junit.framework.Test suite()
-	{
-		return new JUnit4TestAdapter( DisplayTimeActionUnitTest.class );
-	}
-
-}

Deleted: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/converters/FileToStreamUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/converters/FileToStreamUnitTest.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/actions/converters/FileToStreamUnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,92 +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.converters;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit test for {@link FileToStream}
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- */
-public class FileToStreamUnitTest
-{
-	private FileToStream fileToStream;
-
-	@Test
-	public void defaultFileNameLocation()
-	{
-		String fileNameLocation = fileToStream.getFileNameLocation();
-		assertNull( fileNameLocation );
-	}
-	
-	@Test
-	public void customFileNameLocation()
-	{
-		final String customLocation = "custom-location";
-		fileToStream.setFileNameLocation( customLocation );
-		assertEquals( customLocation, fileToStream.getFileNameLocation() );
-	}
-	
-	@Test ( expected = ActionProcessingException.class )
-	public void processNegative() throws IOException, ActionProcessingException
-	{
-		Message message = MessageFactory.getInstance().getMessage();
-		fileToStream.process( message );
-	}
-	
-	@Test
-	public void process() throws IOException, ActionProcessingException
-	{
-		Message message = MessageFactory.getInstance().getMessage();
-		File file = File.createTempFile( "testing", ".xml" );
-		message.getBody().add( file.getAbsolutePath() );
-		
-		Message processedMsg = fileToStream.process( message );
-		
-		assertTrue ( processedMsg.getBody().get() instanceof InputStream );
-	}
-	
-	@Before
-	public void setup()
-	{
-		fileToStream = new FileToStream();
-	}
-	
-	public static junit.framework.Test suite()
-	{
-		return new JUnit4TestAdapter( FileToStreamUnitTest.class );
-	}
-
-}

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/InVMListenerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/InVMListenerUnitTest.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/InVMListenerUnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -64,7 +64,7 @@
                 message.getBody().add("Hi there!");
                 invoker.deliverAsync(message);
 
-                sleep(50);
+                waitForMockSet(message);
                 assertTrue(message == MockAction.message);
             }
         }.setServiceConfig("in-listener-config-01.xml");
@@ -234,10 +234,21 @@
         message.getBody().add("Hi there!");
         invoker.deliverAsync(message);
 
-        sleep(50);
+        waitForMockSet(message);
         assertTrue(message == MockAction.message);
     }
 
+    private void waitForMockSet(Message message) {
+        long start = System.currentTimeMillis();
+
+        while(System.currentTimeMillis() - start < 5000) {
+            if(message == MockAction.message) {
+                return;
+            }
+            sleep(50);
+        }
+    }
+
     private static void sleep(long millis) {
         try {
             Thread.sleep(millis);

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,32 +1,27 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
  * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
+ * full listing of individual contributors.
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
  * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
 
 package org.jboss.soa.esb.listeners.config;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
 import junit.framework.TestCase;
-
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.ConfigurationException;
@@ -34,19 +29,23 @@
 import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsBusDocument.JmsBus;
 import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsListenerDocument.JmsListener;
 import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsMessageFilterDocument.JmsMessageFilter;
-import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
 import org.jboss.soa.esb.listeners.config.xbeanmodel.JmsProviderType;
 import org.jboss.soa.esb.listeners.config.xbeanmodel.Listener;
+import org.jboss.soa.esb.listeners.config.xbeanmodel.ServiceDocument.Service;
 import org.jboss.soa.esb.testutils.FileUtil;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
 /**
  * Generator unit tests.
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public class GeneratorUnitTest extends TestCase {
-	
+
 	private Logger log = Logger.getLogger( GeneratorUnitTest.class );
-	
+
 	private File outdir = new File("test-outdir");
 	private File gatewayConfig;
 	private File awareConfig;
@@ -59,36 +58,36 @@
 			// OK
 		}
 	}
-	
+
 	public void test_generate_badagrs() throws ConfigurationException, IOException {
 		test_generate_badargs(null, "null 'outdir' arg in method call");
 		test_generate_badargs(new File("build.xml"), "'outdir' exists, but is not a directory");
 	}
-	
+
 	public void test_generate_files() throws ConfigurationException, IOException {
 		test_generate_files("jbossesb_config_01.xml");
 		test_generate_files("jbossesb_config_02.xml");
 	}
-		
+
 	public void test_generate_files(String filename) throws ConfigurationException, IOException {
 		Generator generator = new Generator(getClass().getResourceAsStream(filename));
 		String expectedGatewayConfig = new String(StreamUtils.readStream(getClass().getResourceAsStream("jbossesb_config_01_gateways.xml"))).trim();
 		String expectedESBAwareConfig = new String(StreamUtils.readStream(getClass().getResourceAsStream("jbossesb_config_01_esbaware.xml"))).trim();
 		String actualGatewayConfig;
 		String actualESBAwareConfig;
-		
+
 		expectedGatewayConfig = removeEOL(expectedGatewayConfig);
 		expectedESBAwareConfig = removeEOL(expectedESBAwareConfig);
-		
+
 		generator.generate(outdir);
-		
+
 		gatewayConfig = new File(outdir, Generator.ESB_CONFIG_GATEWAY_XML_FILE);
 		assertTrue(gatewayConfig.exists());
 		actualGatewayConfig = FileUtil.readTextFile(gatewayConfig);
 		log.debug("actual  [" + removeEOL(actualGatewayConfig) + "]");
         log.debug("expected[" + expectedGatewayConfig + "]");
 		assertEquals(expectedGatewayConfig, removeEOL(actualGatewayConfig));
-		
+
 		awareConfig = new File(outdir, Generator.ESB_CONFIG_XML_FILE);
 		assertTrue(awareConfig.exists());
 		actualESBAwareConfig = FileUtil.readTextFile(awareConfig);
@@ -96,12 +95,12 @@
 		actualESBAwareConfig = removeEOL(actualESBAwareConfig);
 		boolean isIndentical = expectedESBAwareConfig.equals(actualESBAwareConfig);
 		log.debug("Strings identical=" + isIndentical);
-		assertEquals(expectedESBAwareConfig, actualESBAwareConfig);
+        assertEquals(expectedESBAwareConfig, actualESBAwareConfig);
 	}
 
 	public void test_bad_base_listener_busref() throws ConfigurationException, IOException {
 		Generator generator = new Generator(getClass().getResourceAsStream("jbossesb_config_03.xml"));
-		
+
 		try {
 			generator.generate(outdir);
 			fail("Expected ConfigurationException");
@@ -111,18 +110,18 @@
 			}
 		}
 	}
-	
+
 	public static String removeEOL(String string) {
 		StringBuffer stringBuf = new StringBuffer(string.length());
 
 		for(int i = 0; i < string.length(); i++) {
 			char character = string.charAt(i);
-			
+
 			if(character != '\r' && character != '\n') {
 				stringBuf.append(character);
 			}
 		}
-		
+
 		return stringBuf.toString();
 	}
 
@@ -161,12 +160,12 @@
 		assertEquals("queue/B", listenerDestination.getDestName());
 		assertEquals(JmsMessageFilter.DestType.TOPIC, listenerDestination.getDestType());
 		assertEquals("service='Reconciliation'", listenerDestination.getSelector());
-		
+
 		Listener untypedAwareListener = awareListeners.get(1);
 		assertEquals("Bank-Listener-Generic", untypedAwareListener.getName());
 		assertEquals("my-generic-bus", untypedAwareListener.getBusidref());
 		assertTrue(!untypedAwareListener.getIsGateway());
-		
+
 		Service gatewayService = model.getService(gatewayListener);
 		Service awareService = model.getService(awareListener);
 		assertSame(gatewayService, awareService);

Copied: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539 (from rev 21126, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539)

Deleted: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java	2008-07-18 22:25:32 UTC (rev 21126)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.listeners.config.JBESB_539;
-
-import junit.framework.TestCase;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.testutils.ESBConfigUtil;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class JBESB_539_UnitTest extends TestCase {
-
-    public void test() throws IOException, SAXException, ConfigurationException {
-        ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("config_01.xml"));
-        ConfigTree myListenerConfig = configUtil.getGatewayConfig("My Listener");
-        ConfigTree yourListenerConfig = configUtil.getGatewayConfig("Your Listener");
-
-        assertNotNull(myListenerConfig);
-        assertEquals("My Listener", myListenerConfig.getAttribute("name"));
-        assertNotNull(yourListenerConfig);
-        assertEquals("Your Listener", yourListenerConfig.getAttribute("name"));
-    }
-}

Copied: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java (from rev 21126, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/JBESB_539_UnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.listeners.config.JBESB_539;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.testutils.ESBConfigUtil;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JBESB_539_UnitTest extends TestCase {
+
+    public void test() throws IOException, SAXException, ConfigurationException {
+        ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("config_01.xml"));
+        ConfigTree myListenerConfig = configUtil.getGatewayConfig("My Listener");
+        ConfigTree yourListenerConfig = configUtil.getGatewayConfig("Your Listener");
+
+        assertNotNull(myListenerConfig);
+        assertEquals("My Listener", myListenerConfig.getAttribute("name"));
+        assertNotNull(yourListenerConfig);
+        assertEquals("Your Listener", yourListenerConfig.getAttribute("name"));
+    }
+}

Deleted: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml	2008-07-18 22:25:32 UTC (rev 21126)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,22 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
-
-    <providers>
-        <jbr-provider name="jbr" protocol="http" host="localhost">
-            <jbr-bus busid="http1" port="10909" />
-        </jbr-provider>
-    </providers>
-
-    <services>
-        <service category="cat" name="name" description="blah" invmScope="GLOBAL">
-            <listeners>
-                <jbr-listener name="My Listener" busidref="http1" is-gateway="true" />
-                <jbr-listener name="Your Listener" busidref="http1" is-gateway="true" />
-            </listeners>
-            <actions>
-                <action name="xxx" class="org.jboss.soa.esb.mock.MockAction" />
-            </actions>
-        </service>
-    </services>
-
-</jbossesb>
\ No newline at end of file

Copied: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml (from rev 21126, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/JBESB_539/config_01.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1,22 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+
+    <providers>
+        <jbr-provider name="jbr" protocol="http" host="localhost">
+            <jbr-bus busid="http1" port="10909" />
+        </jbr-provider>
+    </providers>
+
+    <services>
+        <service category="cat" name="name" description="blah" invmScope="GLOBAL">
+            <listeners>
+                <jbr-listener name="My Listener" busidref="http1" is-gateway="true" />
+                <jbr-listener name="Your Listener" busidref="http1" is-gateway="true" />
+            </listeners>
+            <actions>
+                <action name="xxx" class="org.jboss.soa.esb.mock.MockAction" />
+            </actions>
+        </service>
+    </services>
+
+</jbossesb>
\ No newline at end of file

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,41 +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 acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" persistent="true" protocol="jms" transacted="false"/>
-<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" mep="OneWay" schedule-frequency="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-sql-listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="RequestResponse" 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
+<?xml version="1.0" encoding="UTF-8"?><!--	NOTE: DO NOT MODIFY	This file was auto-generated.--><jbossesb-listeners parameterReloadSecs="180"><listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" name="Bank-Listener" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation"><EPR acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" persistent="true" protocol="jms" transacted="false"/><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></listener><listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" ma!
 xThreads="2" my-generic-listener="my-generic-listener#someattribvalue" name="Bank-Listener-Generic" 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></listener><listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="OneWay" name="test-ftp-listener" schedule-frequency="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"/><a!
 ction action="TestFtpRouteAction" class="org.jboss.soa.esb.actions.Con
tentBasedRouter"/></listener><listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="1" mep="RequestResponse" name="test-sql-listener" 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"/></listener></jbossesb-listeners>
\ No newline at end of file

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -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 acknowledge-mode="AUTO_ACKNOWLEDGE" 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'" persistent="true" protocol="jms" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation" transacted="false"/><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="Reconciliation"/></jbossesb-gateways>
+<?xml version="1.0" encoding="UTF-8"?><!--	NOTE: DO NOT MODIFY	This file was auto-generated.--><jbossesb-gateways parameterReloadSecs="180"><listener acknowledge-mode="AUTO_ACKNOWLEDGE" 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'" name="Bank-JMS-Gateway" persistent="true" protocol="jms" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation" transacted="false"/><listener 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" name="Bank-HTTP-Gat!
 eway" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/></jbossesb-gateways>

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -78,7 +78,6 @@
 		
 		Node ftpMapperListener = root.getFirstChild();
 		assertNotNull ("ftpMapperListener should not be null", ftpMapperListener ); 
-		assertEquals( ftpListener.getName(), ftpMapperListener.getNodeName() );
 		
 		NamedNodeMap attributes = ftpMapperListener.getAttributes();
 		Node gatewayClass = attributes.getNamedItem( GATEWAY_CLASS_ATTRIBUTE );

Copied: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBRIntegratedUnitTest.java (from rev 21126, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBRIntegratedUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBRIntegratedUnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBRIntegratedUnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.listeners.gateway;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.testutils.AbstractTestRunner;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.Client;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JBRIntegratedUnitTest extends TestCase {
+
+    protected void setUp() throws Exception {
+        System.setProperty(Environment.DEFAULT_INVM_SCOPE, "GLOBAL");
+    }
+
+    protected void tearDown() throws Exception {
+        System.setProperty(Environment.DEFAULT_INVM_SCOPE, "NONE");
+    }
+
+    public void test_JBESB_1428_01() throws Exception {
+        new AbstractTestRunner() {
+            public void test() throws Exception {
+                String response = (String) sendMessageToServer("http://localhost:8769", "Hi there!!");
+                assertEquals("<ack/>", response);
+            }
+        }.setServiceConfig("jbr-async-config-01.xml").run();
+    }
+
+    public void test_JBESB_1428_02() throws Exception {
+        new AbstractTestRunner() {
+            public void test() throws Exception {
+                String response = (String) sendMessageToServer("http://localhost:8769", "Hi there!!");
+                assertEquals("<async_ack_from-file/>", response);
+            }
+        }.setServiceConfig("jbr-async-config-02.xml").run();
+    }
+
+    private Object sendMessageToServer(String url, Object messagePayload) throws Exception {
+        InvokerLocator locator = new InvokerLocator(url);
+
+        Client remotingClient = null;
+        try {
+            remotingClient = new Client(locator);
+            remotingClient.connect();
+
+            try {
+                return remotingClient.invoke(messagePayload);
+            } catch (Throwable throwable) {
+                throwable.printStackTrace();
+                fail("Error making JBR Client invocation.");
+                throw new Exception(); // keep the compiler happy!!
+            }
+        } finally {
+            if(remotingClient != null) {
+                remotingClient.disconnect();
+            }
+        }
+    }
+
+}

Copied: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/async_response.txt (from rev 21126, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/async_response.txt)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/async_response.txt	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/async_response.txt	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1 @@
+<async_ack_from-file/>
\ No newline at end of file

Copied: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-01.xml (from rev 21126, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-01.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-01.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1,23 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+
+    <providers>
+        <jbr-provider name="http" protocol="http" host="localhost">
+            <jbr-bus busid="http1" port="8769" />
+        </jbr-provider>
+    </providers>
+
+    <services>
+        <service category="ServiceCat" name="ServiceName" description="Test Service">
+            <listeners>
+                <jbr-listener name="http" busidref="http1" is-gateway="true">
+                    <property name="synchronous" value="false" />
+                </jbr-listener>
+            </listeners>
+            <actions mep="RequestResponse">
+                <action name="action" class="org.jboss.soa.esb.mock.MockAction" />
+            </actions>			
+        </service>
+    </services>
+
+</jbossesb>
\ No newline at end of file

Copied: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-02.xml (from rev 21126, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-02.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-02.xml	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/jbr-async-config-02.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1,24 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+
+    <providers>
+        <jbr-provider name="http" protocol="http" host="localhost">
+            <jbr-bus busid="http1" port="8769" />
+        </jbr-provider>
+    </providers>
+
+    <services>
+        <service category="ServiceCat" name="ServiceName" description="Test Service">
+            <listeners>
+                <jbr-listener name="http" busidref="http1" is-gateway="true">
+                    <property name="synchronous" value="false" />
+                    <property name="asyncResponse" value="/org/jboss/soa/esb/listeners/gateway/async_response.txt" />
+                </jbr-listener>
+            </listeners>
+            <actions mep="RequestResponse">
+                <action name="action" class="org.jboss.soa.esb.mock.MockAction" />
+            </actions>			
+        </service>
+    </services>
+
+</jbossesb>
\ No newline at end of file

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/listeners/scheduled-listener-config-configtree.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,3 +1,3 @@
-<simple-schedule-listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" my-prop="1" scheduleidref="1-sec-trigger">
+<listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" my-prop="1" name="simple-schedule-listener" scheduleidref="1-sec-trigger">
 <action action="action" class="org.jboss.soa.esb.mock.MockAction"/>
-</simple-schedule-listener>
\ No newline at end of file
+</listener>
\ No newline at end of file

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/schedule/expected-config-01-listener.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,3 +1,3 @@
-<simple-schedule-listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" scheduleidref="1-sec-trigger">
+<listener event-processor="org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer" listenerClass="org.jboss.soa.esb.listeners.ScheduleListener" name="simple-schedule-listener" scheduleidref="1-sec-trigger">
 <action action="action" class="org.jboss.soa.esb.mock.MockAction"/>
-</simple-schedule-listener>
\ No newline at end of file
+</listener>
\ No newline at end of file

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/testutils/ESBConfigUtil.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/testutils/ESBConfigUtil.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/testutils/ESBConfigUtil.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -22,8 +22,8 @@
 import com.arjuna.common.util.propertyservice.PropertyManager;
 import org.jboss.internal.soa.esb.assertion.AssertArgument;
 import org.jboss.internal.soa.esb.couriers.MockCourierFactory;
+import org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl;
 import org.jboss.internal.soa.esb.services.registry.MockRegistry;
-import org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.common.ModulePropertyManager;
 import org.jboss.soa.esb.dom.YADOMUtil;
@@ -33,9 +33,9 @@
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
 import org.jboss.soa.esb.parameters.ParamRepositoryException;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryException;
 import org.jboss.soa.esb.services.registry.RegistryFactory;
-import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.registry.Registry;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -45,8 +45,8 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.sql.SQLException;
 import java.util.Hashtable;
-import java.sql.SQLException;
 
 /**
  * Utility class for working with the ESB configuration.
@@ -157,6 +157,18 @@
         NodeList listenerConfigElements = config.getDocumentElement().getElementsByTagName(name);
 
         if(listenerConfigElements == null || listenerConfigElements.getLength() == 0) {
+            listenerConfigElements = config.getDocumentElement().getElementsByTagName("listener");
+            if(listenerConfigElements == null || listenerConfigElements.getLength() == 0) {
+                return null;
+            }
+
+            for(int i = 0; i < listenerConfigElements.getLength(); i++) {
+                Element element = (Element) listenerConfigElements.item(i);
+                if(name.equals(element.getAttribute("name"))) {
+                    return element;
+                }
+            }
+
             return null;
         }
 

Modified: labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/rosetta/tests/src/org/jboss/soa/esb/testutils/test/ESBConfigUtilUnitTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -16,8 +16,8 @@
     public void test() throws ConfigurationException, IOException, SAXException {
         ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("jboss-esb.xml"));
 
-        assertTrue(configUtil.getListenerConfig("JMS-ESBListener").toString().startsWith("<JMS-ESBListener listenerClass=\"org.jboss.soa.esb.listeners.message.MessageAwareListener\" maxThreads=\"1\" service-category=\"ABI_OrderManager\" service-description=\"ABI OrderManager Service\" service-name=\"ABI_OrderManager\">"));
-        assertTrue(configUtil.getGatewayConfig("FileGateway").toString().startsWith("<FileGateway"));
+        assertTrue(configUtil.getListenerConfig("JMS-ESBListener").toString().startsWith("<listener listenerClass=\"org.jboss.soa.esb.listeners.message.MessageAwareListener\" maxThreads=\"1\" name=\"JMS-ESBListener\" service-category=\"ABI_OrderManager\" service-description=\"ABI OrderManager Service\" service-name=\"ABI_OrderManager\">"));
+        assertTrue(configUtil.getGatewayConfig("FileGateway").toString().startsWith("<listener"));
         assertTrue(configUtil.getActionConfig("OrderNotificationService", "print-after-transform").toString().startsWith("<action action=\"print-after-transform\""));
     }
 

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/aggregator/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/aggregator/build.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/aggregator/build.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -5,7 +5,7 @@
 		${line.separator}
 	</description>
 			
-	<property name="additional.deploys" value="smooks-cdr.lst,smooks-res.xml" />
+	<property name="additional.deploys" value="smooks-res.xml" />
 
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/jboss-esb-unfiltered.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/jboss-esb-unfiltered.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/jboss-esb-unfiltered.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -53,17 +53,17 @@
                    		<property name="logBody"	value="true"/>
                     </action>
 
-					<action name="fileToStream" class="org.jboss.soa.esb.actions.converters.FileToStream"/>
+					<action name="fileToStream" class="org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter.actions.FileToStream"/>
 
 					<action name="createSourceResult" class="org.jboss.soa.esb.actions.converters.StreamToSourceResult"/>
 
-					<action name="startTime" class="org.jboss.soa.esb.actions.DisplayTimeAction">
+					<action name="startTime" class="org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter.actions.DisplayTimeAction">
                    		<property name="logger"		value="SmooksQuickstart"/>
                    		<property name="logLevel"	value="info"/>
                    		<property name="format"		value="HH:mm:ss"/>
 					</action>
 
-					<action name="memUsageBefore" class="org.jboss.soa.esb.actions.DisplayMemoryUsageAction">
+					<action name="memUsageBefore" class="org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter.actions.DisplayMemoryUsageAction">
                    		<property name="logger"		value="SmooksQuickstart"/>
                    		<property name="logLevel"	value="info"/>
 					</action>
@@ -81,13 +81,13 @@
                    		<property name="logBody"	value="true"/>
 					</action>
 
-					<action name="endTime" class="org.jboss.soa.esb.actions.DisplayTimeAction">
+					<action name="endTime" class="org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter.actions.DisplayTimeAction">
                    		<property name="logger"		value="SmooksQuickstart"/>
                    		<property name="logLevel"	value="info"/>
                    		<property name="format"		value="HH:mm:ss"/>
 					</action>
 
-					<action name="memUsageAfter" class="org.jboss.soa.esb.actions.DisplayMemoryUsageAction">
+					<action name="memUsageAfter" class="org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter.actions.DisplayMemoryUsageAction">
                    		<property name="logger"		value="SmooksQuickstart"/>
                    		<property name="logLevel"	value="info"/>
 					</action>

Deleted: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/jboss-esb.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/jboss-esb.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,115 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5" >
-
-    <providers>
-          <fs-provider name="FSprovider1">
-          	<fs-bus busid="smooksFileChannel">
-          		<fs-message-filter
-          			directory="/opt/jboss/esb/source/trunk2/product/samples/quickstarts/smooks_file_splitter_router/build/dirs/input"
-          			input-suffix=".xml"
-          			work-suffix=".esbWorking"
-          			post-delete="false"
-          			post-rename="false"
-          			post-directory="/opt/jboss/esb/source/trunk2/product/samples/quickstarts/smooks_file_splitter_router/build/dirs/output"
-          			post-suffix=".sentToEsb"
-          			error-delete="false"
-          			error-directory="/opt/jboss/esb/source/trunk2/product/samples/quickstarts/smooks_file_splitter_router/build/dirs/error"
-          			error-suffix=".IN_ERROR"
-          		/>
-          	</fs-bus>
-          </fs-provider>
-          
-          <jms-provider name="JBossMessaging" connection-factory="ConnectionFactory"> 
-			    <jms-bus busid="quickstartEsbChannel">
-			        <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_smooks_file_splitter_router_esb"/>
-			    </jms-bus>
-			
-		   </jms-provider>
-
-      </providers>
-      
-      <services>
-          
-        <service 
-			category="smooksFileSplitterRouter"
-			name="service"
-        	description="Smooks Quickstart File Router Splitter" >
-            <listeners>
-            	<fs-listener name="FileGateway"
-            		busidref="smooksFileChannel"
-            		maxThreads="1"
-            		is-gateway="true"
-					schedule-frequency="10">
-					<property name="composer-class" value="org.jboss.soa.esb.listeners.gateway.LocalFileNameMessageComposer"/>
-				</fs-listener>
-                <jms-listener name="helloWorldFileAction" busidref="quickstartEsbChannel" maxThreads="1" />
-            </listeners>
-            <actions mep="OneWay">       
-
-                    <action name="logBodyOnEntry" class="org.jboss.soa.esb.actions.LogAction">
-                   		<property name="logger"		value="SmooksQuickstart"/>
-                   		<property name="logLevel"	value="info"/>
-                   		<property name="message"	value="Body upon entering :"/>
-                   		<property name="logBody"	value="true"/>
-                    </action>
-
-					<action name="fileToStream" class="org.jboss.soa.esb.actions.converters.FileToStream"/>
-
-					<action name="createSourceResult" class="org.jboss.soa.esb.actions.converters.StreamToSourceResult"/>
-
-					<action name="startTime" class="org.jboss.soa.esb.actions.DisplayTimeAction">
-                   		<property name="logger"		value="SmooksQuickstart"/>
-                   		<property name="logLevel"	value="info"/>
-                   		<property name="format"		value="HH:mm:ss"/>
-					</action>
-
-					<action name="memUsageBefore" class="org.jboss.soa.esb.actions.DisplayMemoryUsageAction">
-                   		<property name="logger"		value="SmooksQuickstart"/>
-                   		<property name="logLevel"	value="info"/>
-					</action>
-
-					<action name="transform" class="org.jboss.soa.esb.smooks.SmooksAction">
-						<property name="smooksConfig" value="smooks-config.xml" />
-					</action>
-
-					<action name="getFileList" class="org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter.GetFileListFromExecutionContext"/>
-
-                    <action name="logBodyAfterTransform" class="org.jboss.soa.esb.actions.LogAction">
-                   		<property name="logger"		value="SmooksQuickstart"/>
-                   		<property name="logLevel"	value="info"/>
-                   		<property name="message"	value="Body after transform :"/>
-                   		<property name="logBody"	value="true"/>
-					</action>
-
-					<action name="endTime" class="org.jboss.soa.esb.actions.DisplayTimeAction">
-                   		<property name="logger"		value="SmooksQuickstart"/>
-                   		<property name="logLevel"	value="info"/>
-                   		<property name="format"		value="HH:mm:ss"/>
-					</action>
-
-					<action name="memUsageAfter" class="org.jboss.soa.esb.actions.DisplayMemoryUsageAction">
-                   		<property name="logger"		value="SmooksQuickstart"/>
-                   		<property name="logLevel"	value="info"/>
-					</action>
-
-					<action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
-						<property name="okMethod" value="notifyOK" />
-						<property name="notification-details">
-							<NotificationList type="ok">
-								<target class="NotifyFTPList">
-									<ftp URL="ftp://sifo:sifo@localhost//home/sifo/input" 
-										filename="{org.jboss.soa.esb.gateway.file}"
-										listFiles="true"
-										deleteListFile="true"/>
-								</target>
-							</NotificationList>
-						</property>
-					</action>
-
-					<!-- The next action is for Continuous Integration testing -->
-                   	<action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore" />
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>

Copied: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions (from rev 21126, labs/jbossesb/trunk/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions)

Deleted: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java	2008-07-18 22:25:32 UTC (rev 21126)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,62 +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.sample.quickstart.smooksfilesplitterrouter.actions;
-
-import org.jboss.soa.esb.actions.BeanConfiguredAction;
-import org.jboss.soa.esb.actions.LogAction;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * Simple action that shows JVM memory usage. 
- * </p>
- * Exemple configuration:
- * <pre>
- *&lt;action name="logMemoryUsageAfter" class="org.jboss.soa.esb.actions.DisplayMemoryUsageAction"&gt;
- *&lt;/action&gt;
- * </pre>
- * This action support all configuration properties that {@link LogAction} supports.
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- * @since 4.3
- *
- */
-public class DisplayMemoryUsageAction extends LogAction implements BeanConfiguredAction
-{
-	public Message process( final Message message )
-	{
-		final Runtime runtime = Runtime.getRuntime();
-		final long maxMemory = runtime.maxMemory();
-		final long allocatedMemory = runtime.totalMemory();
-		final long freeMemory = runtime.freeMemory();
-		
-		StringBuilder sb = new StringBuilder();
-		sb.append( "Max mem [" ).append( maxMemory /1024 );
-		sb.append( "], Allocated mem [" ).append( allocatedMemory / 1024 );
-		sb.append( "], Free mem [" ).append( freeMemory / 1024 );
-		sb.append( "], Total Free mem [" ).append( (freeMemory + (maxMemory - allocatedMemory)) / 1024 );
-		sb.append( "]");
-		log( sb.toString() );
-		
-		return message;
-	}
-
-}

Copied: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java (from rev 21126, labs/jbossesb/trunk/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayMemoryUsageAction.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1,62 @@
+/*
+ * 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.sample.quickstart.smooksfilesplitterrouter.actions;
+
+import org.jboss.soa.esb.actions.BeanConfiguredAction;
+import org.jboss.soa.esb.actions.LogAction;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * Simple action that shows JVM memory usage. 
+ * </p>
+ * Exemple configuration:
+ * <pre>
+ *&lt;action name="logMemoryUsageAfter" class="org.jboss.soa.esb.actions.DisplayMemoryUsageAction"&gt;
+ *&lt;/action&gt;
+ * </pre>
+ * This action support all configuration properties that {@link LogAction} supports.
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
+ * @since 4.3
+ *
+ */
+public class DisplayMemoryUsageAction extends LogAction implements BeanConfiguredAction
+{
+	public Message process( final Message message )
+	{
+		final Runtime runtime = Runtime.getRuntime();
+		final long maxMemory = runtime.maxMemory();
+		final long allocatedMemory = runtime.totalMemory();
+		final long freeMemory = runtime.freeMemory();
+		
+		StringBuilder sb = new StringBuilder();
+		sb.append( "Max mem [" ).append( maxMemory /1024 );
+		sb.append( "], Allocated mem [" ).append( allocatedMemory / 1024 );
+		sb.append( "], Free mem [" ).append( freeMemory / 1024 );
+		sb.append( "], Total Free mem [" ).append( (freeMemory + (maxMemory - allocatedMemory)) / 1024 );
+		sb.append( "]");
+		log( sb.toString() );
+		
+		return message;
+	}
+
+}

Deleted: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java	2008-07-18 22:25:32 UTC (rev 21126)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,67 +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.sample.quickstart.smooksfilesplitterrouter.actions;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.jboss.soa.esb.actions.LogAction;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * Simple action that displays the current time.
- * </p>
- * Exemple configuration:
- * <pre>
- *&lt;action name="displayTime" class="org.jboss.soa.esb.actions.DisplayTimeAction"&gt;
- *	&lt;property name="format" value="HH:mm:ss:S"/&gt;
- *&lt;/action&gt;
- * </pre>
- * This action support all configuration properties that {@link LogAction} supports.
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- * @since 4.3
- *
- */
-public class DisplayTimeAction extends LogAction
-{
-	private String format;
-	
-	public Message process( final Message message )
-	{
-		SimpleDateFormat formatter = format == null ? new SimpleDateFormat() : new SimpleDateFormat( format );
-		log( formatter.format( new Date() ) );
-		
-		return message;
-	}
-
-	public String getFormat()
-	{
-		return format;
-	}
-
-	public void setFormat( String format )
-	{
-		this.format = format;
-	}
-
-}

Copied: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java (from rev 21126, labs/jbossesb/trunk/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/DisplayTimeAction.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1,67 @@
+/*
+ * 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.sample.quickstart.smooksfilesplitterrouter.actions;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.jboss.soa.esb.actions.LogAction;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * Simple action that displays the current time.
+ * </p>
+ * Exemple configuration:
+ * <pre>
+ *&lt;action name="displayTime" class="org.jboss.soa.esb.actions.DisplayTimeAction"&gt;
+ *	&lt;property name="format" value="HH:mm:ss:S"/&gt;
+ *&lt;/action&gt;
+ * </pre>
+ * This action support all configuration properties that {@link LogAction} supports.
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
+ * @since 4.3
+ *
+ */
+public class DisplayTimeAction extends LogAction
+{
+	private String format;
+	
+	public Message process( final Message message )
+	{
+		SimpleDateFormat formatter = format == null ? new SimpleDateFormat() : new SimpleDateFormat( format );
+		log( formatter.format( new Date() ) );
+		
+		return message;
+	}
+
+	public String getFormat()
+	{
+		return format;
+	}
+
+	public void setFormat( String format )
+	{
+		this.format = format;
+	}
+
+}

Deleted: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java	2008-07-18 22:25:32 UTC (rev 21126)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -1,128 +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.sample.quickstart.smooksfilesplitterrouter.actions;
-
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.actions.BeanConfiguredAction;
-import org.jboss.soa.esb.common.Environment;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * FileToStream is a converter that open a Stream to the filename
- * specified by the property filename.
- * Usage:
- * <pre>
- * &lt;action name="fileToStream" class="org.jboss.soa.esb.actions.converters.FileToStream"&gt;
- * &lt;/action&gt;
- * 
- * Optional parameters (default value(s) shown):
- *    &lt;proptery name="fileNameLocation" value="org.jboss.soa.esb.gateway.file" /&gt;
- * </pre>
- * Note that 'fileNameLocation' defaults to {@link Environment#ORIGINAL_FILE}
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
- *
- */
-public class FileToStream implements BeanConfiguredAction
-{
-	private Logger log = Logger.getLogger( FileToStream.class );
-	
-	private String fileNameLocation;
-	
-	public FileToStream()
-	{
-	}
-	
-	/**
-	 * Populates the ESB Message objects body with a InputStream for
-	 * the file identified by the {@link #fileNameLocation} field.
-	 * 
-	 * @param message 	- ESB message object
-	 * @return Message	- ESB message object which a payload that is an InputStream
-	 * @throws ActionProcessingException
-	 */
-	public Message process( final Message message ) throws ActionProcessingException
-	{
-		BufferedInputStream bin = getInputStream( getFileName( message ) );
-		message.getBody().add( bin );
-		
-		return message;
-	}
-
-	public String getFileNameLocation()
-	{
-		return fileNameLocation;
-	}
-
-	public void setFileNameLocation( final String fileNameLocation )
-	{
-		this.fileNameLocation = fileNameLocation;
-	}
-	
-	private String getFileName (final Message message ) throws ActionProcessingException
-	{
-		String fileName = fileNameLocation == null ? 
-				(String) message.getBody().get() :
-				(String) message.getBody().get( fileNameLocation );
-		
-		log.debug( "FileName : [" + fileName + "]" );
-		
-		if ( fileName == null )
-			throw new ActionProcessingException( "Didn't find a file as in property location [" + fileNameLocation + "] or as the default object in the message body." );
-		
-		return fileName;
-	}
-	
-	private BufferedInputStream getInputStream( final String fileName ) throws ActionProcessingException
-	{
-		BufferedInputStream bin = null;
-		try
-		{
-			bin = new BufferedInputStream( new FileInputStream ( fileName ));
-		} 
-		catch (FileNotFoundException e)
-		{
-			log.error( "FileNotFoundException : ", e);
-			if ( bin != null )
-			{
-				try
-				{
-					bin.close();
-				} 
-				catch (IOException e1)
-				{
-					log.error( "IOException while trying to clone FileInputStream to file : [" + fileName + "]", e1);
-				}
-			}
-			throw new ActionProcessingException( "IOException while creating InputStream for file : [" + fileName + "]", e );
-		}
-		return bin;
-	}
-
-
-}

Copied: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java (from rev 21126, labs/jbossesb/trunk/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java	                        (rev 0)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/smooks_file_splitter_router/src/org/jboss/soa/esb/sample/quickstart/smooksfilesplitterrouter/actions/FileToStream.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -0,0 +1,128 @@
+/*
+ * 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.sample.quickstart.smooksfilesplitterrouter.actions;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.actions.BeanConfiguredAction;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * FileToStream is a converter that open a Stream to the filename
+ * specified by the property filename.
+ * Usage:
+ * <pre>
+ * &lt;action name="fileToStream" class="org.jboss.soa.esb.actions.converters.FileToStream"&gt;
+ * &lt;/action&gt;
+ * 
+ * Optional parameters (default value(s) shown):
+ *    &lt;proptery name="fileNameLocation" value="org.jboss.soa.esb.gateway.file" /&gt;
+ * </pre>
+ * Note that 'fileNameLocation' defaults to {@link Environment#ORIGINAL_FILE}
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>			
+ *
+ */
+public class FileToStream implements BeanConfiguredAction
+{
+	private Logger log = Logger.getLogger( FileToStream.class );
+	
+	private String fileNameLocation;
+	
+	public FileToStream()
+	{
+	}
+	
+	/**
+	 * Populates the ESB Message objects body with a InputStream for
+	 * the file identified by the {@link #fileNameLocation} field.
+	 * 
+	 * @param message 	- ESB message object
+	 * @return Message	- ESB message object which a payload that is an InputStream
+	 * @throws ActionProcessingException
+	 */
+	public Message process( final Message message ) throws ActionProcessingException
+	{
+		BufferedInputStream bin = getInputStream( getFileName( message ) );
+		message.getBody().add( bin );
+		
+		return message;
+	}
+
+	public String getFileNameLocation()
+	{
+		return fileNameLocation;
+	}
+
+	public void setFileNameLocation( final String fileNameLocation )
+	{
+		this.fileNameLocation = fileNameLocation;
+	}
+	
+	private String getFileName (final Message message ) throws ActionProcessingException
+	{
+		String fileName = fileNameLocation == null ? 
+				(String) message.getBody().get() :
+				(String) message.getBody().get( fileNameLocation );
+		
+		log.debug( "FileName : [" + fileName + "]" );
+		
+		if ( fileName == null )
+			throw new ActionProcessingException( "Didn't find a file as in property location [" + fileNameLocation + "] or as the default object in the message body." );
+		
+		return fileName;
+	}
+	
+	private BufferedInputStream getInputStream( final String fileName ) throws ActionProcessingException
+	{
+		BufferedInputStream bin = null;
+		try
+		{
+			bin = new BufferedInputStream( new FileInputStream ( fileName ));
+		} 
+		catch (FileNotFoundException e)
+		{
+			log.error( "FileNotFoundException : ", e);
+			if ( bin != null )
+			{
+				try
+				{
+					bin.close();
+				} 
+				catch (IOException e1)
+				{
+					log.error( "IOException while trying to clone FileInputStream to file : [" + fileName + "]", e1);
+				}
+			}
+			throw new ActionProcessingException( "IOException while creating InputStream for file : [" + fileName + "]", e );
+		}
+		return bin;
+	}
+
+
+}

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/build.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/build.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -5,7 +5,7 @@
 		${line.separator}
 	</description>
 			
-	<property name="additional.deploys" value="smooks-cdr.lst,smooks-res.xml" />
+	<property name="additional.deploys" value="smooks-res.xml" />
 	
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/readme.txt
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/readme.txt	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/readme.txt	2008-07-21 06:32:32 UTC (rev 21139)
@@ -52,19 +52,3 @@
 
   The Flash demo at:
   	http://labs.jboss.com/portal/jbossesb/resources/tutorials/xformation-demos/console-demo-03.html
-
-Playing with this Transformation through the Administration Console:
-====================================================================
-  To load the Transformation Configurations defined in smooks-res.xml into the
-  Admin Console, and have them managed from the Admin Console, do the following:
-  
-  1. Deploy the console as outlined in MessageTransformation.pdf.
-  2. Edit the smooks-cdr.lst file in this folder, commenting out both the
-     classpath based listings and uncommenting out the listing for the console
-     HTTP URI.  The same set of steps were executed at the start of the Flash
-     demo.
-  3. In the console, import "smooks-res.xml" through the "Import Configurations"
-     form.
-  4. You are now ready to start managing the message transformations through the
-     console.  You can add more transformations and modify the existing
-     transformations.

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_date_manipulation/build.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -5,7 +5,7 @@
 		${line.separator}
 	</description>
 			
-	<property name="additional.deploys" value="smooks-cdr.lst,smooks-res.xml" />
+	<property name="additional.deploys" value="smooks-res.xml" />
 
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_date_manipulation/readme.txt
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_date_manipulation/readme.txt	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_date_manipulation/readme.txt	2008-07-21 06:32:32 UTC (rev 21139)
@@ -70,24 +70,3 @@
     orderDate value and extracting the components of the date from it (day,
     month, zone etc).  This means you avoid having to do this in your XSLT code,
     which would be very ugly and difficult to maintain.
-
-Playing with this Transformation through the Administration Console:
-====================================================================
-  To load the Transformation Configurations defined in smooks-res.xml into the
-  Admin Console, and have them managed from the Admin Console, do the following:
-  
-  1. Deploy the console as outlined in MessageTransformation.pdf.
-  2. Edit the smooks-cdr.lst file in this folder, commenting out both the
-     classpath based listings and uncommenting out the listing for the console
-     HTTP URI.
-  3. In the console:
-    a) Add "Message Exchange Participants" for "A" and "B" through the "Manage
-       Message Exchange Participants" form.
-    b) Add new "Message Contract" against "A" and "B" for "text/xml:messageAtA"
-       and "text/xml:messageAtB" respectively.
-       Note: "messageAtA" and "messageAtB" are the Message Namespace values and
-       "text/xml" is the Message Mime in both cases.
-    c) Import "smooks-res.xml" through the "Import Configurations" form.
-  4. You are now ready to start managing the message transformations through the
-     console.  You can add more transformations and modify the existing
-     transformations.  Be sure to read MessageTransformation.pdf!!!

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_simple/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_simple/build.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_simple/build.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -4,7 +4,7 @@
 		${line.separator}
 	</description>
 			
-	<property name="additional.deploys" value="smooks-cdr.lst,smooks-res.xml" />
+	<property name="additional.deploys" value="smooks-res.xml" />
 
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_simple/readme.txt
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_simple/readme.txt	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_simple/readme.txt	2008-07-21 06:32:32 UTC (rev 21139)
@@ -64,24 +64,3 @@
         running "ant notifyUpdate".
     6.  Rerun the sample again ("ant runtest") and notice the
         transformation update.
-
-Playing with this Transformation through the Administration Console:
-====================================================================
-  To load the Transformation Configurations defined in smooks-res.xml into the
-  Admin Console, and have them managed from the Admin Console, do the following:
-  
-  1. Deploy the console as outlined in MessageTransformation.pdf.
-  2. Edit the smooks-cdr.lst file in this folder, commenting out both the
-     classpath based listings and uncommenting out the listing for the console
-     HTTP URI.
-  3. In the console:
-    a) Add "Message Exchange Participants" for "A" and "B" through the "Manage
-       Message Exchange Participants" form.
-    b) Add new "Message Contract" against "A" and "B" for "text/xml:messageAtA"
-       and "text/xml:messageAtB" respectively.
-       Note: "messageAtA" and "messageAtB" are the Message Namespace values and
-       "text/xml" is the Message Mime in both cases.
-    c) Import "smooks-res.xml" through the "Import Configurations" form.
-  4. You are now ready to start managing the message transformations through the
-     console.  You can add more transformations and modify the existing
-     transformations.
\ No newline at end of file

Modified: labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_stream/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_stream/build.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/samples/quickstarts/transform_XML2XML_stream/build.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -4,7 +4,7 @@
 		${line.separator}
 	</description>
 			
-	<property name="additional.deploys" value="smooks-cdr.lst,smooks-res.xml" />
+	<property name="additional.deploys" value="smooks-res.xml" />
 
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>

Modified: labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionComponent.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -32,7 +32,6 @@
 import org.rhq.core.domain.configuration.PropertySimple;
 import org.mc4j.ems.connection.bean.EmsBean;
 
-
 /**
  * @author Greg Hinkle
  */
@@ -42,14 +41,19 @@
     private static final String SUCCESS_PROCESSED = "messages successfully processed count";
     private static final String FAILED_PROCESSED = "messages failed count";
     private static final String PROCESSING_TIME = "processing time";
+    private static final String OVERALL_BYTES_PROCESSED = "bytes processed";
+    private static final String OVERALL_BYTES_FAILED = "bytes failed";
     
     private static final String SUCCESS_METRIC_NAME = "successProcessedCount";
     private static final String FAILED_METRIC_NAME = "failedProcessedCount";
     private static final String PROCESSINGTIME_METRIC_NAME = "processingTime";
+    private static final String BYTESPROCESSED_METRIC_NAME = "overallBytesProcessed";
+    private static final String BYTESFAILED_METRIC_NAME = "overallBytesFailed";
 
     @Override
     public void start(ResourceContext<MBeanResourceComponent> context) {
-        this.context = context;
+       	super.start(context); 
+	this.context = context;
         this.bean = context.getParentResourceComponent().getEmsBean();
     }
 
@@ -81,6 +85,14 @@
         		} else {
         			report.addData(new MeasurementDataNumeric(request, new Double(0)));
         		}
+        	} else if (metricName.equals(BYTESPROCESSED_METRIC_NAME)) {
+        		EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_PROCESSED);
+        		Integer bytesProcessed = (Integer) attribute.refresh();
+        		report.addData(new MeasurementDataNumeric(request, new Double(bytesProcessed.doubleValue())));
+        	} else if (metricName.equals(BYTESFAILED_METRIC_NAME)) {
+        		EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_FAILED);
+        		Integer bytesProcessed = (Integer) attribute.refresh();
+        		report.addData(new MeasurementDataNumeric(request, new Double(bytesProcessed.doubleValue())));        		
         	}
         }
     }

Modified: labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionDiscoveryComponent.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionDiscoveryComponent.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ActionDiscoveryComponent.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -51,7 +51,7 @@
 	private static final String MESSAGES_SUCCESSFULLY_PROCESSED = "messages successfully processed count";
 	private static final String MESSAGES_FAILED_COUNT = "messages failed count";
 	private static final String MESSAGES_PROCESSED_TIME = "processing time";
-	
+	private static final String OVERALL_BYTES_PROCESSED = "overall bytes processed";
 	private static Log log = LogFactory.getLog(ActionDiscoveryComponent.class);
 	
 	protected ResourceContext<T> resourceContext;
@@ -60,7 +60,6 @@
 		this.resourceContext = context;
 	}
 	
-	
 	public AvailabilityType getAvailability() {
 		JMXComponent parent = resourceContext.getParentResourceComponent();
 		

Modified: labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ServiceComponent.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -41,12 +41,20 @@
 
     private static final String OVERALL_MESSAGE_COUNT = "overall service message count";    
     private static final String OVERALL_MESSAGE_METRIC = "overallMessageCount";
+   
+    private static final String OVERALL_BYTES_PROCESSED_METRIC = "overallBytesProcessed";
+    private static final String OVERALL_BYTES_FAILED_METRIC = "overallBytesFailed";
     
+    private static final String OVERALL_BYTES_PROCESSED = "overall bytes processed";
+    private static final String OVERALL_BYTES_FAILED = "overall bytes failed";
+
     @Override
     public void start(ResourceContext<MBeanResourceComponent> context) {
+        super.start(context);
         this.context = context;
     }
 
+
     @Override
     public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) {
     	Configuration pluginConfig = this.context.getPluginConfiguration();
@@ -57,6 +65,14 @@
         		EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_MESSAGE_COUNT);
         		Integer processed = (Integer) attribute.refresh();
         		report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
+        	} else if (metricName.equals(OVERALL_BYTES_PROCESSED_METRIC)) {
+        		EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_PROCESSED);
+        		Integer processed = (Integer) attribute.refresh();
+        		report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
+        	} else if (metricName.equals(OVERALL_BYTES_FAILED_METRIC)) {
+        		EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_FAILED);
+        		Integer processed = (Integer) attribute.refresh();
+        		report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));        		
         	}
         }
     }

Modified: labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/resources/META-INF/rhq-plugin.xml	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/product/tools/jonplugin/src/main/resources/META-INF/rhq-plugin.xml	2008-07-21 06:32:32 UTC (rev 21139)
@@ -23,7 +23,7 @@
       </runs-inside>
 
       <plugin-configuration>
-         <c:simple-property name="objectName" readOnly="true" default="jboss.esb:deployment=%deployment%,type=esb"/>
+         <c:simple-property name="objectName" readOnly="true" default="jboss.esb:deployment=%deployment%"/>
          <c:simple-property name="nameTemplate" default="{deployment} JBoss ESB statistics"/>
          <c:simple-property name="descriptionTemplate" default="JBoss ESB statistics for the {deployment} deployment."/>
          <c:simple-property name="deployment" type="string" description="the JBoss ESB deployment name"/>
@@ -59,7 +59,9 @@
               <c:simple-property name="serviceName" type="string" description="the JBoss ESB service name"/>
          </plugin-configuration>
          <operation name="reset" displayName="Reset the message counter" description="Reset the message counter"/>
-         <metric displayName="Overall Service Message Count" property="overallMessageCount" category="throughput" displayType="summary" measurementType="trendsup" description="Overall Service Message Count"/> 
+         <metric displayName="Overall Service Message Count" property="overallMessageCount" category="throughput" displayType="summary" measurementType="trendsup" description="Overall Service Message Count"/>
+	 <metric displayName="Overall Service Bytes Processed" property="overallBytesProcessed" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup" description="Overall Service Bytes Processed"/>
+	 <metric displayName="Overall Service Bytes Failed" property="overallBytesFailed" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup" description="Overall Service Bytes Failed"/>
          <help>
              <![CDATA[
 	         JBoss ESB Service
@@ -75,6 +77,8 @@
          	     <c:simple-property name="descriptionTemplate" default="JBoss ESB statistics for the {actionName} action."/>
          		 <c:simple-property name="actionName" type="string" description="the JBoss ESB action name"/>
 			</plugin-configuration>
+	 	<metric displayName="Bytes Processed" property="overallBytesProcessed" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup"/>
+		<metric displayName="Bytes Failed" property="overallBytesFailed" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup"/>
 	        <metric displayName="Messages Successfully Processed" property="successProcessedCount" category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup"/>
 	        <metric displayName="Messages Failed" property="failedProcessedCount"  category="throughput" displayType="summary" defaultOn="true" measurementType="trendsup"/>
 	        <metric displayName="Processing Time" property="processingTime" displayType="summary" defaultOn="true" category="performance"/>

Modified: labs/jbossesb/workspace/dbevenius/security/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BusinessRulesServiceTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/security/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BusinessRulesServiceTest.java	2008-07-21 06:06:02 UTC (rev 21138)
+++ labs/jbossesb/workspace/dbevenius/security/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BusinessRulesServiceTest.java	2008-07-21 06:32:32 UTC (rev 21139)
@@ -39,8 +39,12 @@
 	public void testMessage() throws Exception {
                 clearMessages();
 		sendMessage();
-		final String[] messages = waitForMessages(1, 30000) ;
-        assertTrue(messages[0].toString().startsWith("{orderItemList=[1,1,364,The 40-Year-Old Virgin ,29.98, 2,1,299,Pulp Fiction,29.99]"));
+
+        final String[] messages = waitForMessages(1, 30000) ;
+        String expected = "orderItemList=[1,1,364,The 40-Year-Old Virgin ,29.98, 2,1,299,Pulp Fiction,29.99]";
+        String actual = messages[0].toString();
+
+        assertTrue("Expected message to contain '" + expected + "'. Actual '" + actual + "'.", (actual.indexOf(expected) != -1));
 	}
 
 	public void sendMessage() throws Exception {




More information about the jboss-svn-commits mailing list