Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 79373 invoked from network); 29 Aug 2007 13:29:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Aug 2007 13:29:47 -0000 Received: (qmail 55892 invoked by uid 500); 29 Aug 2007 13:29:42 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 55839 invoked by uid 500); 29 Aug 2007 13:29:42 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 55830 invoked by uid 99); 29 Aug 2007 13:29:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2007 06:29:42 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2007 13:29:37 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IQNbg-0001m3-UL for camel-user@activemq.apache.org; Wed, 29 Aug 2007 06:29:16 -0700 Message-ID: <12387136.post@talk.nabble.com> Date: Wed, 29 Aug 2007 06:29:16 -0700 (PDT) From: DominicTulley To: camel-user@activemq.apache.org Subject: Re: Possible memory leak when using Camel in ActiveMQ In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: dominic.tulley@telelogic.com References: <12384346.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org The route I am currently using is: from("activemq:AnnotateQueue").setHeader("HasHandler", hasHandlerExpression).to("activemq:TOOL.DEFAULT");; where hasHandlerExpression is a class I have implemented. It contains the following method: public Object evaluate(Exchange exch) { Message msg = exch.getIn(); String key = (String)msg.getHeader("DocGuid"); // Odd numbered docs have a handler String handlerStr = RoutingTable.getDestination(key); boolean hasHandler = (null != handlerStr) && handlerStr.equals("true"); msg.setHeader("HasHandler", hasHandler); return "" + hasHandler; Finally RoutingTable.getDestination is simply a static method doing a hashmap.get. Hope this helps. -Dominic What route were you using? That will us focus and the possible leaks better. -- View this message in context: http://www.nabble.com/Possible-memory-leak-when-using-Camel-in-ActiveMQ-tf4346921s22882.html#a12387136 Sent from the Camel - Users mailing list archive at Nabble.com.