camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r807958 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/main/java/org/apache/camel/management/mbean/ camel-core/src/main/java/org/apache/camel/model/ camel-core/sr...
Date Wed, 26 Aug 2009 10:49:46 GMT
Author: davsclaus
Date: Wed Aug 26 10:49:44 2009
New Revision: 807958

URL: http://svn.apache.org/viewvc?rev=807958&view=rev
Log:
CAMEL-1937: Added support for using multiple LifecycleStrategy.

Added:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
  (contents, props changed)
      - copied, changed from r807882, camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePacakageScanClassResolver.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
  (with props)
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
  (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MultipleLifecycleStrategyInjectionTest.java
      - copied, changed from r807882, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/multipleLifecycleStrategyInjection.xml
      - copied, changed from r807882, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/lifecycleStrategyInjection.xml
Removed:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/SimpleLifecycleStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePacakageScanClassResolver.java
    camel/trunk/components/camel-spring/README.txt
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedConsumer.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java
    camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DummyLifecycleStrategy.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/JMXAgentTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java Wed Aug 26 10:49:44
2009
@@ -304,11 +304,18 @@
     Injector getInjector();
 
     /**
-     * Returns the lifecycle strategy used to handle lifecycle notification
+     * Returns the lifecycle strategies used to handle lifecycle notifications
      *
-     * @return the lifecycle strategy
+     * @return the lifecycle strategies
      */
-    LifecycleStrategy getLifecycleStrategy();
+    List<LifecycleStrategy> getLifecycleStrategies();
+
+    /**
+     * Adds the given lifecycle strategy to be used.
+     *
+     * @param lifecycleStrategy  the strategy
+     */
+    void addLifecycleStrategy(LifecycleStrategy lifecycleStrategy);
 
     /**
      * Resolves a language for creating expressions

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Wed
Aug 26 10:49:44 2009
@@ -106,7 +106,7 @@
     private LanguageResolver languageResolver = new DefaultLanguageResolver();
     private final Map<String, Language> languages = new HashMap<String, Language>();
     private Registry registry;
-    private LifecycleStrategy lifecycleStrategy;
+    private List<LifecycleStrategy> lifecycleStrategies = new ArrayList<LifecycleStrategy>();
     private ManagementStrategy managementStrategy;
     private final List<RouteDefinition> routeDefinitions = new ArrayList<RouteDefinition>();
     private List<InterceptStrategy> interceptStrategies = new ArrayList<InterceptStrategy>();
@@ -133,14 +133,15 @@
         name = NAME_PREFIX + ++nameSuffix;
 
         if (Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
-            LOG.info("JMX is disabled. Using SimpleLifecycleStrategy.");
-            lifecycleStrategy = new SimpleLifecycleStrategy();
+            LOG.info("JMX is disabled. Using DefaultManagementStrategy.");
             managementStrategy = new DefaultManagementStrategy();
         } else {
+            boolean registered = false;
             try {
                 LOG.info("JMX enabled. Using DefaultManagedLifecycleStrategy.");
                 managementStrategy = new ManagedManagementStrategy(new DefaultInstrumentationAgent());
-                lifecycleStrategy = new DefaultManagedLifecycleStrategy(managementStrategy);
+                lifecycleStrategies.add(new DefaultManagedLifecycleStrategy(managementStrategy));
+                registered = true;
             } catch (NoClassDefFoundError e) {
                 // if we can't instantiate the JMX enabled strategy then fallback to default
                 // could be because of missing .jars on the classpath
@@ -151,22 +152,19 @@
             } catch (Exception e) {
                 LOG.warn("Could not create JMX lifecycle strategy, caused by: " + e.getMessage());
             }
-            // if not created then fallback to default
-            if (lifecycleStrategy == null) {
-                LOG.warn("Cannot use JMX lifecycle strategy. Using SimpleLifecycleStrategy
instead.");
+            if (!registered) {
+                LOG.warn("Cannot use JMX. Fallback to using DefaultManagementStrategy.");
                 managementStrategy = new DefaultManagementStrategy();
-                lifecycleStrategy = new SimpleLifecycleStrategy();
             }
         }
 
         // use WebSphere specific resolver if running on WebSphere
-        if (WebSpherePacakageScanClassResolver.isWebSphereClassLoader(this.getClass().getClassLoader()))
{
+        if (WebSpherePackageScanClassResolver.isWebSphereClassLoader(this.getClass().getClassLoader()))
{
             LOG.info("Using WebSphere specific PackageScanClassResolver");
-            packageScanClassResolver = new WebSpherePacakageScanClassResolver("META-INF/services/org/apache/camel/TypeConverter");
+            packageScanClassResolver = new WebSpherePackageScanClassResolver("META-INF/services/org/apache/camel/TypeConverter");
         } else {
             packageScanClassResolver = new DefaultPackageScanClassResolver();
         }
-
     }
 
     /**
@@ -205,7 +203,9 @@
             }
             component.setCamelContext(this);
             components.put(componentName, component);
-            lifecycleStrategy.onComponentAdd(componentName, component);
+            for (LifecycleStrategy strategy : lifecycleStrategies) {
+                strategy.onComponentAdd(componentName, component);
+            }
         }
     }
 
@@ -247,7 +247,9 @@
         synchronized (components) {
             Component answer = components.remove(componentName);
             if (answer != null) {
-                lifecycleStrategy.onComponentRemove(componentName, answer);
+                for (LifecycleStrategy strategy : lifecycleStrategies) {
+                    strategy.onComponentRemove(componentName, answer);
+                }
             }
             return answer;
         }
@@ -265,7 +267,9 @@
                     }
                     components.put(componentName, component);
                     component.setCamelContext(this);
-                    lifecycleStrategy.onComponentAdd(componentName, component);
+                    for (LifecycleStrategy strategy : lifecycleStrategies) {
+                        strategy.onComponentAdd(componentName, component);
+                    }
                 } catch (Exception e) {
                     throw new RuntimeCamelException("Factory failed to create the " + componentName
                             + " component", e);
@@ -337,7 +341,9 @@
         synchronized (endpoints) {
             startServices(endpoint);
             oldEndpoint = endpoints.remove(uri);
-            lifecycleStrategy.onEndpointAdd(endpoint);
+            for (LifecycleStrategy strategy : lifecycleStrategies) {
+                strategy.onEndpointAdd(endpoint);
+            }
             addEndpointToRegistry(uri, endpoint);
             if (oldEndpoint != null) {
                 stopServices(oldEndpoint);
@@ -354,7 +360,9 @@
             if (oldEndpoint != null) {
                 answer.add(oldEndpoint);
                 stopServices(oldEndpoint);
-                lifecycleStrategy.onEndpointRemove(oldEndpoint);
+                for (LifecycleStrategy strategy : lifecycleStrategies) {
+                    strategy.onEndpointRemove(oldEndpoint);
+                }
             } else {
                 for (Map.Entry entry : endpoints.entrySet()) {
                     oldEndpoint = (Endpoint) entry.getValue();
@@ -362,7 +370,9 @@
                         answer.add(oldEndpoint);
                         stopServices(oldEndpoint);
                         endpoints.remove(entry.getKey());
-                        lifecycleStrategy.onEndpointRemove(oldEndpoint);
+                        for (LifecycleStrategy strategy : lifecycleStrategies) {
+                            strategy.onEndpointRemove(oldEndpoint);
+                        }
                     }
                 }
             }
@@ -424,7 +434,9 @@
 
                     if (answer != null) {
                         addService(answer);
-                        lifecycleStrategy.onEndpointAdd(answer);
+                        for (LifecycleStrategy strategy : lifecycleStrategies) {
+                            strategy.onEndpointAdd(answer);
+                        }
                         answer = addEndpointToRegistry(uri, answer);
                     }
                 } catch (Exception e) {
@@ -606,7 +618,9 @@
     public void addService(Object object) throws Exception {
         if (object instanceof Service) {
             Service service = (Service) object;
-            getLifecycleStrategy().onServiceAdd(this, service);
+            for (LifecycleStrategy strategy : lifecycleStrategies) {
+                strategy.onServiceAdd(this, service);
+            }
             servicesToClose.add(service);
         }
         startServices(object);
@@ -730,12 +744,16 @@
         this.registry = registry;
     }
 
-    public LifecycleStrategy getLifecycleStrategy() {
-        return lifecycleStrategy;
+    public List<LifecycleStrategy> getLifecycleStrategies() {
+        return lifecycleStrategies;
     }
 
-    public void setLifecycleStrategy(LifecycleStrategy lifecycleStrategy) {
-        this.lifecycleStrategy = lifecycleStrategy;
+    public void setLifecycleStrategies(List<LifecycleStrategy> lifecycleStrategies)
{
+        this.lifecycleStrategies = lifecycleStrategies;
+    }
+
+    public void addLifecycleStrategy(LifecycleStrategy lifecycleStrategy) {
+        this.lifecycleStrategies.add(lifecycleStrategy);
     }
 
     public List<RouteDefinition> getRouteDefinitions() {
@@ -753,7 +771,7 @@
     public void addInterceptStrategy(InterceptStrategy interceptStrategy) {
         getInterceptStrategies().add(interceptStrategy);
 
-        // for backwards compability or if user add them here instead of the setXXX methods
+        // for backwards compatible or if user add them here instead of the setXXX methods
 
         if (interceptStrategy instanceof Tracer) {
             setTracing(true);
@@ -892,16 +910,17 @@
             }
         }
 
-        try {
-            lifecycleStrategy.onContextStart(this);
-        } catch (Exception e) {
-            // not all containers allow access to its MBeanServer (such as OC4j)
-            LOG.warn("Cannot start lifecycleStrategy: " + lifecycleStrategy + ". Cause: "
+ e.getMessage());
-            if (!(lifecycleStrategy instanceof SimpleLifecycleStrategy)) {
-                // fallback to non JMX lifecycle to allow Camel to startup
-                LOG.warn("Will fallback to use SimpleLifecycleStrategy (non JMX) lifecycle
strategy");
-                lifecycleStrategy = new SimpleLifecycleStrategy();
-                lifecycleStrategy.onContextStart(this);
+
+        Iterator<LifecycleStrategy> it = lifecycleStrategies.iterator();
+        while (it.hasNext()) {
+            LifecycleStrategy strategy = it.next();
+            try {
+                strategy.onContextStart(this);
+            } catch (Exception e) {
+                // not all containers allow access to its MBeanServer (such as OC4j)
+                // so here we remove the troublesome strategy to be able to continue
+                LOG.warn("Cannot start lifecycle strategy: " + strategy + ". This strategy
will be removed. Cause " + e.getMessage(), e);
+                it.remove();
             }
         }
 
@@ -936,9 +955,11 @@
         servicesToClose.clear();
 
         try {
-            lifecycleStrategy.onContextStop(this);
+            for (LifecycleStrategy strategy : lifecycleStrategies) {
+                strategy.onContextStop(this);
+            }
         } catch (Exception e) {
-            LOG.warn("Cannot stop lifecycleStrategy: " + lifecycleStrategy + ". Cause: "
+ e.getMessage());
+            LOG.warn("Cannot stop lifecycle strategies: " + e.getMessage());
         }
 
         LOG.info("Apache Camel " + getVersion() + " (CamelContext:" + getName() + ") stopped");

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
Wed Aug 26 10:49:44 2009
@@ -267,7 +267,7 @@
     /**
      * Strategy to get the resources by the given classloader.
      * <p/>
-     * Notice that in WebSphere platforms there is a {@link WebSpherePacakageScanClassResolver}
+     * Notice that in WebSphere platforms there is a {@link WebSpherePackageScanClassResolver}
      * to take care of WebSphere's odditiy of resource loading.
      *
      * @param loader  the classloader

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java Wed Aug 26
10:49:44 2009
@@ -75,7 +75,9 @@
     protected void doStart() throws Exception {
         camelContext.addRouteCollection(routes);
 
-        getLifecycleStrategy().onRoutesAdd(routes);
+        for (LifecycleStrategy strategy : camelContext.getLifecycleStrategies()) {
+            strategy.onRoutesAdd(routes);
+        }
 
         for (Route route : routes) {
             List<Service> services = route.getServicesForRoute();
@@ -112,7 +114,9 @@
     }
 
     protected void doStop() throws Exception {
-        getLifecycleStrategy().onRoutesRemove(routes);
+        for (LifecycleStrategy strategy : camelContext.getLifecycleStrategies()) {
+            strategy.onRoutesRemove(routes);
+        }
 
         // do not stop child services as in doStart
         // as route.getServicesForRoute() will restart
@@ -127,13 +131,11 @@
         camelContext.removeRouteCollection(routes);
     }
 
-    protected LifecycleStrategy getLifecycleStrategy() {
-        return camelContext.getLifecycleStrategy();
-    }
-
     protected void startChildService(List<Service> services) throws Exception {
         for (Service service : services) {
-            getLifecycleStrategy().onServiceAdd(camelContext, service);
+            for (LifecycleStrategy strategy : camelContext.getLifecycleStrategies()) {
+                strategy.onServiceAdd(camelContext, service);
+            }
             ServiceHelper.startService(service);
             addChildService(service);
         }

Copied: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
(from r807882, camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePacakageScanClassResolver.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java?p2=camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java&p1=camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePacakageScanClassResolver.java&r1=807882&r2=807958&rev=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePacakageScanClassResolver.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
Wed Aug 26 10:49:44 2009
@@ -23,7 +23,7 @@
 /**
  * WebSphere specific resolver to handle loading annotated resources in JAR files.
  */
-public class WebSpherePacakageScanClassResolver extends DefaultPackageScanClassResolver {
+public class WebSpherePackageScanClassResolver extends DefaultPackageScanClassResolver {
 
     private final String resourcePath;
 
@@ -32,7 +32,7 @@
      *
      * @param resourcePath  the fixed resource path to use for fetching camel jars in WebSphere.
      */
-    public WebSpherePacakageScanClassResolver(String resourcePath) {
+    public WebSpherePackageScanClassResolver(String resourcePath) {
         this.resourcePath = resourcePath;
     }
 

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/WebSpherePackageScanClassResolver.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedConsumer.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedConsumer.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedConsumer.java
Wed Aug 26 10:49:44 2009
@@ -39,7 +39,7 @@
     }
 
     @ManagedAttribute(description = "Endpoint Uri")
-    public String getUri() {
+    public String getEndpointUri() {
         return consumer.getEndpoint().getEndpointUri();
     }
 

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java Wed Aug
26 10:49:44 2009
@@ -39,6 +39,7 @@
 import org.apache.camel.processor.interceptor.HandleFault;
 import org.apache.camel.processor.interceptor.StreamCaching;
 import org.apache.camel.processor.interceptor.Tracer;
+import org.apache.camel.spi.LifecycleStrategy;
 import org.apache.camel.spi.RouteContext;
 import org.apache.camel.util.CamelContextHelper;
 
@@ -431,7 +432,9 @@
         // force endpoint resolution
         routeContext.getEndpoint();
         if (camelContext != null) {
-            camelContext.getLifecycleStrategy().onRouteContextCreate(routeContext);
+            for (LifecycleStrategy strategy : camelContext.getLifecycleStrategies()) {
+                strategy.onRouteContextCreate(routeContext);
+            }
         }
 
         List<ProcessorDefinition> list = new ArrayList<ProcessorDefinition>(outputs);

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java?rev=807958&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
(added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
Wed Aug 26 10:49:44 2009
@@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.impl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Route;
+import org.apache.camel.Service;
+import org.apache.camel.spi.LifecycleStrategy;
+import org.apache.camel.spi.RouteContext;
+
+/**
+ * @version $Revision$
+ */
+public class DummyLifecycleStrategy implements LifecycleStrategy {
+
+    private List<String> events = new ArrayList<String>();
+
+    public void onContextStart(CamelContext context) {
+        events.add("onContextStart");
+    }
+
+    public void onContextStop(CamelContext context) {
+        events.add("onContextStop");
+    }
+
+    public void onComponentAdd(String name, Component component) {
+        events.add("onComponentAdd");
+    }
+
+    public void onComponentRemove(String name, Component component) {
+        events.add("onComponentRemove");
+    }
+
+    public void onEndpointAdd(Endpoint endpoint) {
+        events.add("onEndpointAdd");
+    }
+
+    public void onEndpointRemove(Endpoint endpoint) {
+        events.add("onEndpointRemove");
+    }
+
+    public void onServiceAdd(CamelContext context, Service service) {
+        events.add("onServiceAdd");
+    }
+
+    public void onServiceRemove(CamelContext context, Service service) {
+        events.add("onServiceRemove");
+    }
+
+    public void onRoutesAdd(Collection<Route> routes) {
+        events.add("onRoutesAdd");
+    }
+
+    public void onRoutesRemove(Collection<Route> routes) {
+        events.add("onRoutesRemove");
+    }
+
+    public void onRouteContextCreate(RouteContext routeContext) {
+        events.add("onRouteContextCreate");
+    }
+
+    public List<String> getEvents() {
+        return events;
+    }
+}

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java?rev=807958&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
(added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
Wed Aug 26 10:49:44 2009
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.impl;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.TestSupport;
+import org.apache.camel.component.log.LogComponent;
+import org.apache.camel.util.jndi.JndiContext;
+
+/**
+ * @version $Revision$
+ */
+public class MultipleLifecycleStrategyTest extends TestSupport {
+
+    private DummyLifecycleStrategy dummy1 = new DummyLifecycleStrategy();
+    private DummyLifecycleStrategy dummy2 = new DummyLifecycleStrategy();
+
+    protected CamelContext createCamelContext() throws Exception {
+        CamelContext context = new DefaultCamelContext(new JndiContext());
+        context.addLifecycleStrategy(dummy1);
+        context.addLifecycleStrategy(dummy2);
+        return context;
+    }
+
+    public void testMultipleLifecycle() throws Exception {
+        CamelContext context = createCamelContext();
+        context.start();
+
+        Component log = new LogComponent();
+        context.addComponent("log", log);
+
+        context.addEndpoint("log:/foo", log.createEndpoint("log://foo"));
+
+        context.removeComponent("log");
+
+        context.stop();
+
+        assertEquals(6, dummy1.getEvents().size());
+        assertEquals(6, dummy2.getEvents().size());
+
+        assertEquals("onServiceAdd", dummy1.getEvents().get(0));
+        assertEquals("onServiceAdd", dummy2.getEvents().get(0));
+        assertEquals("onContextStart", dummy1.getEvents().get(1));
+        assertEquals("onContextStart", dummy2.getEvents().get(1));
+        assertEquals("onComponentAdd", dummy1.getEvents().get(2));
+        assertEquals("onComponentAdd", dummy2.getEvents().get(2));
+        assertEquals("onEndpointAdd", dummy1.getEvents().get(3));
+        assertEquals("onEndpointAdd", dummy2.getEvents().get(3));
+        assertEquals("onComponentRemove", dummy1.getEvents().get(4));
+        assertEquals("onComponentRemove", dummy2.getEvents().get(4));
+        assertEquals("onContextStop", dummy1.getEvents().get(5));
+        assertEquals("onContextStop", dummy2.getEvents().get(5));
+    }
+
+}

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
Wed Aug 26 10:49:44 2009
@@ -22,7 +22,6 @@
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Expression;
 import org.apache.camel.builder.RouteBuilder;
 
 /**
@@ -64,7 +63,7 @@
         Long last = (Long) mbeanServer.getAttribute(routeName, "LastProcessingTime");
         Long total = (Long) mbeanServer.getAttribute(routeName, "TotalProcessingTime");
 
-        assertTrue("Should take at most 1 sec: was " + total, total < 1100);
+        assertTrue("Should take at most 1.5 sec: was " + total, total < 1500);
 
         // change the throttler using JMX
         mbeanServer.setAttribute(throttlerName, new Attribute("MaximumRequestsPerPeriod",
(long) 2));

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterConsumerTest.java
Wed Aug 26 10:49:44 2009
@@ -48,7 +48,7 @@
         ObjectName on = set.iterator().next();
 
         assertTrue("Should be registered", mbeanServer.isRegistered(on));
-        String uri = (String) mbeanServer.getAttribute(on, "Uri");
+        String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
         assertEquals("direct://start", uri);
 
         context.stop();

Modified: camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
(original)
+++ camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
Wed Aug 26 10:49:44 2009
@@ -134,8 +134,8 @@
 
     @Override
     @Inject(optional = true)
-    public void setLifecycleStrategy(LifecycleStrategy lifecycleStrategy) {
-        super.setLifecycleStrategy(lifecycleStrategy);
+    public void setLifecycleStrategies(List<LifecycleStrategy> lifecycleStrategies)
{
+        super.setLifecycleStrategies(lifecycleStrategies);
     }
 
     @Override

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
Wed Aug 26 10:49:44 2009
@@ -20,6 +20,7 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
+import java.util.HashMap;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
@@ -32,7 +33,6 @@
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.ErrorHandlerBuilder;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.SimpleLifecycleStrategy;
 import org.apache.camel.impl.scan.PatternBasedPackageScanFilter;
 import org.apache.camel.management.DefaultInstrumentationAgent;
 import org.apache.camel.management.DefaultManagedLifecycleStrategy;
@@ -62,6 +62,7 @@
 import org.apache.camel.spi.FactoryFinderResolver;
 import org.apache.camel.spi.InterceptStrategy;
 import org.apache.camel.spi.LifecycleStrategy;
+import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.spi.PackageScanClassResolver;
 import org.apache.camel.spi.Registry;
 import org.apache.camel.util.EndpointHelper;
@@ -180,6 +181,9 @@
             getContext().setProperties(properties.asMap());
         }
 
+        // setup JMX agent at first
+        initJMXAgent();
+
         // set the resolvers first
         PackageScanClassResolver packageResolver = getBeanForType(PackageScanClassResolver.class);
         if (packageResolver != null) {
@@ -197,13 +201,6 @@
             getContext().setFactoryFinderResolver(factoryFinderResolver);
         }
 
-        // set the lifecycle strategy if defined
-        LifecycleStrategy lifecycleStrategy = getBeanForType(LifecycleStrategy.class);
-        if (lifecycleStrategy != null) {
-            LOG.info("Using custom LifecycleStrategy: " + lifecycleStrategy);
-            getContext().setLifecycleStrategy(lifecycleStrategy);
-        }
-
         // set the strategy if defined
         Registry registry = getBeanForType(Registry.class);
         if (registry != null) {
@@ -235,10 +232,10 @@
         }
 
         // add global interceptors
-        Map<String, InterceptStrategy> strategies = getContext().getRegistry().lookupByType(InterceptStrategy.class);
-        if (strategies != null && !strategies.isEmpty()) {
-            for (String id : strategies.keySet()) {
-                InterceptStrategy strategy = strategies.get(id);
+        Map<String, InterceptStrategy> interceptStrategies = getContext().getRegistry().lookupByType(InterceptStrategy.class);
+        if (interceptStrategies != null && !interceptStrategies.isEmpty()) {
+            for (String id : interceptStrategies.keySet()) {
+                InterceptStrategy strategy = interceptStrategies.get(id);
                 // do not add if already added, for instance a tracer that is also an InterceptStrategy
class
                 if (!getContext().getInterceptStrategies().contains(strategy)) {
                     LOG.info("Using custom intercept strategy with id: " + id + " and implementation:
" + strategy);
@@ -247,6 +244,19 @@
             }
         }
 
+        // set the lifecycle strategy if defined
+        Map<String, LifecycleStrategy> lifecycleStrategies = getContext().getRegistry().lookupByType(LifecycleStrategy.class);
+        if (lifecycleStrategies != null && !lifecycleStrategies.isEmpty()) {
+            for (String id : lifecycleStrategies.keySet()) {
+                LifecycleStrategy strategy = lifecycleStrategies.get(id);
+                // do not add if already added, for instance a tracer that is also an InterceptStrategy
class
+                if (!getContext().getLifecycleStrategies().contains(strategy)) {
+                    LOG.info("Using custom lifecycle strategy with id: " + id + " and implementation:
" + strategy);
+                    getContext().addLifecycleStrategy(strategy);
+                }
+            }
+        }
+
         // Set the application context and camelContext for the beanPostProcessor
         if (beanPostProcessor != null) {
             if (beanPostProcessor instanceof ApplicationContextAware) {
@@ -278,9 +288,6 @@
         // lets force any lazy creation
         getContext().addRouteDefinitions(routes);
 
-        // setup JMX agent
-        initJMXAgent();
-
         if (LOG.isDebugEnabled()) {
             LOG.debug("Found JAXB created routes: " + getRoutes());
         }
@@ -424,9 +431,11 @@
     private void initJMXAgent() throws Exception {
         if (camelJMXAgent != null && camelJMXAgent.isDisabled()) {
             LOG.info("JMXAgent disabled");
-            getContext().setLifecycleStrategy(new SimpleLifecycleStrategy());
+            // clear the existing lifecycle strategies define by the DefaultCamelContext
constructor
+            getContext().setLifecycleStrategies(new ArrayList<LifecycleStrategy>());
             getContext().setManagementStrategy(new DefaultManagementStrategy());
         } else if (camelJMXAgent != null) {
+            LOG.info("JMXAgent enabled: " + camelJMXAgent);
             DefaultInstrumentationAgent agent = new DefaultInstrumentationAgent();
             agent.setConnectorPort(camelJMXAgent.getConnectorPort());
             agent.setCreateConnector(camelJMXAgent.isCreateConnector());
@@ -437,9 +446,11 @@
             agent.setUsePlatformMBeanServer(camelJMXAgent.isUsePlatformMBeanServer());
             agent.setOnlyRegisterProcessorWithCustomId(camelJMXAgent.getOnlyRegisterProcessorWithCustomId());
 
-            LOG.info("JMXAgent enabled: " + camelJMXAgent);
-            getContext().setLifecycleStrategy(new DefaultManagedLifecycleStrategy());
-            getContext().setManagementStrategy(new ManagedManagementStrategy());
+            ManagementStrategy managementStrategy = new ManagedManagementStrategy(agent);
+            getContext().setManagementStrategy(managementStrategy);
+            // clear the existing lifecycle strategies define by the DefaultCamelContext
constructor
+            getContext().setLifecycleStrategies(new ArrayList<LifecycleStrategy>());
+            getContext().addLifecycleStrategy(new DefaultManagedLifecycleStrategy(managementStrategy));
             getContext().getManagementStrategy().onlyManageProcessorWithCustomId(camelJMXAgent.getOnlyRegisterProcessorWithCustomId());
         }
     }
@@ -461,7 +472,6 @@
             }
         }
         return bean;
-
     }
 
     public void destroy() throws Exception {

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java
Wed Aug 26 10:49:44 2009
@@ -93,7 +93,6 @@
         if (beans == null || beans.isEmpty()) {
             return false;
         }
-        // TODO apply some filter?
         return true;
     }
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DummyLifecycleStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DummyLifecycleStrategy.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DummyLifecycleStrategy.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DummyLifecycleStrategy.java
Wed Aug 26 10:49:44 2009
@@ -16,7 +16,15 @@
  */
 package org.apache.camel.spring;
 
-import org.apache.camel.impl.SimpleLifecycleStrategy;
+import java.util.Collection;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Route;
+import org.apache.camel.Service;
+import org.apache.camel.spi.LifecycleStrategy;
+import org.apache.camel.spi.RouteContext;
 
 /**
  * Dummy LifecycleStrategy for LifecycleStrategy injection test.
@@ -24,5 +32,38 @@
  * @version $Revision$
  *
  */
-public class DummyLifecycleStrategy extends SimpleLifecycleStrategy {
+public class DummyLifecycleStrategy implements LifecycleStrategy {
+
+    public void onContextStart(CamelContext camelContext) {
+    }
+
+    public void onContextStop(CamelContext camelContext) {
+    }
+
+    public void onComponentAdd(String s, Component component) {
+    }
+
+    public void onComponentRemove(String s, Component component) {
+    }
+
+    public void onEndpointAdd(Endpoint endpoint) {
+    }
+
+    public void onEndpointRemove(Endpoint endpoint) {
+    }
+
+    public void onServiceAdd(CamelContext camelContext, Service service) {
+    }
+
+    public void onServiceRemove(CamelContext camelContext, Service service) {
+    }
+
+    public void onRouteContextCreate(RouteContext routeContext) {
+    }
+
+    public void onRoutesRemove(Collection<Route> routes) {
+    }
+
+    public void onRoutesAdd(Collection<Route> routes) {
+    }
 }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/JMXAgentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/JMXAgentTest.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/JMXAgentTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/JMXAgentTest.java
Wed Aug 26 10:49:44 2009
@@ -30,11 +30,8 @@
  *
  * @version $Revision$
  */
-@Ignore
 public class JMXAgentTest extends DefaultJMXAgentTest {
 
-    // TODO: Fix me later
-
     protected static final String JMXSERVICEURL = "service:jmx:rmi:///jndi/rmi://localhost:20008/jmxrmi/camel";
     protected JMXConnector clientConnector;
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java?rev=807958&r1=807957&r2=807958&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java
Wed Aug 26 10:49:44 2009
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.spring;
 
-import org.apache.camel.CamelContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -24,20 +23,17 @@
  * Test for LifecycleStrategy injection.
  *
  * @version $Revision$
- *
  */
 public class LifecycleStrategyInjectionTest extends SpringTestSupport {
 
-    
     @Override
     protected AbstractXmlApplicationContext createApplicationContext() {
-        setUseRouteBuilder(false);
         return new ClassPathXmlApplicationContext("org/apache/camel/spring/lifecycleStrategyInjection.xml");
     }
     
     public void testInjectedStrategy() throws Exception {
-        CamelContext context = createCamelContext();
-        assertTrue(context.getLifecycleStrategy() instanceof DummyLifecycleStrategy);
+        assertEquals(2, context.getLifecycleStrategies().size());
+        assertIsInstanceOf(DummyLifecycleStrategy.class, context.getLifecycleStrategies().get(1));
     }
     
 }

Copied: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MultipleLifecycleStrategyInjectionTest.java
(from r807882, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MultipleLifecycleStrategyInjectionTest.java?p2=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MultipleLifecycleStrategyInjectionTest.java&p1=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java&r1=807882&r2=807958&rev=807958&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/LifecycleStrategyInjectionTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MultipleLifecycleStrategyInjectionTest.java
Wed Aug 26 10:49:44 2009
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.spring;
 
-import org.apache.camel.CamelContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -24,20 +23,18 @@
  * Test for LifecycleStrategy injection.
  *
  * @version $Revision$
- *
  */
-public class LifecycleStrategyInjectionTest extends SpringTestSupport {
+public class MultipleLifecycleStrategyInjectionTest extends SpringTestSupport {
 
-    
     @Override
     protected AbstractXmlApplicationContext createApplicationContext() {
-        setUseRouteBuilder(false);
-        return new ClassPathXmlApplicationContext("org/apache/camel/spring/lifecycleStrategyInjection.xml");
+        return new ClassPathXmlApplicationContext("org/apache/camel/spring/multipleLifecycleStrategyInjection.xml");
     }
-    
+
     public void testInjectedStrategy() throws Exception {
-        CamelContext context = createCamelContext();
-        assertTrue(context.getLifecycleStrategy() instanceof DummyLifecycleStrategy);
+        assertEquals(3, context.getLifecycleStrategies().size());
+        assertIsInstanceOf(DummyLifecycleStrategy.class, context.getLifecycleStrategies().get(1));
+        assertIsInstanceOf(DummyLifecycleStrategy.class, context.getLifecycleStrategies().get(2));
     }
-    
-}
+
+}
\ No newline at end of file

Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/multipleLifecycleStrategyInjection.xml
(from r807882, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/lifecycleStrategyInjection.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/multipleLifecycleStrategyInjection.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/multipleLifecycleStrategyInjection.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/lifecycleStrategyInjection.xml&r1=807882&r2=807958&rev=807958&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/lifecycleStrategyInjection.xml
(original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/multipleLifecycleStrategyInjection.xml
Wed Aug 26 10:49:44 2009
@@ -23,8 +23,10 @@
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
     
-  <bean id="lifecycleStrategy" class="org.apache.camel.spring.DummyLifecycleStrategy"/>
-  
+  <bean id="lifecycleStrategy1" class="org.apache.camel.spring.DummyLifecycleStrategy"/>
+    
+  <bean id="lifecycleStrategy2" class="org.apache.camel.spring.DummyLifecycleStrategy"/>
+
   <camel:camelContext id="camel">
     <camel:route>
       <camel:from uri="seda:start"/>



Mime
View raw message