Author: gnodet
Date: Thu Oct  5 05:04:06 2006
New Revision: 453195

URL: http://svn.apache.org/viewvc?view=rev&rev=453195
Log:
SM-676: also clean up a bit the samples
and provide both spring / xbean configuration

Modified:
    
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance1/servicemix1.xml
    
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance2/servicemix2.xml
    
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance3/servicemix3.xml

Modified: 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance1/servicemix1.xml
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance1/servicemix1.xml?view=diff&rev=453195&r1=453194&r2=453195
==============================================================================
--- 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance1/servicemix1.xml
 (original)
+++ 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance1/servicemix1.xml
 Thu Oct  5 05:04:06 2006
@@ -26,11 +26,12 @@
                 name="wsn1"

                 embedded="true"

                 MBeanServer="#jmxServer">

-  <sm:flow>

-    <bean class="org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow">

-      <property name="connectionFactory" ref="connectionFactory" />

-    </bean>

-  </sm:flow>

+

+    <!-- Use a SEDA flow + JMS flow for clustering. -->

+    <sm:flows>

+      <sm:sedaFlow />

+      <sm:jmsFlow connectionFactory="#connectionFactory" />

+    </sm:flows>

 

     <sm:activationSpecs />

 

@@ -45,20 +46,10 @@
                    daemon="true" 

                    depends-on="rmiRegistry" />

 

-  <bean id="connectionFactory" 

-        class="org.apache.activemq.ActiveMQConnectionFactory">

+  <!-- JMS connection factory -->

+  <bean id="connectionFactory" 
class="org.apache.activemq.ActiveMQConnectionFactory">

