Author: dkulp
Date: Fri Jul  8 19:48:36 2011
New Revision: 1144458

URL: http://svn.apache.org/viewvc?rev=1144458&view=rev
Log:
Merged revisions 1098628 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1098628 | davsclaus | 2011-05-02 11:33:33 -0400 (Mon, 02 May 2011) | 1 line
  
  CAMEL-3925: Fixed managment examnple shutdown. Yikes Spring 3 is crappy at 
shutting down beans in a graceful order. Using AMQ 5.5.0 version for the XSD as 
the XSD is not online and end user have trouble knowing how to instruct their 
IDE to use a version from the JAR or whatever.
........

Modified:
    camel/branches/camel-2.7.x/   (props changed)
    
camel/branches/camel-2.7.x/examples/camel-example-cxf/src/main/resources/META-INF/spring/CxfRouteCamelContext.xml
    
camel/branches/camel-2.7.x/examples/camel-example-jms-file/src/main/resources/META-INF/spring/camelContext.xml
    
camel/branches/camel-2.7.x/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/queueCamelContext.xml
    camel/branches/camel-2.7.x/examples/camel-example-management/pom.xml
    
camel/branches/camel-2.7.x/examples/camel-example-management/src/main/java/org/apache/camel/example/management/StockService.java
    
camel/branches/camel-2.7.x/examples/camel-example-management/src/main/resources/META-INF/spring/camel-context.xml
    
camel/branches/camel-2.7.x/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml
    
camel/branches/camel-2.7.x/examples/camel-example-route-throttling/src/main/resources/META-INF/spring/camel-server.xml
    
camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server-aop.xml
    
camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml

Propchange: camel/branches/camel-2.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul  8 19:48:36 2011
@@ -1 +1 @@
-/camel/trunk:1083696,1083723-1083724,1084150,1085277,1085543,1085549,1085905,1085909,1086165,1086231,1087005,1087276,1087612,1087620,1087856,1088583,1088916-1088917,1089275,1089348,1090166,1090204,1090564,1090960-1090969,1091082,1091518,1091771,1091799,1092034,1092068,1092577,1092667,1093978,1093980,1093999,1094123,1094147,1094156,1095405,1095469,1095471,1095475-1095476,1096346,1096736,1097761,1097909,1097912,1097978,1098032,1098630,1099417,1100975,1102162,1102181,1104076,1124497,1127744,1127988,1131411,1134252,1134501,1135223,1135364,1136290,1138285,1139163,1140096-1140102,1141783,1143925,1144248,1144324
+/camel/trunk:1083696,1083723-1083724,1084150,1085277,1085543,1085549,1085905,1085909,1086165,1086231,1087005,1087276,1087612,1087620,1087856,1088583,1088916-1088917,1089275,1089348,1090166,1090204,1090564,1090960-1090969,1091082,1091518,1091771,1091799,1092034,1092068,1092577,1092667,1093978,1093980,1093999,1094123,1094147,1094156,1095405,1095469,1095471,1095475-1095476,1096346,1096736,1097761,1097909,1097912,1097978,1098032,1098628,1098630,1099417,1100975,1102162,1102181,1104076,1124497,1127744,1127988,1131411,1134252,1134501,1135223,1135364,1136290,1138285,1139163,1140096-1140102,1141783,1143925,1144248,1144324

Propchange: camel/branches/camel-2.7.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-cxf/src/main/resources/META-INF/spring/CxfRouteCamelContext.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-cxf/src/main/resources/META-INF/spring/CxfRouteCamelContext.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-cxf/src/main/resources/META-INF/spring/CxfRouteCamelContext.xml
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-cxf/src/main/resources/META-INF/spring/CxfRouteCamelContext.xml
 Fri Jul  8 19:48:36 2011
@@ -24,7 +24,7 @@
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
        http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd
