[jboss-svn-commits] JBL Code SVN: r8468 - in labs/jbossesb/trunk/product/samples/trailblazer: . esb/conf esb/src/org/jboss/soa/esb/samples/trailblazer/util

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Dec 20 18:05:07 EST 2006


Author: daniel.brum at jboss.com
Date: 2006-12-20 18:05:04 -0500 (Wed, 20 Dec 2006)
New Revision: 8468

Modified:
   labs/jbossesb/trunk/product/samples/trailblazer/build.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java
Log:
ConfigController changes to use the new XSD validated approach

Modified: labs/jbossesb/trunk/product/samples/trailblazer/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/build.xml	2006-12-20 22:57:54 UTC (rev 8467)
+++ labs/jbossesb/trunk/product/samples/trailblazer/build.xml	2006-12-20 23:05:04 UTC (rev 8468)
@@ -24,7 +24,7 @@
 	<!-- UPDATE THIS WITH YOUR JBOSS_HOME AND SERVER -->
 	<property file="build.properties" />
 
-	<property name="org.jboss.soa.samples.trailblazer.jboss_home" 		value="/usr/local/jboss-4.0.4"/>
+	<property name="org.jboss.soa.samples.trailblazer.jboss_home" 		value="/dev/jboss4.0.5"/>
 	<property name="org.jboss.soa.samples.trailblazer.jboss_server"	value="default"/>
 
 	<property name="org.jboss.soa.samples.trailblazer.esb_home"	 	location="../../"/>
@@ -222,7 +222,7 @@
 	<target name="runESB" depends="jar">
 		<echo>Running ESB Trailblazer listeners</echo>
 		<java fork="yes" classname="org.jboss.soa.esb.samples.trailblazer.util.Launcher" failonerror="true" 
-			args="600 ${basedir}/esb/conf/jbossesb-listener.xml ${basedir}/esb/conf/jbossesb-gateway.xml">
+			args="600 ${basedir}/esb/conf/jbossesb.xml">
 			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath.run"/>
 		</java>
 	</target>

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml	2006-12-20 22:57:54 UTC (rev 8467)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb.xml	2006-12-20 23:05:04 UTC (rev 8468)
@@ -19,7 +19,7 @@
 
 	</providers>
 	<services>    
-		<service category="trailblazer-jmsbank" name="jmsbankreplies" description="Trailblazer Bank Service" is-gateway="true" >
+		<service category="trailblazer-jmsbank" name="jmsbankreplies" description="Trailblazer Bank Service" is-gateway="true" target-service-name="jmsbankreplies" target-service-category="trailblazer-jmsbank">
 			<listeners>    	    
 				<jms-listener name="trailblazer-jmsbank"
 							  busidref="QueueD"
@@ -34,7 +34,7 @@
 			</listeners>
 			<actions>
 				<action class="org.jboss.soa.esb.samples.trailblazer.actions.BankResponseActions"
-					process="processResponseFromJMSBank">
+					process="processResponseFromJMSBank" name="fido">
 				</action>
 			</actions>
 		</service>
@@ -46,7 +46,7 @@
 			</listeners>
 			<actions>
 				<action class="org.jboss.soa.esb.samples.trailblazer.actions.BankResponseActions"
-						process="processResponseFromJMSBank"/>
+						process="processResponseFromJMSBank" name="pepe"/>
 			</actions>
 		</service>
 	</services>

Modified: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java	2006-12-20 22:57:54 UTC (rev 8467)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java	2006-12-20 23:05:04 UTC (rev 8468)
@@ -8,6 +8,7 @@
 import org.apache.log4j.xml.DOMConfigurator;
 import org.jboss.internal.soa.esb.persistence.format.db.DBConnectionManager;
 import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.listeners.config.ConfigurationController;
 import org.jboss.soa.esb.listeners.gateway.GatewayListenerController;
 import org.jboss.soa.esb.listeners.message.EsbListenerController;
 import org.jboss.soa.esb.listeners.message.EsbListenerControllerFactory;
@@ -29,19 +30,19 @@
 		System.setProperty("org.jboss.soa.esb.propertyFile", "jbossesb-properties.xml");	
 		
 		//Adding the to make it easy to run in eclipse
-		String arg0=null, arg1=null, arg2=null;
+		String arg0=null, arg1=null;
 		String baseDir="";
 		if (args.length==0) {
-			arg0 = "60";
-			if (TestEnvironmentUtil.getUserDir("trailblazer2").equals("trailblazer2/")) {
-				baseDir = "product/samples/trailblazer2/";				
+			arg0 = "600";	//run for 10 minutes
+			if (TestEnvironmentUtil.getUserDir("trailblazer").equals("trailblazer/")) {
+				baseDir = "product/samples/trailblazer/";				
 			}
-			arg1 = baseDir + "esb/conf/jbossesb-listener.xml";
-			arg2 = baseDir + "esb/conf/jbossesb-gateway.xml";
-			System.out.println("Setting default arguments:" + arg0 + " " + arg1 + " " + arg2);
+			arg1 = baseDir + "esb/conf/jbossesb.xml";
+			
+			System.out.println("Setting default arguments:" + arg0 + " " + arg1);
 		}
 		//eclipse peace out
-		if (args.length > 1) {
+		if (args.length == 2) {
 			arg0 = args[0];
 			arg1 = args[1];
 		}
@@ -51,14 +52,37 @@
 		
 		
 		Launcher launcher = new Launcher();
-		if(args.length > 2) {
-			System.out.println("calling triggerListener with 3 arguments...");
-			launcher.triggerListener(Long.valueOf(arg0).longValue(), arg1, args[2]);
-		}else
-			launcher.triggerListener(Long.valueOf(arg0).longValue(), arg1, null);
+		launcher.start(Long.valueOf(arg0).longValue(), arg1);	
 	
 	}
 	
+	private void start(long runTime, String esbConfigFile) throws Exception{
+		
+		try {
+		//setupRegistry();				
+		runBeforeAllTests();
+		ConfigurationController esbController = new ConfigurationController(esbConfigFile, null);
+		Thread controller = new Thread(esbController);
+		controller.start(); 
+		}
+		catch (Exception e) {
+			_logger.error(e);
+        	e.printStackTrace();
+        	System.exit(1);
+		}
+		
+		
+		if (runTime > 0) {
+			Thread.sleep(runTime*1000);
+		}
+		
+		runAfterAllTests();
+		System.exit(0);
+		
+		
+		
+	}
+	
 	private void triggerListener(long runTime, String messageAwareConfigFile, String gatewayConfigFile) throws Exception{
 		try 
         {
@@ -110,7 +134,7 @@
 	//System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "on");
 	String baseDir="";
 	String productDir = "../../";
-	if (TestEnvironmentUtil.getUserDir("trailblazer2").equals("trailblazer2/")) {
+	if (TestEnvironmentUtil.getUserDir("trailblazer").equals("trailblazer/")) {
 		baseDir = "product/samples/trailblazer2/";
 		productDir = "product/";
 	}




More information about the jboss-svn-commits mailing list