Since JMX objects are piling up in your case, if you don't need JMX management of Camel concepts individually (like, you just start and stop Camel as a whole) you could just disable JMX altogether:
-Dorg.apache.camel.jmx.disabled=true or <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <jmxAgent id="agent" disabled="true"/> ... </camelContext> On Tue, May 11, 2010 at 12:31 PM, dougly <[email protected]> wrote: > > Hi, > I have a route which uses the SEDA endpoint. After a week or two the JVM > would crash due to out of memory. When I use youkit to profile the JVM I > see > a bunch of mbeanserver.NamedObject created overtime related to the seda > queue. Those mbeanserver.NamedObject are stored in a HashMap. > > Does anybody have experience with this issue? > Thanks > > Here is the route: > > onException(Exception.class).process(new Processor() { > @Override > public void process(Exchange ex) throws Exception > { > System.out.println("Exception: " + ex.getIn().getBody()); > } > }); > > from("quartz://mail/mailReminder?cron=0/30+*+*+*+*+?").process(new > Processor() > { > @Override > public void process(Exchange ex) throws Exception > { > System.out.println("Polling Exchange Server WS"); > List<ItemType> items = poller.getMailItems(); > ProducerTemplate prod = > getContext().createProducerTemplate(); > for (ItemType item : items) > { > prod.sendBody("seda:mail", item); > } > } > }); > > from("seda:mail") > // on completion, delete that email from exchange server > .onCompletion().onCompleteOnly() > .process(new Processor() > { > @Override > public void process(Exchange exchange) throws Exception > { > ItemIdType itemId = > emailProcessor.deleteMessage(exchange); > poller.deleteItem(itemId); > } > }) > .end() > // this is the original route > .process( > new Processor() > { > @Override > public void process(Exchange exchange) throws Exception > { > emailProcessor.process(exchange); > } > } > ).to("test-activemq:queue:" + queueName); > -- > View this message in context: > http://old.nabble.com/Out-of-Memory-Crash-with-Seda-%28Camel-2.1.0%29-tp28525274p28525274.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Cheers, Jon Camel in Action: http://manning.com/ibsen Blog: http://janstey.blogspot.com