+       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>
   
   <import resource="classpath:META-INF/cxf/cxf.xml" />

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-jms-file/src/main/resources/META-INF/spring/camelContext.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-jms-file/src/main/resources/META-INF/spring/camelContext.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-jms-file/src/main/resources/META-INF/spring/camelContext.xml
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-jms-file/src/main/resources/META-INF/spring/camelContext.xml
 Fri Jul  8 19:48:36 2011
@@ -23,7 +23,7 @@
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
        http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd";>
+       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd";>
     
     <!-- lets configure the ActiveMQ JMS broker server to listen on TCP 51616 
-->
     <broker:broker id="broker" useJmx="false" persistent="false" 
brokerName="localhost">

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/queueCamelContext.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/queueCamelContext.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/queueCamelContext.xml
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-loan-broker/src/main/resources/META-INF/spring/queueCamelContext.xml
 Fri Jul  8 19:48:36 2011
@@ -23,7 +23,7 @@
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
        http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd";>
+       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd";>
     
     <!-- lets configure the ActiveMQ JMS broker server to listen on TCP 51616 
-->
     <broker:broker useJmx="false" persistent="false" brokerName="localhost">

Modified: camel/branches/camel-2.7.x/examples/camel-example-management/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-management/pom.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- camel/branches/camel-2.7.x/examples/camel-example-management/pom.xml 
(original)
+++ camel/branches/camel-2.7.x/examples/camel-example-management/pom.xml Fri 
Jul  8 19:48:36 2011
@@ -52,6 +52,12 @@
             <artifactId>activemq-camel</artifactId>
         </dependency>
 
