[jboss-svn-commits] JBL Code SVN: r10414 - labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Mar 21 17:13:34 EDT 2007


Author: kurt.stam at jboss.com
Date: 2007-03-21 17:13:34 -0400 (Wed, 21 Mar 2007)
New Revision: 10414

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jboss-esb.xml
Removed:
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml
Modified:
   labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml
Log:
Converting to .esb deployment

Modified: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml	2007-03-21 21:10:53 UTC (rev 10413)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/build.xml	2007-03-21 21:13:34 UTC (rev 10414)
@@ -7,7 +7,8 @@
  <property name="src.dir"
     value="${basedir}/src"/>
 	
- <property name="esb-config" value="${basedir}/jbossesb.xml"/>
+    <property name="esb-config-name" value="jboss-esb.xml"/>
+    <property name="esb-config" value="${basedir}/${esb-config-name}"/>
   
 	<path id="classpath">
     <fileset dir="${esb.product.lib.dir}" includes="*jar"/>
@@ -19,7 +20,7 @@
 	<fileset dir="${jbosshome.dir}/server/default/lib">
 	  <include name="jboss-j2ee.jar"/> <!-- added this for the JMS client -->
 	 </fileset>		
-  	
+	<pathelement location="build" />
     <fileset dir="${basedir}" includes="build/**/*.jar"/>
   	<fileset dir="${basedir}" includes="build/**/*.xml"/>
     <pathelement location="." />  
@@ -47,10 +48,12 @@
   </target>
 
   <target name="jars" depends="compile">
-	<delete file="${build.dir}/${ant.project.name}.jar"/>
-    <jar destfile="${build.dir}/${ant.project.name}.jar"
+	<delete file="${build.dir}/${ant.project.name}.esb"/>
+  	<copy file="${esb-config-name}" tofile="${build.dir}/META-INF/${esb-config-name}"/>
+  	<copy file="jbm-queue-service.xml" tofile="${build.dir}/jbm-queue-service.xml"/>
+    <jar destfile="${build.dir}/${ant.project.name}.esb"
 		basedir="${build.dir}"
-		includes="**/*.class"/>
+		includes="**/*.class,META-INF/${esb-config-name},jbm-queue-service.xml"/>
   	<!-- Rules files must be jarred and on the classpath -->
     <jar destfile="${build.dir}/${ant.project.name}_Rules.jar"
 		basedir="${basedir}/src/services/rules" includes="*.*"/>
@@ -62,10 +65,10 @@
 			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"	
+			todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar/lib"	
 	  />
   </target>
-  <target name="run">
+  <target name="run" depends="jars">
 	    <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}"/>
@@ -73,18 +76,14 @@
 		  	 </java>
   </target>
 
-  <target name="deployToSAR">
+  <target name="deploy" depends="jars">
 		    <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}.esb" overwrite="true"
+		  		todir="${jbosshome.dir}/server/default/deploy"	
 		  	/>
 		  	<copy file="${build.dir}/${ant.project.name}_Rules.jar" overwrite="true"
-  				todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar"	
+  				todir="${jbosshome.dir}/server/default/deploy/jbossesb.sar/lib"	
   			/>
-		  	<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>
 	

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml	2007-03-21 21:13:34 UTC (rev 10414)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+  
+  <!-- Fun CBR Demo -->
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_Request_GW"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_Request_ESB"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_ToBlue"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_Blue_Alert"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_ToRed"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_Red_Alert"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_ToGreenTransformer"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_ToGreen"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.messaging.destination:service=Queue,name=quickstart_Fun_CBR_Green_Alert"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+  </mbean>
+  </server>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbm-queue-service.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jboss-esb.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jboss-esb.xml	2007-03-21 21:13:34 UTC (rev 10414)
@@ -0,0 +1,150 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" >
+
+    <providers>
+          <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>
+        <!-- ESB CBR Service -->
+        <service 
+        	category="Fun_CBRServices_ESB" 
+        	name="FunCBRService_ESB" 
+        	description="ESB Listener - for the native clients">
+        	<listeners>
+        		  <!-- Gateway -->
+        		  <jms-listener name="TheGateway"
+        			   busidref="quickstartGwChannel"
+        			   maxThreads="1"
+        			   is-gateway="true"                            
+        		  />     
+                  <jms-listener name="XPathContentBasedRouter"
+                        busidref="quickstartEsbChannel"
+                        maxThreads="1">                
+	             </jms-listener>
+             </listeners>
+        	<actions>
+        		<action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
+        			<property name="ruleSet" value="MyESBRules-XPath.drl"/>
+        			<property name="ruleLanguage" value="XPathLanguage.dsl"/>
+        			<property name="ruleReload" value="true"/> 
+        			<property name="destinations">
+        				<route-to destination-name="blue"  service-category="BlueTeam"  service-name="GoBlue" /> 
+        				<route-to destination-name="red"   service-category="RedTeam"   service-name="GoRed" /> 
+        				<route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" /> 
+        			</property> 
+        		</action>
+        	</actions>
+        </service>
+        
+        <!-- Blue -->
+        <service
+  	      category="BlueTeam"
+  	      name="GoBlue"
+  	      description="Move to the Blue Team">
+  	      <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">
+  	      <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">
+  	      <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>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jboss-esb.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml	2007-03-21 21:10:53 UTC (rev 10413)
+++ labs/jbossesb/trunk/product/samples/quickstarts/fun_cbr/jbossesb.xml	2007-03-21 21:13:34 UTC (rev 10414)
@@ -1,150 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" >
-
-    <providers>
-          <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>
-        <!-- ESB CBR Service -->
-        <service 
-        	category="Fun_CBRServices_ESB" 
-        	name="FunCBRService_ESB" 
-        	description="ESB Listener - for the native clients">
-        	<listeners>
-        		  <!-- Gateway -->
-        		  <jms-listener name="TheGateway"
-        			   busidref="quickstartGwChannel"
-        			   maxThreads="1"
-        			   is-gateway="true"                            
-        		  />     
-                  <jms-listener name="XPathContentBasedRouter"
-                        busidref="quickstartEsbChannel"
-                        maxThreads="1">                
-	             </jms-listener>
-             </listeners>
-        	<actions>
-        		<action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
-        			<property name="ruleSet" value="MyESBRules-XPath.drl"/>
-        			<property name="ruleLanguage" value="XPathLanguage.dsl"/>
-        			<property name="ruleReload" value="true"/> 
-        			<property name="destinations">
-        				<route-to destination-name="blue"  service-category="BlueTeam"  service-name="GoBlue" /> 
-        				<route-to destination-name="red"   service-category="RedTeam"   service-name="GoRed" /> 
-        				<route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" /> 
-        			</property> 
-        		</action>
-        	</actions>
-        </service>
-        
-        <!-- Blue -->
-        <service
-  	      category="BlueTeam"
-  	      name="GoBlue"
-  	      description="Move to the Blue Team">
-  	      <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">
-  	      <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">
-  	      <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>




More information about the jboss-svn-commits mailing list