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.

Reply via email to