Author: davsclaus
Date: Sat Feb 20 11:59:57 2010
New Revision: 912105
URL: http://svn.apache.org/viewvc?rev=912105&view=rev
Log:
CAMEL-2484: RecipientList now acquires and releases producers from
ProducerCache. Also fixed memory issue when using Mina or FTP producers with
recipientList. Fixed LRUCache to stop its cached services when its stopped to
better release resources when Camel is stopped.
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java?rev=912105&r1=912104&r2=912105&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
Sat Feb 20 11:59:57 2010
@@ -25,22 +25,6 @@
*/
public class DefaultProducerCacheTest extends ContextTestSupport {
- public void testCacheProducers() throws Exception {
- ProducerCache cache = new ProducerCache(context);
- cache.start();
-
- assertEquals("Size should be 0", 0, cache.size());
-
- // test that we cache at most 1000 producers to avoid it eating to
much memory
- for (int i = 0; i < 1003; i++) {
- Endpoint e = context.getEndpoint("direct:queue:" + i);
- Producer p = cache.getProducer(e);
- }
-
- assertEquals("Size should be 1000", 1000, cache.size());
- cache.stop();
- }
-
public void testCacheProducerAcquireAndRelease() throws Exception {
ProducerCache cache = new ProducerCache(context);
cache.start();