[jboss-svn-commits] JBL Code SVN: r8689 - in labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration: . src/quickstart

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jan 4 13:25:27 EST 2007


Author: kevin.conner at jboss.com
Date: 2007-01-04 13:25:24 -0500 (Thu, 04 Jan 2007)
New Revision: 8689

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb.xml
Removed:
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/esb-config-gateway.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/esb-config.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/Launcher.java
Modified:
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml
Log:
Updated jbossesb.xml and configured for standalone

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml	2007-01-04 18:22:49 UTC (rev 8688)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/build.xml	2007-01-04 18:25:24 UTC (rev 8689)
@@ -5,8 +5,7 @@
   <property name="build.dir" value="${basedir}/build"/>
   <property name="src.dir" value="${basedir}/src"/>
 		
-  <property name="esb-config" value="${basedir}/esb-config.xml"/>
-  <property name="esb-config-gateway" value="${basedir}/esb-config-gateway.xml"/>
+  <property name="jbossesb-config" value="${basedir}/jbossesb.xml"/>
 
 	<path id="classpath">
   <!-- fileset dir="${basedir}" includes="jbossesb-properties.xml" -->
@@ -56,10 +55,8 @@
 
   <target name="run" depends="jars">
      <echo>Basic JMS Gateway and Listener</echo>
-     <java fork="yes" classname="quickstart.Launcher" failonerror="true">
-     	<arg value="0"/>
-     	<arg value="${esb-config}"/>
-     	<arg value="${esb-config-gateway}"/>
+    <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
+    	<arg value="${jbossesb-config}"/>
 		<classpath refid="classpath"/>
      </java>     
   </target>	
@@ -71,4 +68,4 @@
 		<classpath refid="classpath"/>
      </java>
   </target>  