+    <!-- We use an embedded non persistent broker with multicast discovery 
(peer:// protocol) -->

     <property name="brokerURL" 
value="peer://localhost/wsnbroker1?broker.persistent=false" />

   </bean>

- 

-<!-- 

-  <amq:broker id="broker" depends-on="mbeanServer" persistent="false">

-

-    <amq:transportConnectors>

-      <amq:transportConnector uri="tcp://localhost:61611" 
discoveryUri="multicast://default"/>

-    </amq:transportConnectors>

-

-  </amq:broker>

--->  

-

 

 </beans>


Modified: 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance2/servicemix2.xml
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance2/servicemix2.xml?view=diff&rev=453195&r1=453194&r2=453195
==============================================================================
--- 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance2/servicemix2.xml
 (original)
+++ 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance2/servicemix2.xml
 Thu Oct  5 05:04:06 2006
@@ -18,64 +18,70 @@
 
 -->
 <beans xmlns:sm="http://servicemix.apache.org/config/1.0"; 
-          xmlns:amq="http://activemq.org/config/1.0";
-          xmlns:test="http://servicemix.org/test";
-          xmlns:my="http://servicemix.apache.org/demo";>
-          
-       <classpath>
-         <location>../lib/servicemix-wsn2005-3.0-incubating.jar</location>
-         <location>../lib/servicemix-common-3.0-incubating.jar</location>
-         <location>../lib/jaxb-api-2.0.jar</location>
-         <location>../lib/jaxb-impl-2.0.1.jar</location>
-         <location>../lib/xfire-jsr181-api-1.0-M1.jar</location>
-       </classpath>
-          
+       xmlns:amq="http://activemq.org/config/1.0";
+       xmlns:test="http://servicemix.org/test";
+       xmlns:my="http://servicemix.apache.org/demo";
+       xmlns:wsn="http://servicemix.apache.org/wsn/1.0";>
+
+  <!-- We need to include the WS-Notification component dependencies in the 
classpath -->
+  <classpath>
+    
<location>../lib/servicemix-wsn2005-3.0.1-incubating-SNAPSHOT.jar</location>
+    <location>../lib/servicemix-common-3.0.1-incubating-SNAPSHOT.jar</location>
+    <location>../lib/jaxb-api-2.0.jar</location>
+    <location>../lib/jaxb-impl-2.0.1.jar</location>
+    <location>../lib/xfire-jsr181-api-1.0-M1.jar</location>
+  </classpath>
+
   <!-- the JBI container -->
   <sm:container id="jbi" 
                 name="wsn2"
                 embedded="true"
                 MBeanServer="#jmxServer">
-    <sm:flow>
-      <bean class="org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow">
-        <property name="connectionFactory" ref="connectionFactory" />
-      </bean>
-    </sm:flow>
+
+    <!-- Use a SEDA flow + JMS flow for clustering. -->
+    <sm:flows>
+      <sm:sedaFlow />
+      <sm:jmsFlow connectionFactory="#connectionFactory" />
+    </sm:flows>
 
     <sm:activationSpecs>
 
-      <sm:activationSpec id="receiver" service="test:service" 
endpoint="endpoint">
+      <!-- WS-Notification component -->
+      <sm:activationSpec componentName="servicemix-wsn2005">
         <sm:component>
-          <bean class="org.apache.servicemix.tck.ReceiverComponent">
+          <wsn:component connectionFactory="#connectionFactory">
+            <wsn:requests>
+              <wsn:subscribe 
consumer="http://servicemix.apache.org/demo/trace/endpoint"; topic="myTopic" />
+            </wsn:requests>
+          </wsn:component>
+          <!-- The same definition using plain spring -->
+          <!--
+          <bean class="org.apache.servicemix.wsn.spring.WSNSpringComponent">
+            <property name="requests">
+              <list>
+                <bean 
class="org.apache.servicemix.wsn.spring.SubscribeFactoryBean">
+                  <property name="consumer" 
value="http://servicemix.apache.org/demo/trace/endpoint"; />
+                  <property name="topic" value="myTopic" />
+                </bean>
+              </list>
+            </property>
+            <property name="connectionFactory" ref="connectionFactory" />
           </bean>
+          -->
         </sm:component>
       </sm:activationSpec>
 
-      <sm:activationSpec>
-       <sm:component>
-         <bean class="org.apache.servicemix.wsn.spring.WSNSpringComponent">
-           <property name="requests">
-             <list>
-               <bean 
class="org.apache.servicemix.wsn.spring.SubscribeFactoryBean">
-                 <property name="consumer" 
value="http://servicemix.apache.org/demo/trace/endpoint"; />
-                 <property name="topic" value="myTopic" />
-               </bean>
-             </list>
-           </property>
-           <property name="connectionFactory" ref="connectionFactory" />
-         </bean>
+      <!-- The trace component will receive notifications from the above 
subscription
+           and display the message on the console -->
+      <sm:activationSpec componentName="trace" service="my:trace" 
endpoint="endpoint">
+        <sm:component>
+          <bean  class="org.apache.servicemix.components.util.TraceComponent" 
/>
         </sm:component>
       </sm:activationSpec>
-      
-         <sm:activationSpec componentName="trace" service="my:trace" 
endpoint="endpoint">
-                 <sm:component>
-                         <bean xmlns="http://xbean.org/schemas/spring/1.0";
-                                 
class="org.apache.servicemix.components.util.TraceComponent" />
-                 </sm:component>
-         </sm:activationSpec>
-               
+
     </sm:activationSpecs>
   </sm:container>
-  
+
   <!-- JMX server and connector -->
   <sm:rmiRegistry id="rmiRegistry" port="1092" />
   <sm:jmxServer id="jmxServer" locateExistingServerIfPossible="true" />
@@ -85,20 +91,10 @@
                    daemon="true" 
                    depends-on="rmiRegistry" />
 
-  <bean id="connectionFactory" 
-        class="org.apache.activemq.ActiveMQConnectionFactory">
+  <!-- JMS connection factory -->
+  <bean id="connectionFactory" 
class="org.apache.activemq.ActiveMQConnectionFactory">
+    <!-- We use an embedded non persistent broker with multicast discovery 
(peer:// protocol) -->
     <property name="brokerURL" 
value="peer://localhost/wsnbroker2?broker.persistent=false" />
   </bean>
-  
-<!--
-  <amq:broker id="broker" depends-on="mbeanServer" persistent="false">
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:61612" 
discoveryUri="multicast://default"/>
-    </amq:transportConnectors>
-
-  </amq:broker>
--->
-
 
 </beans>

Modified: 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance3/servicemix3.xml
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance3/servicemix3.xml?view=diff&rev=453195&r1=453194&r2=453195
==============================================================================
--- 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance3/servicemix3.xml
 (original)
+++ 
incubator/servicemix/branches/servicemix-3.0/apache-servicemix/src/main/release/examples/ws-notification/instance3/servicemix3.xml
 Thu Oct  5 05:04:06 2006
@@ -18,48 +18,62 @@
 
 -->
 <beans xmlns:sm="http://servicemix.apache.org/config/1.0"; 
-          xmlns:amq="http://activemq.org/config/1.0";
-          xmlns:test="http://servicemix.org/test";
-          xmlns:my="http://servicemix.apache.org/demo";>
-
-       <classpath>
-         <location>../lib/servicemix-wsn2005-3.0-incubating.jar</location>
-         <location>../lib/servicemix-common-3.0-incubating.jar</location>
-         <location>../lib/jaxb-api-2.0.jar</location>
-         <location>../lib/jaxb-impl-2.0.1.jar</location>
-         <location>../lib/xfire-jsr181-api-1.0-M1.jar</location>
-       </classpath>
-          
+       xmlns:amq="http://activemq.org/config/1.0";
+       xmlns:test="http://servicemix.org/test";
+       xmlns:my="http://servicemix.apache.org/demo";
+       xmlns:wsn="http://servicemix.apache.org/wsn/1.0";>
+
+  <!-- We need to include the WS-Notification component dependencies in the 
classpath -->
+  <classpath>
+    
<location>../lib/servicemix-wsn2005-3.0.1-incubating-SNAPSHOT.jar</location>
+    <location>../lib/servicemix-common-3.0.1-incubating-SNAPSHOT.jar</location>
+    <location>../lib/jaxb-api-2.0.jar</location>
+    <location>../lib/jaxb-impl-2.0.1.jar</location>
+    <location>../lib/xfire-jsr181-api-1.0-M1.jar</location>
+  </classpath>
+
   <!-- the JBI container -->
   <sm:container id="jbi" 
                 name="wsn3"
                 embedded="true" 
                 MBeanServer="#jmxServer">
-    <sm:flow>
-      <bean class="org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow">
-        <property name="connectionFactory" ref="connectionFactory" />
-      </bean>
-    </sm:flow>
-    
+
+    <!-- Use a SEDA flow + JMS flow for clustering. -->
+    <sm:flows>
+      <sm:sedaFlow />
+      <sm:jmsFlow connectionFactory="#connectionFactory" />
+    </sm:flows>
+
     <sm:activationSpecs>
 
-      <sm:activationSpec>
-       <sm:component>
-         <bean class="org.apache.servicemix.wsn.spring.WSNSpringComponent">
-           <property name="connectionFactory" ref="connectionFactory" />
-         </bean>
+      <!-- WS-Notification component -->
+      <sm:activationSpec componentName="servicemix-wsn2005">
+        <sm:component>
+          <wsn:component connectionFactory="#connectionFactory" />
+          <!-- Using plain spring syntax -->
+          <!--
+          <bean class="org.apache.servicemix.wsn.spring.WSNSpringComponent">
+            <property name="connectionFactory" ref="connectionFactory" />
+          </bean>
+          -->
         </sm:component>
       </sm:activationSpec>
-      
-      <sm:activationSpec service="test:publisher" endpoint="endpoint">
+
+      <!-- Publisher proxy to the NotificationBroker -->
+      <sm:activationSpec componentName="publisher-proxy" 
service="test:publisher" endpoint="endpoint">
         <sm:component>
+          <wsn:publisher topic="myTopic" />
+          <!-- Using plain spring syntax -->
+          <!--
           <bean class="org.apache.servicemix.wsn.spring.PublisherComponent">
-           <property name="topic" value="myTopic" />
+            <property name="topic" value="myTopic" />
           </bean>
+          -->
         </sm:component>
       </sm:activationSpec>
-      
-      <sm:activationSpec destinationService="test:publisher" 
destinationEndpoint="endpoint">
+
+      <!-- Quartz component which sends message to the publisher -->
+      <sm:activationSpec componentName="quartz-publisher" 
destinationService="test:publisher" destinationEndpoint="endpoint">
         <sm:component>
           <bean 
class="org.apache.servicemix.components.quartz.QuartzComponent">
             <property name="triggers">
@@ -81,17 +95,10 @@
           </bean>
         </sm:component>
       </sm:activationSpec>
-      
-               <sm:activationSpec componentName="trace" service="my:trace">
-                       <sm:component>
-                               <bean 
xmlns="http://xbean.org/schemas/spring/1.0";
-                                       
class="org.apache.servicemix.components.util.TraceComponent" />
-                       </sm:component>
-               </sm:activationSpec>
 
     </sm:activationSpecs>
   </sm:container>
-  
+
   <!-- JMX server and connector -->
   <sm:rmiRegistry id="rmiRegistry" port="1093" />
   <sm:jmxServer id="jmxServer" locateExistingServerIfPossible="true" />
@@ -101,20 +108,10 @@
                    daemon="true" 
                    depends-on="rmiRegistry" />
 
-  <bean id="connectionFactory" 
-        class="org.apache.activemq.ActiveMQConnectionFactory">
+  <!-- JMS connection factory -->
+  <bean id="connectionFactory" 
class="org.apache.activemq.ActiveMQConnectionFactory">
+    <!-- We use an embedded non persistent broker with multicast discovery 
(peer:// protocol) -->
     <property name="brokerURL" 
value="peer://localhost/wsnbroker3?broker.persistent=false" />
   </bean>
-  
-<!--
-  <amq:broker id="broker" depends-on="mbeanServer" persistent="false">
-
-    <amq:transportConnectors>
-      <amq:transportConnector uri="tcp://localhost:61613" 
discoveryUri="multicast://default"/>
-    </amq:transportConnectors>
-
-  </amq:broker>
--->
-
 
 </beans>


Reply via email to