camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1087997 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/ main/java/org/apache/camel/impl/ main/java/org/apache/camel/management/ main/java/org/apache/camel/management/mbean/ main/java/org/apache/camel/util/ test/java/org/apach...
Date Sat, 02 Apr 2011 11:05:47 GMT
Author: davsclaus
Date: Sat Apr  2 11:05:46 2011
New Revision: 1087997

URL: http://svn.apache.org/viewvc?rev=1087997&view=rev
Log:
CAMEL-3827: Added support for setting endpoint cache size on CamelContext.

Added:
    camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
      - copied, changed from r1087710, camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProducerCache.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
      - copied, changed from r1087710, camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedEndpointRegistryTest.java
      - copied, changed from r1087710, camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.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/EndpointRegistry.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java?rev=1087997&r1=1087996&r2=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java Sat Apr  2 11:05:46
2011
@@ -138,9 +138,10 @@ public interface Exchange {
     String LOOP_INDEX               = "CamelLoopIndex";
     String LOOP_SIZE                = "CamelLoopSize";
 
-    String MAXIMUM_CACHE_POOL_SIZE = "CamelMaximumCachePoolSize";
-    String MULTICAST_INDEX         = "CamelMulticastIndex";
-    String MULTICAST_COMPLETE      = "CamelMulticastComplete";
+    String MAXIMUM_CACHE_POOL_SIZE     = "CamelMaximumCachePoolSize";
+    String MAXIMUM_ENDPOINT_CACHE_SIZE = "CamelMaximumEndpointCacheSize";
+    String MULTICAST_INDEX             = "CamelMulticastIndex";
+    String MULTICAST_COMPLETE          = "CamelMulticastComplete";
 
     String NOTIFY_EVENT = "CamelNotifyEvent";
 

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=1087997&r1=1087996&r2=1087997&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 Sat
Apr  2 11:05:46 2011
@@ -135,7 +135,7 @@ public class DefaultCamelContext extends
     private CamelContextNameStrategy nameStrategy = new DefaultCamelContextNameStrategy();
     private String managementName;
     private ClassLoader applicationContextClassLoader;
-    private final Map<EndpointKey, Endpoint> endpoints = new EndpointRegistry();
+    private Map<EndpointKey, Endpoint> endpoints;
     private final AtomicInteger endpointKeyCounter = new AtomicInteger();
     private final List<EndpointStrategy> endpointStrategies = new ArrayList<EndpointStrategy>();
     private final Map<String, Component> components = new HashMap<String, Component>();
@@ -202,6 +202,9 @@ public class DefaultCamelContext extends
     public DefaultCamelContext() {
         super();
 
+        // create endpoint registry at first since end users may access endpoints before
CamelContext is started
+        this.endpoints = new EndpointRegistry(this);
+
         // use WebSphere specific resolver if running on WebSphere
         if (WebSpherePackageScanClassResolver.isWebSphereClassLoader(this.getClass().getClassLoader()))
{
             log.info("Using WebSphere specific PackageScanClassResolver");
@@ -1418,6 +1421,11 @@ public class DefaultCamelContext extends
         EventHelper.notifyCamelContextStarting(this);
 
         forceLazyInitialization();
+
+        // re-create endpoint registry as the cache size limit may be set after the constructor
of this instance was called.
+        // and we needed to create endpoints up-front as it may be accessed before this context
is started
+        endpoints = new EndpointRegistry(this, endpoints);
+        addService(endpoints);
         addService(executorServiceStrategy);
         addService(producerServicePool);
         addService(inflightRepository);

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EndpointRegistry.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EndpointRegistry.java?rev=1087997&r1=1087996&r2=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EndpointRegistry.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/EndpointRegistry.java Sat Apr
 2 11:05:46 2011
@@ -16,20 +16,34 @@
  */
 package org.apache.camel.impl;
 
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
+import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.LRUCache;
 
 /**
- * Endpoint registry which is a based on a {@link org.apache.camel.util.LRUCache}
- * to keep the last 1000 in an internal cache.
+ * Endpoint registry which is a based on a {@link org.apache.camel.util.LRUCache}.
  *
  * @version 
  */
 public class EndpointRegistry extends LRUCache<EndpointKey, Endpoint> {
 
-    public EndpointRegistry() {
-        // use a cache size of 1000
-        super(1000);
+    private final CamelContext context;
+
+    public EndpointRegistry(CamelContext context) {
+        super(CamelContextHelper.getMaximumEndpointCacheSize(context));
+        this.context = context;
     }
 
+    public EndpointRegistry(CamelContext context, Map<EndpointKey, Endpoint> endpoints)
{
+        this(context);
+        putAll(endpoints);
+    }
+
+    @Override
+    public String toString() {
+        return "EndpointRegistry for " + context.getName() + ", capacity: " + getMaxCacheSize();
+    }
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java?rev=1087997&r1=1087996&r2=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
Sat Apr  2 11:05:46 2011
@@ -42,6 +42,7 @@ import org.apache.camel.VetoCamelContext
 import org.apache.camel.builder.ErrorHandlerBuilder;
 import org.apache.camel.component.bean.BeanProcessor;
 import org.apache.camel.impl.DefaultCamelContextNameStrategy;
+import org.apache.camel.impl.EndpointRegistry;
 import org.apache.camel.impl.EventDrivenConsumerRoute;
 import org.apache.camel.impl.ExplicitCamelContextNameStrategy;
 import org.apache.camel.impl.ProducerCache;
@@ -54,6 +55,7 @@ import org.apache.camel.management.mbean
 import org.apache.camel.management.mbean.ManagedConsumer;
 import org.apache.camel.management.mbean.ManagedDelayer;
 import org.apache.camel.management.mbean.ManagedEndpoint;
+import org.apache.camel.management.mbean.ManagedEndpointRegistry;
 import org.apache.camel.management.mbean.ManagedErrorHandler;
 import org.apache.camel.management.mbean.ManagedEventNotifier;
 import org.apache.camel.management.mbean.ManagedPerformanceCounter;
@@ -407,6 +409,8 @@ public class DefaultManagementLifecycleS
             answer = new ManagedThrottlingInflightRoutePolicy(context, (ThrottlingInflightRoutePolicy)
service);
         } else if (service instanceof ProducerCache) {
             answer = new ManagedProducerCache(context, (ProducerCache) service);
+        } else if (service instanceof EndpointRegistry) {
+            answer = new ManagedEndpointRegistry(context, (EndpointRegistry) service);
         } else if (service != null) {
             // fallback as generic service
             answer = new ManagedService(context, service);

Copied: camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
(from r1087710, camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProducerCache.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java?p2=camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java&p1=camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProducerCache.java&r1=1087710&r2=1087997&rev=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProducerCache.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
Sat Apr  2 11:05:46 2011
@@ -17,42 +17,39 @@
 package org.apache.camel.management.mbean;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.impl.ProducerCache;
+import org.apache.camel.impl.EndpointRegistry;
 import org.springframework.jmx.export.annotation.ManagedAttribute;
 import org.springframework.jmx.export.annotation.ManagedResource;
 
 /**
  * @version 
  */
-@ManagedResource(description = "Managed ProducerCache")
-public class ManagedProducerCache extends ManagedService {
-    private final ProducerCache producerCache;
-
-    public ManagedProducerCache(CamelContext context, ProducerCache producerCache) {
-        super(context, producerCache);
-        this.producerCache = producerCache;
+@ManagedResource(description = "Managed EndpointRegistry")
+public class ManagedEndpointRegistry extends ManagedService {
+    private final EndpointRegistry endpointRegistry;
+
+    public ManagedEndpointRegistry(CamelContext context, EndpointRegistry endpointRegistry)
{
+        super(context, endpointRegistry);
+        this.endpointRegistry = endpointRegistry;
     }
 
-    public ProducerCache getProducerCache() {
-        return producerCache;
+    public EndpointRegistry getEndpointRegistry() {
+        return endpointRegistry;
     }
 
     @ManagedAttribute(description = "Source")
     public String getSource() {
-        if (producerCache.getSource() != null) {
-            return producerCache.getSource().toString();
-        }
-        return null;
+        return endpointRegistry.toString();
     }
 
-    @ManagedAttribute(description = "Number of elements cached")
+    @ManagedAttribute(description = "Number of endpoints cached")
     public Integer getSize() {
-        return producerCache.size();
+        return endpointRegistry.size();
     }
 
     @ManagedAttribute(description = "Maximum cache size (capacity)")
     public Integer getMaximumCacheSize() {
-        return producerCache.getCapacity();
+        return endpointRegistry.getMaxCacheSize();
     }
 
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java?rev=1087997&r1=1087996&r2=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java Sat
Apr  2 11:05:46 2011
@@ -169,11 +169,47 @@ public final class CamelContextHelper {
         if (camelContext != null) {
             String s = camelContext.getProperties().get(Exchange.MAXIMUM_CACHE_POOL_SIZE);
             if (s != null) {
-                Integer size = camelContext.getTypeConverter().convertTo(Integer.class, s);
-                if (size == null || size <= 0) {
-                    throw new IllegalArgumentException("Property " + Exchange.MAXIMUM_CACHE_POOL_SIZE
+ " must be a positive number, was: " + s);
+                try {
+                    // we cannot use Camel type converters as they may not be ready this
early
+                    Integer size = Integer.valueOf(s);
+                    if (size == null || size <= 0) {
+                        throw new IllegalArgumentException("Property " + Exchange.MAXIMUM_CACHE_POOL_SIZE
+ " must be a positive number, was: " + s);
+                    }
+                    return size;
+                } catch (NumberFormatException e) {
+                    throw new IllegalArgumentException("Property " + Exchange.MAXIMUM_CACHE_POOL_SIZE
+ " must be a positive number, was: " + s, e);
+                }
+            }
+        }
+
+        // 1000 is the default fallback
+        return 1000;
+    }
+
+    /**
+     * Gets the maximum endpoint cache size.
+     * <p/>
+     * Will use the property set on CamelContext with the key {@link Exchange#MAXIMUM_ENDPOINT_CACHE_SIZE}.
+     * If no property has been set, then it will fallback to return a size of 1000.
+     *
+     * @param camelContext the camel context
+     * @return the maximum cache size
+     * @throws IllegalArgumentException is thrown if the property is illegal
+     */
+    public static int getMaximumEndpointCacheSize(CamelContext camelContext) throws IllegalArgumentException
{
+        if (camelContext != null) {
+            String s = camelContext.getProperties().get(Exchange.MAXIMUM_ENDPOINT_CACHE_SIZE);
+            if (s != null) {
+                // we cannot use Camel type converters as they may not be ready this early
+                try {
+                    Integer size = Integer.valueOf(s);
+                    if (size == null || size <= 0) {
+                        throw new IllegalArgumentException("Property " + Exchange.MAXIMUM_ENDPOINT_CACHE_SIZE
+ " must be a positive number, was: " + s);
+                    }
+                    return size;
+                } catch (NumberFormatException e) {
+                    throw new IllegalArgumentException("Property " + Exchange.MAXIMUM_ENDPOINT_CACHE_SIZE
+ " must be a positive number, was: " + s, e);
                 }
-                return size;
             }
         }
 

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
(from r1087710, camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java&r1=1087710&r2=1087997&rev=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
Sat Apr  2 11:05:46 2011
@@ -20,20 +20,22 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.camel.CamelContext;
 import org.apache.camel.Consumer;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 
 /**
  * @version 
  */
-public class DefaultCamelContextEndpointCacheTest extends ContextTestSupport {
+public class DefaultCamelContextEndpointCacheLimitTest extends ContextTestSupport {
 
     public void testCacheEndpoints() throws Exception {
-        // test that we cache at most 1000 endpoints in camel context to avoid it eating
to much memory
-        for (int i = 0; i < 1003; i++) {
+        // test that we cache at most 75 endpoints in camel context to avoid it eating to
much memory
+        for (int i = 0; i < 78; i++) {
             String uri = "myendpoint?id=" + i;
             Endpoint e = new DefaultEndpoint(uri, context) {
                 public Producer createProducer() throws Exception {
@@ -51,10 +53,16 @@ public class DefaultCamelContextEndpoint
         }
 
         Collection<Endpoint> col = context.getEndpoints();
-        assertEquals("Size should be 1000", 1000, col.size());
+        assertEquals("Size should be 75", 75, col.size());
         List<Endpoint> list = new ArrayList<Endpoint>(col);
         assertEquals("myendpoint?id=3", list.get(0).getEndpointUri());
-        assertEquals("myendpoint?id=1002", list.get(999).getEndpointUri());
+        assertEquals("myendpoint?id=77", list.get(74).getEndpointUri());
     }
 
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        CamelContext context = super.createCamelContext();
+        context.getProperties().put(Exchange.MAXIMUM_ENDPOINT_CACHE_SIZE, "75");
+        return context;
+    }
 }

Modified: 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=1087997&r1=1087996&r2=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
Sat Apr  2 11:05:46 2011
@@ -50,8 +50,8 @@ public class MultipleLifecycleStrategyTe
 
         context.stop();
 
-        assertEquals(10, dummy1.getEvents().size());
-        assertEquals(10, dummy2.getEvents().size());
+        assertEquals(11, dummy1.getEvents().size());
+        assertEquals(11, dummy2.getEvents().size());
 
         assertEquals("onContextStart", dummy1.getEvents().get(0));
         assertEquals("onContextStart", dummy2.getEvents().get(0));
@@ -65,14 +65,16 @@ public class MultipleLifecycleStrategyTe
         assertEquals("onServiceAdd", dummy2.getEvents().get(4));
         assertEquals("onServiceAdd", dummy1.getEvents().get(5));
         assertEquals("onServiceAdd", dummy2.getEvents().get(5));
-        assertEquals("onComponentAdd", dummy1.getEvents().get(6));
-        assertEquals("onComponentAdd", dummy2.getEvents().get(6));
-        assertEquals("onEndpointAdd", dummy1.getEvents().get(7));
-        assertEquals("onEndpointAdd", dummy2.getEvents().get(7));
-        assertEquals("onComponentRemove", dummy1.getEvents().get(8));
-        assertEquals("onComponentRemove", dummy2.getEvents().get(8));
-        assertEquals("onContextStop", dummy1.getEvents().get(9));
-        assertEquals("onContextStop", dummy2.getEvents().get(9));
+        assertEquals("onServiceAdd", dummy1.getEvents().get(6));
+        assertEquals("onServiceAdd", dummy2.getEvents().get(6));
+        assertEquals("onComponentAdd", dummy1.getEvents().get(7));
+        assertEquals("onComponentAdd", dummy2.getEvents().get(7));
+        assertEquals("onEndpointAdd", dummy1.getEvents().get(8));
+        assertEquals("onEndpointAdd", dummy2.getEvents().get(8));
+        assertEquals("onComponentRemove", dummy1.getEvents().get(9));
+        assertEquals("onComponentRemove", dummy2.getEvents().get(9));
+        assertEquals("onContextStop", dummy1.getEvents().get(10));
+        assertEquals("onContextStop", dummy2.getEvents().get(10));
     }
 
 }

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedEndpointRegistryTest.java
(from r1087710, camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedEndpointRegistryTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedEndpointRegistryTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java&r1=1087710&r2=1087997&rev=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedEndpointRegistryTest.java
Sat Apr  2 11:05:46 2011
@@ -27,9 +27,9 @@ import org.apache.camel.builder.RouteBui
 /**
  * @version 
  */
-public class ManagedProducerCacheTest extends ManagementTestSupport {
+public class ManagedEndpointRegistryTest extends ManagementTestSupport {
 
-    public void testManageProducerCache() throws Exception {
+    public void testManageEndpointRegistry() throws Exception {
         getMockEndpoint("mock:result").expectedMessageCount(1);
 
         template.sendBody("direct:start", "Hello World");
@@ -39,26 +39,27 @@ public class ManagedProducerCacheTest ex
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
         Set<ObjectName> set = mbeanServer.queryNames(new ObjectName("*:type=services,*"),
null);
-        assertEquals(6, set.size());
+        assertEquals(7, set.size());
         List<ObjectName> list = new ArrayList<ObjectName>(set);
         ObjectName on = null;
         for (ObjectName name : list) {
-            if (name.getCanonicalName().contains("ProducerCache")) {
+            if (name.getCanonicalName().contains("EndpointRegistry")) {
                 on = name;
                 break;
             }
         }
 
-        assertNotNull("Should have found ProducerCache", on);
+        assertNotNull("Should have found EndpointRegistry", on);
 
         Integer max = (Integer) mbeanServer.getAttribute(on, "MaximumCacheSize");
         assertEquals(1000, max.intValue());
 
         Integer current = (Integer) mbeanServer.getAttribute(on, "Size");
-        assertEquals(1, current.intValue());
+        assertEquals(2, current.intValue());
 
         String source = (String) mbeanServer.getAttribute(on, "Source");
-        assertEquals("sendTo(Endpoint[mock://result])", source);
+        assertTrue(source.startsWith("EndpointRegistry"));
+        assertTrue(source.endsWith("capacity: 1000"));
     }
 
     @Override

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java?rev=1087997&r1=1087996&r2=1087997&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedProducerCacheTest.java
Sat Apr  2 11:05:46 2011
@@ -39,7 +39,7 @@ public class ManagedProducerCacheTest ex
         // get the stats for the route
         MBeanServer mbeanServer = getMBeanServer();
         Set<ObjectName> set = mbeanServer.queryNames(new ObjectName("*:type=services,*"),
null);
-        assertEquals(6, set.size());
+        assertEquals(7, set.size());
         List<ObjectName> list = new ArrayList<ObjectName>(set);
         ObjectName on = null;
         for (ObjectName name : list) {



Mime
View raw message