[jboss-svn-commits] JBL Code SVN: r25329 - in labs/jbossesb/branches/JBESB_4_4_GA_FP/product: rosetta/src/org/jboss/soa/esb/listeners/config/mappers110 and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Feb 18 20:22:57 EST 2009


Author: beve
Date: 2009-02-18 20:22:57 -0500 (Wed, 18 Feb 2009)
New Revision: 25329

Added:
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_esbaware.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_gateways.xml
Modified:
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsd
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-unfiltered.xml
Log:
Work for https://jira.jboss.org/jira/browse/JBESB-2409 "ftp-message-filter: add support for the 'post-rename' attribute"


Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsd
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsd	2009-02-19 00:13:49 UTC (rev 25328)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/etc/schemas/xml/jbossesb-1.1.0.xsd	2009-02-19 01:22:57 UTC (rev 25329)
@@ -1117,6 +1117,16 @@
 					</xsd:documentation>
 				</xsd:annotation>
 			</xsd:attribute>
+			<xsd:attribute default="true" name="post-rename"
+                type="xsd:boolean" use="optional">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">
+                        If true, the file will be renamed after it is
+                        processed. Note that in that case post-directory
+                        and post-suffix have no effect.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
 			<xsd:attribute name="post-directory" type="xsd:string"
 				use="optional">
 				<xsd:annotation>

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java	2009-02-19 00:13:49 UTC (rev 25328)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java	2009-02-19 01:22:57 UTC (rev 25329)
@@ -124,6 +124,8 @@
 		toElement.setAttribute(FTPEpr.INPUT_SUFFIX_TAG, messageFilter.getInputSuffix());
 		toElement.setAttribute(FTPEpr.WORK_SUFFIX_TAG, messageFilter.getWorkSuffix());
 		toElement.setAttribute(FTPEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
+		toElement.setAttribute(FTPEpr.POST_RENAME_TAG, String.valueOf(messageFilter.getPostRename()));
+		
 		if (!messageFilter.getPostDelete()) {
 			toElement.setAttribute(FTPEpr.POST_DIR_TAG, messageFilter.getPostDirectory());
 			toElement.setAttribute(FTPEpr.POST_SUFFIX_TAG, messageFilter.getPostSuffix());

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java	2009-02-19 00:13:49 UTC (rev 25328)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java	2009-02-19 01:22:57 UTC (rev 25329)
@@ -23,8 +23,10 @@
 
 import junit.framework.TestCase;
 import org.apache.log4j.Logger;
+import org.apache.xalan.xsltc.compiler.util.TestGenerator;
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.Environment;
 import org.jboss.soa.esb.testutils.FileUtil;
 
 import java.io.File;
@@ -62,19 +64,29 @@
     }
 
 	public void test_generate_files() throws ConfigurationException, IOException {
+        System.setProperty("jboss.esb.invm.scope.default", "NONE");
 		test_generate_files("jbossesb_config_01.xml");
 		test_generate_files("jbossesb_config_02.xml");
 	}
 
     public void test_generate_files110() throws ConfigurationException, IOException {
-        test_generate_files("jbossesb_config_01.110.xml");
-        test_generate_files("jbossesb_config_02.110.xml");
+        System.setProperty("jboss.esb.invm.scope.default", "NONE");
+        test_generate_files110("jbossesb_config_01.110.xml");
+        test_generate_files110("jbossesb_config_02.110.xml");
     }
+    
+	public void test_generate_files(String filename) throws ConfigurationException, IOException {
+	    test_generate_files(filename, "jbossesb_config_01_gateways.xml", "jbossesb_config_01_esbaware.xml");
+	}
+	
+	public void test_generate_files110(String filename) throws ConfigurationException, IOException {
+	    test_generate_files(filename, "jbossesb_config_110_gateways.xml", "jbossesb_config_110_esbaware.xml");
+	}
 
-	public void test_generate_files(String filename) throws ConfigurationException, IOException {
+	public void test_generate_files(String filename, String esbGatewayConfig, String esbAwareConfig) 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 expectedGatewayConfig = new String(StreamUtils.readStream(getClass().getResourceAsStream(esbGatewayConfig))).trim();
+		String expectedESBAwareConfig = new String(StreamUtils.readStream(getClass().getResourceAsStream(esbAwareConfig))).trim();
 		String actualGatewayConfig;
 		String actualESBAwareConfig;
 
@@ -99,6 +111,7 @@
 		log.debug("Strings identical=" + isIndentical);
         assertEquals(expectedESBAwareConfig, actualESBAwareConfig);
 	}
+	
 
 	public void test_bad_base_listener_busref() throws ConfigurationException, IOException {
 		Generator generator = new Generator(getClass().getResourceAsStream("jbossesb_config_03.xml"));
@@ -153,7 +166,7 @@
 			}
 		}
 	}
-
+	
 	/* (non-Javadoc)
 	 * @see junit.framework.TestCase#tearDown()
 	 */

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml	2009-02-19 00:13:49 UTC (rev 25328)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01.110.xml	2009-02-19 01:22:57 UTC (rev 25329)
@@ -17,7 +17,7 @@
 		
 		<ftp-provider name="FTP" hostname="localhost:21">
 			<ftp-bus busid="Ftp-ServerTest">
-				<ftp-message-filter directory="/Temp" input-suffix=".txt" username="joe" password="secret"/>
+				<ftp-message-filter directory="/Temp" input-suffix=".txt" username="joe" password="secret" post-rename="true"/>
 			</ftp-bus>
 		</ftp-provider>
 		

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml	2009-02-19 00:13:49 UTC (rev 25328)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.110.xml	2009-02-19 01:22:57 UTC (rev 25329)
@@ -41,6 +41,7 @@
 				<property name="inputSuffix" value=".txt" />
 				<property name="errorDelete" value="true" />
 				<property name="postDelete" value="true" />
+				<property name="postRename" value="true" />
 				<property name="passive" value="false" />
 				<property name="workSuffix" value=".esbInProcess" />
 			</bus>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_esbaware.xml (from rev 24842, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_esbaware.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_esbaware.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_esbaware.xml	2009-02-19 01:22:57 UTC (rev 25329)
@@ -0,0 +1 @@
+<?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" postRename="true" workSuffix="!
 .esbInProcess"/><action action="TestFtpRouteAction" class="org.jboss.s
oa.esb.actions.ContentBasedRouter"/></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

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_gateways.xml (from rev 24842, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_gateways.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_gateways.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_110_gateways.xml	2009-02-19 01:22:57 UTC (rev 25329)
@@ -0,0 +1 @@
+<?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/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-unfiltered.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-unfiltered.xml	2009-02-19 00:13:49 UTC (rev 25328)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-unfiltered.xml	2009-02-19 01:22:57 UTC (rev 25329)
@@ -1,5 +1,5 @@
 <?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">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
 
     <providers>
           <ftp-provider name="FTPprovider" hostname="@FTP_HOSTNAME@" >
@@ -12,6 +12,7 @@
           			input-suffix=".dat"
           			work-suffix=".esbWorking"
           			post-delete="false"
+          			post-rename="true"
           			post-suffix=".COMPLETE"
           			error-delete="false"
           			error-suffix=".HAS_ERROR"
@@ -51,7 +52,7 @@
                               busidref="quickstartEsbChannel"
                 />
             </listeners>
-            <actions>
+            <actions mep="OneWay">
                    <action name="action1" 
                    	class="org.jboss.soa.esb.samples.quickstart.helloworldftpaction.MyAction" 
                    	process="displayMessage,playWithMessage" 




More information about the jboss-svn-commits mailing list