You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2011/01/28 09:26:37 UTC

svn commit: r1064478 - /camel/trunk/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml

Author: davsclaus
Date: Fri Jan 28 08:26:37 2011
New Revision: 1064478

URL: http://svn.apache.org/viewvc?rev=1064478&view=rev
Log:
CAMEL-3597: Better shutdown of the example.

Modified:
    camel/trunk/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml

Modified: camel/trunk/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml?rev=1064478&r1=1064477&r2=1064478&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml (original)
+++ camel/trunk/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml Fri Jan 28 08:26:37 2011
@@ -27,9 +27,9 @@
        http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
 
   <!-- This creates an embedded ActiveMQ Broker -->
-  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="false" persistent="false">
+  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="false" persistent="false" brokerName="myBroker" id="broker">
     <transportConnectors>
-      <transportConnector uri="vm://localhost" />
+      <transportConnector uri="vm://myBroker" />
     </transportConnectors>
   </broker>
 
@@ -37,7 +37,7 @@
        See http://camel.apache.org/activemq.html for more information.
   -->
   <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
-    <property name="brokerURL" value="failover:vm://localhost"/>
+    <property name="brokerURL" value="vm://myBroker"/>
   </bean>
   
   <!-- END SNIPPET: activemq -->
@@ -45,8 +45,9 @@
   <!-- START SNIPPET: ex -->  
   <bean class="org.apache.camel.example.pojo_messaging.SendFileRecordsToQueueBean"/>
   <bean class="org.apache.camel.example.pojo_messaging.DistributeRecordsBean"/>
- 
-  <camelContext xmlns="http://camel.apache.org/schema/spring"/>
+
+  <!-- depend on the broker so Spring will shutdown the embedded broker after Camel -->
+  <camelContext xmlns="http://camel.apache.org/schema/spring" depends-on="broker"/>
   <!-- END SNIPPET: ex -->
 
 </beans>