[jboss-svn-commits] JBL Code SVN: r8954 - in labs/jbossesb/trunk/product/samples/quickstarts: fun_cbr and 10 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Jan 21 11:23:31 EST 2007


Author: burrsutter
Date: 2007-01-21 11:23:30 -0500 (Sun, 21 Jan 2007)
New Revision: 8954

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/SampleOrder.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/readme.txt
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-cdr.lst
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-res.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/Customer.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/DVDStoreAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderHeader.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderItem.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/orderitem.st
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/services/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/services/rules/
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/services/rules/MyESBRules-XPath.drl
Log:


Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/SampleOrder.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/SampleOrder.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/SampleOrder.xml	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,12 @@
+<Order orderId="1" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="0" 
+netAmount="59.97" totalAmount="64.92" tax="4.95">
+	<Customer userName="user1" firstName="Harry" lastName="Fletcher" state="SD"/>
+	<OrderLines>
+		<OrderLine position="1" quantity="1">
+			<Product productId="364" title="The 40-Year-Old Virgin " price="29.98"/>
+		</OrderLine>
+		<OrderLine position="2" quantity="1">
+			<Product productId="299" title="Pulp Fiction" price="29.99"/>
+		</OrderLine>
+	</OrderLines>
+</Order>

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,121 @@
+<project name="Quickstart_fun_cbr" default="run" basedir=".">
+
+ <property file="../quickstarts.properties" />
+
+ <property name="build.dir"
+    value="${basedir}/build"/>
+ <property name="src.dir"
+    value="${basedir}/src"/>
+	
+ <property name="esb-config" value="${basedir}/jbossesb.xml"/>
+  
+	<path id="classpath">
+    <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
+	<fileset dir="${esb.product.lib.dir}" includes="*xml"/>
+	<fileset dir="${esb.product.lib.dir}/ext" includes="*jar"/>
+	<fileset dir="${basedir}" includes="smooks-cdr.lst"/>
+	<fileset dir="${basedir}" includes="smooks-res.xml"/>
+	<fileset dir="${jbosshome.dir}/client" includes="*jar"/>
+	<fileset dir="${jbosshome.dir}/server/default/lib">
+	  <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
+	 </fileset>		
+  	
+    <fileset dir="${basedir}" includes="build/**/*.jar"/>
+  	<fileset dir="${basedir}" includes="build/**/*.xml"/>
+    <pathelement location="." />  
+  </path>
+ 
+  <property name="cp" refid="classpath"/>
+  
+  <target name="echoCP">    
+  	<echo message="Classpath is ${cp}"/>
+  </target>
+  
+  <target name="prepare">
+	<mkdir dir="${build.dir}" />
+  </target>
+
+  <target name="clean">
+	<delete dir="${build.dir}" />
+  </target>
+
+  <target name="compile" depends="prepare">
+	<javac srcdir="${src.dir}"
+	   destdir="${build.dir}">
+	  <classpath refid="classpath"/>
+ 	</javac>
+  </target>
+
+  <target name="jars" depends="compile">
+	<delete file="${build.dir}/${ant.project.name}.jar"/>
+    <jar destfile="${build.dir}/${ant.project.name}.jar"
+		basedir="${build.dir}"
+		includes="**/*.class"/>
+  	<!-- Rules files must be jarred and on the classpath -->
+    <jar destfile="${build.dir}/${ant.project.name}_Rules.jar"
+		basedir="${basedir}/src/services/rules" includes="*.*"/>
+  </target>
+
+  <target name="updateRules">
+	  	<!-- Rules files must be jarred and on the classpath -->
+	    <jar destfile="${build.dir}/${ant.project.name}_Rules.jar"
+			basedir="${basedir}/src/services/rules" includes="*.*"/>
+
+  	  <copy file="${build.dir}/${ant.project.name}_Rules.jar" overwrite="true"
+			todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+	  />
+  </target>
+  <target name="run">
+	    <echo>Fun CBR: make sure to also run receiveBlue, receiveRed, receiveGreen</echo>
+			 <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">  
+		  	   	<arg value="${esb-config}"/>
+		  		<classpath refid="classpath"/>
+		  	 </java>
+  </target>
+
+  <target name="deployToSAR">
+		    <echo>Deploys the project to the JBoss Application Server ESB SAR</echo>
+		  	<copy file="${build.dir}/${ant.project.name}.jar" overwrite="true"
+		  		todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+		  	/>
+		  	<copy file="${build.dir}/${ant.project.name}_Rules.jar" overwrite="true"
+  				todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+  			/>
+		  	<copy file="jbossesb.xml" overwrite="true"
+		  		todir="${jbosshome.dir}/server/default/conf"
+		  	/>
+		  	<touch file="${jbosshome.dir}/server/default/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
+		  	<echo>Check your AS console to see if everything deployed properly then run 'ant runtest'</echo>
+  </target>
+	
+  <target name="runtest">
+     <echo>Runs Test JMS Sender</echo>
+     <java fork="yes" classname="quickstart.test.SendJMSMessage" failonerror="true">
+		<classpath refid="classpath"/>
+     </java>
+  </target>  
+	
+  <target name="receiveBlue">
+	 <echo>Runs Test JMS Receiver</echo>
+	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+	  	<arg value="queue/quickstart_Fun_CBR_Blue_Alert"/>
+		<classpath refid="classpath"/>
+	 </java>
+  </target>  
+	
+  <target name="receiveRed">
+	 <echo>Runs Test JMS Receiver</echo>
+	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+	   	<arg value="queue/quickstart_Fun_CBR_Red_Alert"/>
+		<classpath refid="classpath"/>
+	 </java>
+   </target>  
+	
+  <target name="receiveGreen">
+	 <echo>Runs Test JMS Receiver</echo>
+	 <java fork="yes" classname="quickstart.test.ReceiveJMSMessage" failonerror="true">
+	   	<arg value="queue/quickstart_Fun_CBR_Green_Alert"/>
+		<classpath refid="classpath"/>
+	 </java>
+   </target> 
+</project>
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb-properties.xml	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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,
+  @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+  These options are described in the JBossESB manual.
+  Defaults are provided here for convenience only.
+ 
+  Please read through this file prior to using the system, and consider
+  updating the specified entries.
+-->
+<esb
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+    <properties name="core">
+		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
+		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+    </properties>
+    <properties name="registry">      
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
+    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
+    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+    	<property name="org.jboss.soa.esb.registry.implementationClass" 
+    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" 
+    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" 
+    		value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" 
+    	  value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
+    		value="org.apache.ws.scout.transport.RMITransport"/>
+    </properties>
+    <properties name="transports" depends="core">
+    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+    </properties>
+    <properties name="connection">
+    	<property name="min-pool-size" value="5"/>
+    	<property name="max-pool=size" value="10"/>
+    	<property name="blocking-timeout-millis" value="5000"/>
+    	<property name="abandoned-connection-timeout" value="10000"/>
+    	<property name="abandoned-connection-time-interval" value="30000"/>
+    </properties>
+    <properties name="dbstore">
+		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/jbossesb"/>
+		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
+		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
+		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
+		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
+		<!--table managed by pool to test for valid connections - created by pool automatically -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
+		<!-- # of milliseconds to timeout waiting for a connection from pool -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
+    </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
+</esb>

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,155 @@
+<?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-context-factory="org.jnp.interfaces.NamingContextFactory"
+                      jndi-URL="localhost" >                      
+             <jms-bus busid="quickstartGwChannel">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_GW"/>
+             </jms-bus>
+             <jms-bus busid="quickstartEsbChannel">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_Request_ESB"/>
+             </jms-bus>
+             <jms-bus busid="Fun_CBR_ToBlue">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToBlue"/>
+             </jms-bus>
+             <jms-bus busid="Fun_CBR_ToRed">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToRed"/>
+             </jms-bus>
+             <jms-bus busid="Fun_CBR_ToGreenTransformer">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToGreenTransformer"/>
+             </jms-bus>		                          
+             <jms-bus busid="Fun_CBR_ToGreen">
+                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_Fun_CBR_ToGreen"/>
+             </jms-bus>		             
+          </jms-provider>
+      </providers>
+      
+      <services>
+        <!-- Gateway -->
+        <service 
+            category="Fun_CBRServices_GW" 
+          	name="FunCBRService_GW" 
+          	description="This CBR routes messages to different service destinations based on Rules - see .drl" 
+          	is-gateway="true"
+            target-service-category="Fun_CBRServices_ESB"
+            target-service-name="FunCBRService_ESB">
+            <listeners>        
+                  <jms-listener name="TheGateway"
+                              busidref="quickstartGwChannel"
+                              maxThreads="1"                              
+                  />                  
+            </listeners>    
+        </service>
+        <!-- ESB CBR Service -->
+        <service 
+        	category="Fun_CBRServices_ESB" 
+        	name="FunCBRService_ESB" 
+        	description="ESB Listener - for the native clients" 
+        	is-gateway="false"
+        	service-class="org.jboss.soa.esb.listeners.message.CbrListener">
+        	<listeners>        
+                  <jms-listener name="XPathContentBasedRouter"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1">  
+                     <property name="ruleSet" value="MyESBRules-XPath.drl"/>
+	                 <property name="ruleLanguage" value="XPathLanguage.dsl"/>
+	                 <property name="ruleReload" value="true"/>                
+	             </jms-listener>
+             </listeners> 
+        </service>
+        
+        <!-- Blue -->
+        <service
+  	      category="BlueTeam"
+  	      name="GoBlue"
+  	      description="Move to the Blue Team"
+  	      is-gateway="false">
+  	      <listeners>
+  	        <jms-listener
+  	       	  name="Fun_CBR_ToBlue"
+  	       	  busidref="Fun_CBR_ToBlue"
+  	       	  maxThreads="1"
+  	         />
+  	      </listeners>
+  	      <actions>
+  	      	  <action name="notificationAction" 
+               		class="org.jboss.soa.esb.actions.Notifier">
+               		<property name="okMethod" value="notifyOK" />
+               		<property name="notification-details">
+   	 				   <NotificationList type="OK"> 
+      				     <target class="NotifyConsole" /> <!--  System.out.println -->
+				    	 <target class="NotifyQueues">
+				   	       <queue jndiName="queue/quickstart_Fun_CBR_Blue_Alert">
+					         	<messageProp name="quickstart" value="Fun_CBR_Blue_Alert" />
+					       </queue> 
+			 	     	 </target>
+	    		   	   </NotificationList> 
+	    		   </property>
+   	   			</action>      
+           </actions>
+  	    </service>
+
+        <!-- Red -->
+        <service
+  	      category="RedTeam"
+  	      name="GoRed"
+  	      description="Move to the Red Team"
+  	      is-gateway="false">
+  	      <listeners>
+  	        <jms-listener
+  	       	  name="Fun_CBR_ToRed"
+  	       	  busidref="Fun_CBR_ToRed"
+  	       	  maxThreads="1"
+  	         />
+  	      </listeners>
+  	      <actions>
+  	      	  <action name="notificationAction" 
+               		class="org.jboss.soa.esb.actions.Notifier">
+               		<property name="okMethod" value="notifyOK" />
+               		<property name="notification-details">
+   	 				   <NotificationList type="OK"> 
+      				     <target class="NotifyConsole" /> <!--  System.out.println -->
+				    	 <target class="NotifyQueues">
+				   	       <queue jndiName="queue/quickstart_Fun_CBR_Red_Alert">
+					         	<messageProp name="quickstart" value="Fun_CBR_Red_Alert" />
+					       </queue> 
+			 	     	 </target>
+	    		   	   </NotificationList> 
+	    		   </property>
+   	   			</action>      
+           </actions>
+  	    </service>
+
+        <!--  Green Entry Point - conducts a transformation -->
+        <service
+  	      category="GreenTeam"
+  	      name="GoGreen"
+  	      description="First transform then send to the Green Team"
+  	      is-gateway="false">
+  	      <listeners>
+  	        <jms-listener
+  	       	  name="Fun_CBR_ToGreenTransformer"
+  	       	  busidref="Fun_CBR_ToGreenTransformer"
+  	       	  maxThreads="1"
+  	         />
+  	      </listeners>  	      
+  	      <actions>
+  	          <!-- insert transformer here -->
+   	   		    <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">
+               		<property name="okMethod" value="notifyOK" />
+               		<property name="notification-details">
+   	 				   <NotificationList type="OK"> 
+				    	 <target class="NotifyQueues">
+				   	       <queue jndiName="queue/quickstart_Fun_CBR_Green_Alert">
+					         	<messageProp name="quickstart" value="Fun_CBR_Green_Alert" />
+					       </queue> 
+			 	     	 </target>
+	    		   	   </NotificationList> 
+	    		   </property>
+   	   			</action>  
+           </actions>
+  	    </service>  	         
+	</services>
+</jbossesb>

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jndi.properties	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/juddi.properties	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/log4j.xml	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A size based file rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="./listener.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+     </layout>	    
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.milyn">
+      <priority value="ERROR"/>
+   </category>
+
+   <category name="quickstarts">
+      <priority value="ERROR"/>
+   </category>
+   
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/readme.txt	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/readme.txt	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,56 @@
+Overview:
+=========
+    This example demonstrates the dynamic hot reloading/redeploy capability of both the jbossesb.xml configuration and the rules associated with the CBR (Content-based Routing). 
+The benefit of hot reloading means that the service does not have to come down in order
+to make a change. In addition, you can change the rules based upon current load situations scenarios.  This example has three "teams" of order processors.  All new orders that flow into the system are evaluated via the rules engine.  These routing rules will determine which team receives the order for actually processing.  In the case of the green team, the order is first transformed to a different format prior to routing. 
+
+Before Running:
+===============
+1. Update the "jbosshome.dir" property in the quickstarts.properties file in "../".
+2. Make sure the jbossesb.sar is deployed on your JBoss Application Server.
+   In the ESB "install" update deployment.properties and then run "ant".
+3. Make sure the JBoss Application server is running.
+4. For standalone execution (running outside of an App Server) you will eventually
+   need five (5) command windows running to execute this demonstration.
+5. All of the quickstarts rely heavily on Ant to configure the classpath and execute
+   the demonstration components.
+6. Make sure you have deployed the JMS destinations described in the 
+   esb-quickstart-service.xml by dropping this file into the JBoss AS deploy directory.
+
+To Run:
+=======
+1. In the first command window execute "ant clean". This removes the build folder from the project.
+2. In the first command window execute "ant compile" then "ant jars". These steps compile the Java sources and create the appropriate jar files. You should notice that their are two jar files for this example. The additional jar file is for the Rules files.  If you review the build.xml you should see there is a task called "updateRules" that will rebuild this jar file individually. This is useful for testing the redeployment of Rules without bringing down the overall ESB.
+3. Now, in the first command window, execute "ant" to bring up the ESB for this set of services. 
+4. In the command windows 2, 3 and 4 run "ant receiveBlue", "ant receiveRed" and "ant receiveGreen" respectively.  These are simply JMS queue listeners that will simply display any messages they receive to their console windows. Think of these simple JMS receivers as actual customer service teams within an organization.  The routing depends on the statusCode attribute in the SampleOrder.xml file.  It would be relatively simple to modify this example to include a service (listener & action combination) to introduce "scoring" rules logic that sets the status code of the message prior to sending it on to the CBR.
+5. In the fifth command window execute "ant runtest".  This will take a copy of SampleOrder.xml and shoot it into the primary JMS queue for this sample - quickstart_Fun_CBR_Request_GW. Open the MyESBRules-XPath.drl file and review the actual routing rules:
+	rule "Red Routing Rule using XPATH"	
+		when
+			xpathEquals "/Order/@statusCode", "1"
+		then 
+	  	  Log : "Red Team";
+			  Destination : "RedTeam:GoRed";		
+	end
+6. Open the SampleOrder.xml file and modify the statusCode to equal 0 or 2 and re-execute "ant runtest" to see that it properly routes to the correct endpoint.
+7. Open MyESBRules-XPath.drl and change the routes to the following:
+Blue for statusCode="1"
+Red for statusCode="2"
+Green for statusCode="0"
+Note: If you are using the JBossIDE 2.0 there is a great JBoss Rules editor which provides syntax highlighting and correction assistance.
+8. In the fifth command window execute "ant updateRules" and then "ant runtest". You should see that the routes associated with the message flow have dynamically changed.
+9. Open the jbossesb.xml and insert the following actions to transform the inbound XML message to a POJO and then the POJO to a simple ASCII message in the Green Team's service.  Make sure to inject the transformer before the notification action.
+
+  <action name="transform" 
+    class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
+ 		<property name="from" value="DVDStore:OrderDispatchService" />
+		<property name="from-type" value="text/xml:fullFillOrder" />
+		<property name="to" value="DVDWarehouse_1:OrderHandlingService" />
+  	<property name="to-type" value="text/xml:shipOrder" />
+ </action>
+ <action name="convertPOJO2Message" 
+   class="org.jboss.soa.esb.dvdstore.DVDStoreAction"	/>	
+ <action name="displayAfterTransformer" 
+   class="quickstart.MyJMSListenerAction" process="displayMessage" />  
+
+10. In the fifth command window, make sure to modify the SampleOrder.xml to change statusCode to 0 (or to whatever is appropriate per your routing rules) then execute "ant runtest" to see the transformed message in the Green Team's console.
+

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-cdr.lst
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-cdr.lst	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-cdr.lst	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,10 @@
+####################################################
+# Uncomment out to load config from database
+####################################################
+# http://localhost:8080/jboss-esb-console/transform/smooks-config.jsf
+
+####################################################
+# Uncomment out to load config from local XML file
+####################################################
+/smooks-res.xml
+/org/milyn/templating/templating-cdu-creators-0.1.cdrl

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-res.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-res.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/smooks-res.xml	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+<!DOCTYPE smooks-resource-list PUBLIC "-//MILYN//DTD SMOOKS 1.0//EN" "http://www.milyn.org/dtd/smooksres-list-1.0.dtd" >
+<smooks-resource-list>
+	<smooks-resource selector="cdu-creator" useragent="*" path="org.milyn.templating.xslt.XslContentDeliveryUnitCreator" >
+		<param name="restype"><![CDATA[xsl]]></param>
+	</smooks-resource>
+	<smooks-resource selector="cdu-creator" useragent="*" path="org.milyn.templating.stringtemplate.StringTemplateContentDeliveryUnitCreator" >
+		<param name="restype"><![CDATA[st]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+
+		<param name="beanId"><![CDATA[orderHeader]]></param>
+		<param name="beanClass"><![CDATA[org.jboss.soa.esb.dvdstore.OrderHeader]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderHeader]]></param>
+		<param name="attributeName"><![CDATA[orderId]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderHeader]]></param>
+
+		<param name="attributeName"><![CDATA[orderDate]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderHeader]]></param>
+		<param name="attributeName"><![CDATA[statusCode]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderHeader]]></param>
+		<param name="attributeName"><![CDATA[netAmount]]></param>
+
+	</smooks-resource>
+	<smooks-resource selector="order" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderHeader]]></param>
+		<param name="attributeName"><![CDATA[totalAmount]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderHeader]]></param>
+		<param name="attributeName"><![CDATA[tax]]></param>
+	</smooks-resource>
+
+	<smooks-resource selector="order customer" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[customer]]></param>
+		<param name="beanClass"><![CDATA[org.jboss.soa.esb.dvdstore.Customer]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order customer" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[customer]]></param>
+		<param name="attributeName"><![CDATA[userName]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order customer" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+
+		<param name="beanId"><![CDATA[customer]]></param>
+		<param name="attributeName"><![CDATA[firstName]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order customer" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[customer]]></param>
+		<param name="attributeName"><![CDATA[lastName]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order customer" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[customer]]></param>
+
+		<param name="attributeName"><![CDATA[state]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order orderlines orderline" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderItem]]></param>
+		<param name="beanClass"><![CDATA[org.jboss.soa.esb.dvdstore.OrderItem]]></param>
+		<param name="addToList"><![CDATA[true]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order orderlines orderline" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderItem]]></param>
+
+		<param name="attributeName"><![CDATA[position]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order orderlines orderline" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderItem]]></param>
+		<param name="attributeName"><![CDATA[quantity]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order orderlines orderline product" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderItem]]></param>
+		<param name="attributeName"><![CDATA[productId]]></param>
+
+	</smooks-resource>
+	<smooks-resource selector="order orderlines orderline product" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderItem]]></param>
+		<param name="attributeName"><![CDATA[title]]></param>
+	</smooks-resource>
+	<smooks-resource selector="order orderlines orderline product" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice" path="org.milyn.javabean.ProcessingPhaseBeanPopulator" >
+		<param name="beanId"><![CDATA[orderItem]]></param>
+		<param name="attributeName"><![CDATA[price]]></param>
+	</smooks-resource>
+
+	<smooks-resource selector="order orderlines orderline" useragent="from-type:text/xml:fullfillorder and from:dvdstore:orderdispatchservice and to-type:text/xml:shiporder and to:dvdwarehouse_1:orderhandlingservice" path="/org/jboss/soa/esb/dvdstore/orderitem.st" >
+		<param name="encoding"><![CDATA[UTF-8]]></param>
+		<param name="visitBefore"><![CDATA[false]]></param>
+		<param name="action"><![CDATA[replace]]></param>
+	</smooks-resource>
+
+</smooks-resource-list>
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/Customer.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/Customer.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/Customer.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,94 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.dvdstore;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class Customer {
+
+	// <Customer userName="user1" firstName="Harry" lastName="Potter" state="SD"/>
+	private String userName;
+	private String firstName;
+	private String lastName;
+	private String state;
+	
+	/**
+	 * @return Returns the firstName.
+	 */
+	public String getFirstName() {
+		return firstName;
+	}
+	/**
+	 * @param firstName The firstName to set.
+	 */
+	public void setFirstName(String firstName) {
+		//System.out.println("**** firstName: " + firstName);
+		this.firstName = firstName;
+	}
+	/**
+	 * @return Returns the lastName.
+	 */
+	public String getLastName() {
+		return lastName;
+	}
+	/**
+	 * @param lastName The lastName to set.
+	 */
+	public void setLastName(String lastName) {
+		this.lastName = lastName;
+	}
+	/**
+	 * @return Returns the state.
+	 */
+	public String getState() {
+		return state;
+	}
+	/**
+	 * @param state The state to set.
+	 */
+	public void setState(String state) {
+		this.state = state;
+	}
+	/**
+	 * @return Returns the userName.
+	 */
+	public String getUserName() {
+		return userName;
+	}
+	/**
+	 * @param userName The userName to set.
+	 */
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return userName + "," + firstName + "," + lastName + "," + state;
+	}
+	
+
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/DVDStoreAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/DVDStoreAction.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/DVDStoreAction.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,86 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.dvdstore;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.List;
+
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.actions.ActionProcessor;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * DVD Store action.
+ * <p/>
+ * This action uses bean value objects that were prepopulated by Smooks in an earlier action on the pipline.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class DVDStoreAction implements ActionProcessor {
+
+	public DVDStoreAction(ConfigTree configTree) {
+		
+	}
+	
+	public Message process(Message message) throws ActionProcessingException {
+		HashMap beanHash = (HashMap) message.getBody().get("EXTRACTED_BEANS_HASH");
+		
+		StringBuffer results = new StringBuffer();		
+		if(beanHash != null) {
+			OrderHeader header = (OrderHeader) beanHash.get("orderHeader");
+			Customer customer = (Customer) beanHash.get("customer");
+			List orderItems = (List) beanHash.get("orderItemList");
+			results.append("Demonstrates Smooks ability to rip the XML into Objects\n");
+			results.append("********* DVDStoreAction - Order Value Objects Populated *********\n");
+			results.append("Header: " + header + "\n");
+			results.append("Customer: " + customer + "\n");
+			if(orderItems != null) {
+				results.append("Order Items (" + orderItems.size() + "):\n");
+				for(int i = 0; i < orderItems.size(); i++) {
+					results.append("\t" + i + ": " + orderItems.get(i) + "\n");
+				}
+			}
+			results.append("\n****************************************************************** ");
+		} else {
+			results.append("\n*** No beanhash found!");
+		}
+		
+		// Take this "parsed" output and make it a new message
+		message.getBody().setContents(results.toString().getBytes());
+		return message;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.soa.esb.actions.ActionProcessor#getOkNotification(org.jboss.soa.esb.message.Message)
+	 */
+	public Serializable getOkNotification(Message message) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.jboss.soa.esb.actions.ActionProcessor#getErrorNotification(org.jboss.soa.esb.message.Message)
+	 */
+	public Serializable getErrorNotification(Message message) {
+		return null;
+	}
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderHeader.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderHeader.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderHeader.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,118 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.dvdstore;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class OrderHeader {
+	
+	// <Order orderId="1" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="0" netAmount="59.97" totalAmount="64.92" tax="4.95">
+	private String orderId;
+	private String orderDate;
+	private String statusCode;
+	private String netAmount;
+	private String totalAmount;
+	private String tax;
+	
+	/**
+	 * @return Returns the netAmount.
+	 */
+	public String getNetAmount() {
+		return netAmount;
+	}
+	/**
+	 * @param netAmount The netAmount to set.
+	 */
+	public void setNetAmount(String netAmount) {
+		// System.out.println("**** netAmount: " + netAmount);
+		this.netAmount = netAmount;
+	}
+	/**
+	 * @return Returns the orderDate.
+	 */
+	public String getOrderDate() {
+		return orderDate;
+	}
+	/**
+	 * @param orderDate The orderDate to set.
+	 */
+	public void setOrderDate(String orderDate) {
+		this.orderDate = orderDate;
+	}
+	/**
+	 * @return Returns the orderId.
+	 */
+	public String getOrderId() {
+		return orderId;
+	}
+	/**
+	 * @param orderId The orderId to set.
+	 */
+	public void setOrderId(String orderId) {
+		this.orderId = orderId;
+	}
+	/**
+	 * @return Returns the statusCode.
+	 */
+	public String getStatusCode() {
+		return statusCode;
+	}
+	/**
+	 * @param statusCode The statusCode to set.
+	 */
+	public void setStatusCode(String statusCode) {
+		this.statusCode = statusCode;
+	}
+	/**
+	 * @return Returns the tax.
+	 */
+	public String getTax() {
+		return tax;
+	}
+	/**
+	 * @param tax The tax to set.
+	 */
+	public void setTax(String tax) {
+		this.tax = tax;
+	}
+	/**
+	 * @return Returns the totalAmount.
+	 */
+	public String getTotalAmount() {
+		return totalAmount;
+	}
+	/**
+	 * @param totalAmount The totalAmount to set.
+	 */
+	public void setTotalAmount(String totalAmount) {
+		this.totalAmount = totalAmount;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return orderId + ", " + orderDate + ", " + statusCode + ", " + netAmount + ", " + totalAmount + ", " + tax + ", ";
+	}
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderItem.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderItem.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/OrderItem.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,109 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.dvdstore;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class OrderItem {
+
+	// <OrderLine position="1" quantity="1">
+	// 		<Product productId="364" title="The 40-Year-Old Virgin " price="29.98"/>
+	// </OrderLine>
+	private String position;
+	private String quantity;
+	private String productId;
+	private String title;
+	private String price;
+	
+	/**
+	 * @return Returns the position.
+	 */
+	public String getPosition() {
+		return position;
+	}
+	/**
+	 * @param position The position to set.
+	 */
+	public void setPosition(String position) {
+		//System.out.println("**** position: " + position);
+		this.position = position;
+	}
+	/**
+	 * @return Returns the price.
+	 */
+	public String getPrice() {
+		return price;
+	}
+	/**
+	 * @param price The price to set.
+	 */
+	public void setPrice(String price) {
+		//System.out.println("**** price: " + price);
+		this.price = price;
+	}
+	/**
+	 * @return Returns the productId.
+	 */
+	public String getProductId() {
+		return productId;
+	}
+	/**
+	 * @param productId The productId to set.
+	 */
+	public void setProductId(String productId) {
+		this.productId = productId;
+	}
+	/**
+	 * @return Returns the quantity.
+	 */
+	public String getQuantity() {
+		return quantity;
+	}
+	/**
+	 * @param quantity The quantity to set.
+	 */
+	public void setQuantity(String quantity) {
+		this.quantity = quantity;
+	}
+	/**
+	 * @return Returns the title.
+	 */
+	public String getTitle() {
+		return title;
+	}
+	/**
+	 * @param title The title to set.
+	 */
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return position + "," + quantity + "," + productId + "," + title + "," + price;
+		
+	}
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/orderitem.st
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/orderitem.st	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/org/jboss/soa/esb/dvdstore/orderitem.st	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,7 @@
+		<order-item>
+			<index>$orderItem.position$</index>
+			<quantity>$orderItem.quantity$</quantity>
+			<product>$orderItem.productId$</product>
+			<title>$orderItem.title$</title>
+			<price>$orderItem.price$</price>
+		</order-item>
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/MyJMSListenerAction.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,47 @@
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.Header;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.apache.log4j.Logger;
+
+public class MyJMSListenerAction
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message displayMessage(Message message) throws Exception{		
+		  logHeader();
+		  System.out.println("Body: " + new String(message.getBody().getContents()));
+		  logFooter();
+		  return message;         	
+	}
+  
+   public void exceptionHandler(Message message, Throwable exception) {
+	   logHeader();
+	   System.out.println("!ERROR!");
+	   System.out.println(exception.getMessage());
+	   System.out.println("For Message: ");
+	   System.out.println(message.getBody().getContents());
+	   logFooter();
+   }
+	
+
+   // This makes it easier to read on the console
+   private void logHeader() {
+	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+   }
+   private void logFooter() {
+	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+   }
+    
+	
+}
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/ReturnJMSMessage.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,49 @@
+package quickstart;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import org.jboss.soa.esb.message.Message;
+
+public class ReturnJMSMessage {
+       
+    public static void sendMessage(Message esbMessage,String newDestination) throws JMSException, NamingException, Exception {
+    	if (esbMessage == null || newDestination == null) 
+    		throw new Exception("Message and JMS Destination are required");
+    
+    	QueueConnection conn;
+        QueueSession session;
+        Queue que;
+        
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/" + newDestination);
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+
+    	    	   
+    	String newMsg = new String(esbMessage.getBody().getContents());
+
+    	
+    	QueueSender send = session.createSender(que);        
+        TextMessage tm = session.createTextMessage(newMsg);
+        send.send(tm);
+        
+
+    	conn.stop();
+    }    
+    
+}
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/TeamAlert.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,65 @@
+package quickstart;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class TeamAlert {
+	
+	  protected Message  _message;
+	  protected ConfigTree	_config;
+	  
+	  public TeamAlert (ConfigTree config) { _config = config; } 
+	  	  
+	  public Message sendResponseBlue(Message message) {
+		  try {
+			   logHeader();
+			   System.out.println(new String(message.getBody().getContents()));
+			   System.out.println("Blue Blue Blue");
+			   logFooter();
+			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Blue_Alert");
+		   } catch (Exception e) {
+			   logHeader();
+			   System.out.println(e.getMessage());
+			   logFooter();
+		   }
+		   return message;
+	  }
+	  
+	  public Message sendResponseRed(Message message) {
+		  try {
+			   logHeader();
+			   System.out.println(new String(message.getBody().getContents()));
+			   System.out.println("Red Red Red");
+			   logFooter();
+			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Red_Alert");
+		   } catch (Exception e) {
+			   logHeader();
+			   System.out.println(e.getMessage());
+			   logFooter();
+		   }
+		   return message;
+	  }
+
+	  public Message sendResponseGreen(Message message) {
+		  try {
+			   logHeader();
+			   System.out.println(new String(message.getBody().getContents()));
+			   System.out.println("Green Green Green");
+			   logFooter();
+			   ReturnJMSMessage.sendMessage(message,"quickstart_Fun_CBR_Green_Alert");
+		   } catch (Exception e) {
+			   logHeader();
+			   System.out.println(e.getMessage());
+			   logFooter();
+		   }
+		   return message;
+	  }
+	  
+	  private void logHeader() {
+		  System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+	  }
+	  private void logFooter() {
+		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
+	  }
+	
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/ReceiveJMSMessage.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,55 @@
+package quickstart.test;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+public class ReceiveJMSMessage {
+	   QueueConnection conn = null;	   
+	   QueueSession receiverSession = null;	   
+	   Queue receiverQueue = null;	   
+	   QueueReceiver queueReceiver = null;
+	   InitialContext iniCtx = null;
+	   QueueConnectionFactory qcf = null;
+	   String receiveQueueName = "queue/D"; // Default to queue/D
+	   
+	   public ReceiveJMSMessage() {
+		   
+	   }
+	   public void receiveOne() {
+		   try {
+		   if (iniCtx == null) iniCtx = new InitialContext();
+	          if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+	          if (conn == null) {
+	              conn = qcf.createQueueConnection();
+	              conn.start();
+	          }	        
+	          receiverQueue = (Queue) iniCtx.lookup(receiveQueueName);
+	          receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+	    	  queueReceiver = receiverSession.createReceiver(receiverQueue); 
+	    	  TextMessage msg = (TextMessage) queueReceiver.receive(2000);
+	    	  if (msg != null) {
+	    		  System.out.println("*********************************************************");
+	    		  System.out.println(msg);
+	    		  System.out.println("*********************************************************");
+	    	  }	
+		   } catch (Exception e) {
+			   System.out.println(e);
+		   }
+	   }
+	   public static void main(String[] args) {
+		      ReceiveJMSMessage receiver = new ReceiveJMSMessage();
+		      
+		      if(args[0] != null) {
+		    	  receiver.receiveQueueName = args[0];
+		    	  System.out.println("Receiving on: " + receiver.receiveQueueName );		    	 
+		      }		    	  
+		      while (true) { // loop until I'm killed
+		    	  receiver.receiveOne();
+		      }
+	   }
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/quickstart/test/SendJMSMessage.java	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,90 @@
+package quickstart.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/quickstart_Fun_CBR_Request_GW");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);        
+        send.send(tm);        
+        send.close();
+    }
+    public String readAsciiFile(String fileName) throws IOException {
+		  FileReader fr = null;
+		  char[] thechars = null;
+
+		  try {
+			  File thefile = new File( fileName );
+			  fr = new FileReader( thefile );
+			  int size = (int) thefile.length();
+			  thechars = new char[size];
+		
+			  int count, index = 0;
+		
+			  // 	read in the bytes from the input stream
+			  while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
+				  size -= count;
+				  index += count;
+			  }
+			} catch(Exception e) {	
+				System.out.println(e);
+			}
+			finally {
+				if( fr != null )
+		        fr.close();
+			}
+			return new String(thechars);
+
+    } // readAsciiFile
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	String fileContent = sm.readAsciiFile("SampleOrder.xml");
+    	System.out.println("---------------------------------------------");
+    	System.out.println(fileContent);
+    	System.out.println("---------------------------------------------");
+    	sm.sendAMessage(fileContent); 
+    	sm.stop();
+    	
+    }
+    
+}
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/services/rules/MyESBRules-XPath.drl
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/services/rules/MyESBRules-XPath.drl	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/src/services/rules/MyESBRules-XPath.drl	2007-01-21 16:23:30 UTC (rev 8954)
@@ -0,0 +1,35 @@
+
+package com.jboss.soa.esb.routing.cbr
+
+#list any import classes here.
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageType;
+
+expander XPathLanguage.dsl
+
+#declare any global variables here
+global java.util.List destinationServices;
+
+rule "Blue Routing Rule using XPATH"	
+	when
+		xpathEquals "/Order/@statusCode", "0"
+	then 
+	    Log : "Blue Team";
+		Destination : "BlueTeam:GoBlue";		
+end
+
+rule "Red Routing Rule using XPATH"	
+	when
+		xpathEquals "/Order/@statusCode", "1"
+	then 
+	    Log : "Red Team";
+		Destination : "RedTeam:GoRed";		
+end
+
+rule "Green Routing Rule using XPATH"	
+	when
+		xpathEquals "/Order/@statusCode", "2"
+	then 
+	    Log : "Green Team";
+		Destination : "GreenTeam:GoGreen";		
+end
\ No newline at end of file




More information about the jboss-svn-commits mailing list