-</project>
\ No newline at end of file
+</project>

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/esb-config-gateway.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/esb-config-gateway.xml	2007-01-04 18:22:49 UTC (rev 8688)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/esb-config-gateway.xml	2007-01-04 18:25:24 UTC (rev 8689)
@@ -1,15 +0,0 @@
-<esb-config-gateway parameterReloadSecs="180">
-   <esb-jms-gateway
-    target-service-category="UsingDBRegServices"
-	  target-service-name="UsingDBRegJMSService"	  
-   	gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener"
-	  connection-factory="ConnectionFactory"
-   	destination-type="queue"
-   	destination-name="queue/quickstart_helloworld_Request"
-    jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-    jndi-URL="localhost"
-   >
-   <!-- no action needed as the inbound message is automatically converted
-     and sent to the queue for the target service -->  
-   </esb-jms-gateway>   
-</esb-config-gateway>
\ No newline at end of file

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/esb-config.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/esb-config.xml	2007-01-04 18:22:49 UTC (rev 8688)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/esb-config.xml	2007-01-04 18:25:24 UTC (rev 8689)
@@ -1,17 +0,0 @@
-<esb-config parameterReloadSecs="180">
-   <esb-listener
-    service-category="UsingDBRegServices"
-  	service-name="UsingDBRegJMSService"
-    service-description="Simply listens for ESB Messages"
-	  epr-description="Hello World"
-   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
-	  connection-factory="ConnectionFactory"
-	  destination-type="queue"
-   	destination-name="queue/B"
-    jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-    jndi-URL="localhost"
-
-   >
-	   <action class="quickstart.MyJMSListenerAction" process="displayMessage" />	  
-   </esb-listener>   
-</esb-config>
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb.xml	2007-01-04 18:22:49 UTC (rev 8688)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb.xml	2007-01-04 18:25:24 UTC (rev 8689)
@@ -0,0 +1,39 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" >
+    <providers>
+        <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+            jndi-URL="localhost">
+            <jms-bus busid="helloworldDBGatewayChannel">
+                <jms-message-filter dest-name="queue/quickstart_helloworld_Request"
+                    dest-type="QUEUE" selector="type='fromHelloworldDBGateway'"/>
+            </jms-bus>
+            <jms-bus busid="helloworldDBServiceChannel">
+                <jms-message-filter dest-name="queue/quickstart_helloworld_Request"
+                    dest-type="QUEUE" selector="type='fromHelloworldDBService'"/>
+            </jms-bus>
+        </jms-provider>
+    </providers>
+    
+    <services>
+        <service category="UsingDBRegServices" name="UsingDBRegGateway"
+            target-service-category="UsingDBRegServices"
+            target-service-name="UsingDBRegJMSService"
+        	description="Hello World DB JMS Gateway" is-gateway="true">
+            <listeners>
+                <jms-listener name="helloworldDBGatewayListener"
+                    busidref="helloworldDBGatewayChannel" maxThreads="1"/>
+            </listeners>
+        </service>
+        <service category="UsingDBRegServices" name="UsingDBRegJMSService"
+        	description="Hello World DB JMS Service" is-gateway="false">
+            <listeners>
+                <jms-listener name="helloworldDBServiceListener"
+                    busidref="helloworldDBServiceChannel" maxThreads="1"/>
+            </listeners>
+            <actions>
+                <action name="helloworldDBAction" class="quickstart.MyJMSListenerAction" 
+                   	process="displayMessage"/>
+            </actions>
+        </service>
+    </services>
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/jbossesb.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:keywords
   + Rev Date

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/Launcher.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/Launcher.java	2007-01-04 18:22:49 UTC (rev 8688)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_db_registration/src/quickstart/Launcher.java	2007-01-04 18:25:24 UTC (rev 8689)
@@ -1,81 +0,0 @@
-package quickstart;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.listeners.gateway.GatewayListenerController;
-import org.jboss.soa.esb.listeners.message.EsbListenerController;
-import org.jboss.soa.esb.listeners.message.EsbListenerControllerFactory;
-
-
-public class Launcher {	
-	private static Log log = LogFactory.getLog(Launcher.class);
-	
-	private EsbListenerController	_esbListController;
-	private GatewayListenerController _gatewayController;
-	
-	
-	
-	private Logger _logger = Logger.getLogger(Launcher.class);
-	
-	public static void main (String args[]) throws Exception {
-		
-		log.info("args passed into Launcher: " + args.length);
-		for (int x=0; x<args.length; x++)
-			log.info("arg[" + x + "]=" + args[x]);
-		
-		
-		Launcher launcher = new Launcher();
-		
-		launcher.triggerListener(Long.valueOf(args[0]).longValue(), args[1], args[2]);
-	
-	}
-	
-	private void triggerListener(long runTime, String messageAwareConfigFile, 
-		String gatewayConfigFile) throws Exception{
-		try 
-        {
-								
-    		if (null != messageAwareConfigFile) {
-    			_logger.info("starting message aware listener with config file - " + 
-    					messageAwareConfigFile);
-    			_esbListController = EsbListenerControllerFactory.getInstance(messageAwareConfigFile);
-    		}
-    		if (null != gatewayConfigFile) {
-    			_logger.info("starting gateway listener with config file - " + 
-    					gatewayConfigFile);
-    			_gatewayController = new GatewayListenerController(gatewayConfigFile);
-    			new Thread(_gatewayController).start();
-    			
-    			Thread.sleep(2000);
-    		}
-    		
-    		System.out.println("**Listener Ready**");
-    		
-//    		This code is used to automatically shutdown the listeners which
-//    		might be useful for automated testing purposes. It is not needed
-//    		in the quickstart samples.
-//    		_logger.info("going to sleep now for " + runTime + " milliseconds...");    		
-//    		Thread.sleep(runTime);
-//    		if (null != messageAwareConfigFile) {
-//    			_logger.info("shutting down message aware listener...");
-//    			_esbListController.requestEnd();
-//    		}
-//    		
-//    		if (null != gatewayConfigFile) {
-//    			_logger.info("shutting down gateway listener...");
-//    			_gatewayController.requestEnd();
-//    		}
-    		
-    	
-        }
-        catch (Exception e) { 
-        	_logger.error(e);
-        	throw(e);
-        }
-        
-	
-	}		
-	
-
-}
\ No newline at end of file




More information about the jboss-svn-commits mailing list