+        <!-- xbean is required for ActiveMQ broker configuration in the spring 
xml file -->
+        <dependency>
+            <groupId>org.apache.xbean</groupId>
+            <artifactId>xbean-spring</artifactId>
+        </dependency>
+
         <!-- logging -->
         <dependency>
             <groupId>org.slf4j</groupId>

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-management/src/main/java/org/apache/camel/example/management/StockService.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-management/src/main/java/org/apache/camel/example/management/StockService.java?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-management/src/main/java/org/apache/camel/example/management/StockService.java
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-management/src/main/java/org/apache/camel/example/management/StockService.java
 Fri Jul  8 19:48:36 2011
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.example.management;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
@@ -28,9 +29,15 @@ import org.apache.camel.language.XPath;
  */
 public class StockService {
 
-    private List<String> symbols;
+    private final List<String> symbols = new ArrayList<String>();
     private Map<String, Integer> stat = new ConcurrentHashMap<String, 
Integer>();
 
+    public StockService() {
+        symbols.add("IBM");
+        symbols.add("APPLE");
+        symbols.add("ORCL");
+    }
+
     public String transform(@XPath("/stock/symbol/text()") String symbol, 
@XPath("/stock/value/text()") String value) {
         Integer hits = stat.get(symbol);
         if (hits == null) {
@@ -67,7 +74,4 @@ public class StockService {
         return xml.toString();
     }
 
-    public void setSymbols(List<String> symbols) {
-        this.symbols = symbols;
-    }
 }

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-management/src/main/resources/META-INF/spring/camel-context.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-management/src/main/resources/META-INF/spring/camel-context.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-management/src/main/resources/META-INF/spring/camel-context.xml
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-management/src/main/resources/META-INF/spring/camel-context.xml
 Fri Jul  8 19:48:36 2011
@@ -19,32 +19,21 @@
 <beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:u="http://www.springframework.org/schema/util";
+       xmlns:broker="http://activemq.apache.org/schema/core";
        xsi:schemaLocation="
             http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
             http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
-            http://www.springframework.org/schema/util 
http://www.springframework.org/schema/util/spring-util.xsd";>
+            http://www.springframework.org/schema/util 
http://www.springframework.org/schema/util/spring-util.xsd
+            http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd";>
 
-    <bean id="activemq" 
class="org.apache.activemq.camel.component.ActiveMQComponent" 
depends-on="camel">
-        <property name="brokerURL" 
value="vm://localhost?broker.persistent=false"/>
-    </bean>
-
-    <bean id="stock" class="org.apache.camel.example.management.StockService" 
depends-on="camel">
-        <property name="symbols" ref="symbols"/>
-    </bean>
-
-    <u:list id="symbols" value-type="java.lang.String">
-        <value>IBM</value>
-        <value>APPLE</value>
-        <value>JAVA</value>
-    </u:list>
-
-    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>
+    <!-- create a CamelContext -->
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"; 
depends-on="broker">
         <!-- Default JMX connector url: 
"service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel" -->
         <jmxAgent id="agent" createConnector="true"/>
 
         <route>
             <from uri="timer://inbox?period=5000"/>
-            <bean ref="stock" method="createRandomStocks"/>
+            <bean beanType="org.apache.camel.example.management.StockService" 
method="createRandomStocks"/>
             <to uri="file://target/inbox"/>
         </route>
 
@@ -61,10 +50,23 @@
         <route>
             <from uri="activemq:queue:stock"/>
             <delay><constant>100</constant></delay>
-            <bean ref="stock" method="transform"/>
+            <bean beanType="org.apache.camel.example.management.StockService" 
method="transform"/>
             <to uri="log:stocks?groupSize=100"/>
         </route>
 
     </camelContext>
 
+    <!-- create a Camel ActiveMQ component to use -->
+    <bean id="activemq" 
class="org.apache.activemq.camel.component.ActiveMQComponent" 
depends-on="broker">
+        <property name="brokerURL" 
value="vm://myBroker?create=false&amp;waitForStart=5000"/>
+    </bean>
+
+    <!-- create an ActiveMQ broker -->
+    <!-- do not use the shutdown hook as it would cause the broker to shutdown 
when you press ctrl + c -->
+    <broker:broker id="broker" useJmx="true" persistent="false" 
brokerName="myBroker" useShutdownHook="false">
+        <broker:transportConnectors>
+            <broker:transportConnector name="vm" uri="vm://myBroker"/>
+        </broker:transportConnectors>
+    </broker:broker>
+
 </beans>

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml
 Fri Jul  8 19:48:36 2011
@@ -24,7 +24,7 @@
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
        http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd";>
+       http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd";>
 
   <!-- This creates an embedded ActiveMQ Broker -->
   <broker xmlns="http://activemq.apache.org/schema/core"; useJmx="false" 
persistent="false" brokerName="myBroker" id="broker">

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-route-throttling/src/main/resources/META-INF/spring/camel-server.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-route-throttling/src/main/resources/META-INF/spring/camel-server.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-route-throttling/src/main/resources/META-INF/spring/camel-server.xml
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-route-throttling/src/main/resources/META-INF/spring/camel-server.xml
 Fri Jul  8 19:48:36 2011
@@ -23,7 +23,7 @@
        xsi:schemaLocation="
         http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
         http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-        http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd";>
+        http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd";>
 
     <bean id="jmsConnectionFactory" 
class="org.apache.activemq.ActiveMQConnectionFactory">
         <property name="brokerURL" value="tcp://localhost:51616"/>

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server-aop.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server-aop.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server-aop.xml
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server-aop.xml
 Fri Jul  8 19:48:36 2011
@@ -28,7 +28,7 @@
         http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop.xsd
         http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context.xsd
         http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-        http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd";>
+        http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd";>
 <!-- END SNIPPET: e1 -->
 
     <!-- START SNIPPET: e2 -->

Modified: 
camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml?rev=1144458&r1=1144457&r2=1144458&view=diff
==============================================================================
--- 
camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml
 (original)
+++ 
camel/branches/camel-2.7.x/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml
 Fri Jul  8 19:48:36 2011
@@ -26,7 +26,7 @@
         http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context.xsd
         http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-        http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core.xsd";>
+        http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd";>
 <!-- END SNIPPET: e1 -->
 
     <!-- START SNIPPET: e2 -->


Reply via email to