Thanks for the fast reply.  I'll check it out.  Love the direction this
project is taking.  I'm a huge camel fan.

John


J_Racker wrote:
> 
> Hi,
> 
> I'm seeing an issue when using an dynamic route specified via a recipient
> list.  I'm running Camel 2.1.0 and my route looks like the following:
> 
> from(outQueue).to("bean:messageValidator").setHeader("CamelFileName",
> getFileNameXpath()).recipientList(getResponseEndpoint());
> 
> where getResponseEndpoint() looks something like this:
> 
> private Expression getResponseEndpoint() {
>         Expression rootDirectoryEndpoint =
> ExpressionBuilder.simpleExpression(getRootDirectoryEndpoint());
>         Expression tempFileOption =
> ExpressionBuilder.simpleExpression("?tempFileName=");
>         Expression tempFileName =
> FileLanguage.file("${file:onlyname.noext}.tmp");
> 
>         Expression fileOptions = ExpressionBuilder.append(tempFileOption,
> tempFileName);
> 
>         Expression fileEndpoint =
> ExpressionBuilder.append(rootDirectoryEndpoint, new
> XPathBuilder(MGMT_GROUP_XPATH));
> 
>         return ExpressionBuilder.append(fileEndpoint, fileOptions);
>     }
> 
> I'm trying to route the message to a file in a directory based on the
> evaluation of an xpath expression on the message itself.  This all works
> great.  The problem I'm seeing is with the MBean Server.
> 
> When I profile my activeMQ broker that is running with YourKit, I see a
> giant hashmap start to grow with every message I send through this route
> with with at least one entry for each file.  The entries look like this:
> 
> key  java.lang.String
> "context=myServer/camel,name="file:///myFile",type=endpoints"
> value  com.sun.jmx.mbeanserver.NamedObject
> 
> Am I using the RecipientList incorrectly?  Is there some setting I can set
> to throw these references away once the route is complete?   Any help is
> appreciated.
> 
> John Madrid
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Potential-Memory-Leak-with-Dynamic-Routes-Specified-via-RecipientList-tp27690762p27692441.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to