Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-16 Thread Claus Ibsen
Hi Thanks for the advise. In the mean time we have improved the original issue with having prototype scoped @Producer being added as services to close. This is now fixed on trunk as Camel now detects the scope of the bean and only for singletons will add it as a service to close. For prototypes

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-15 Thread Claus Ibsen
On Wed, Apr 14, 2010 at 3:22 AM, matthewm mmo...@gmail.com wrote: Thank you Claus and Willem. The plot thickened a bit this morning. Hoping that disabling JMX would disable the leak, I turned it off (by adding an agent definition to my application context).  This slowed but did not

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-15 Thread Claus Ibsen
Hi Have created a ticket about this issue https://issues.apache.org/activemq/browse/CAMEL-2650 On Thu, Apr 15, 2010 at 11:36 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Apr 14, 2010 at 3:22 AM, matthewm mmo...@gmail.com wrote: Thank you Claus and Willem. The plot thickened a bit

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-15 Thread matthewm
This is a catch-22 situation. When using @Producer or @Consume etc. you are creating a Producer/Consumer up front. However you also want to stop the @Producer / @Consumer again when you are shutting down, or more ideally before if the POJO was no longer in use. However there is no nice

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-13 Thread Claus Ibsen
On Tue, Apr 13, 2010 at 1:22 AM, matthewm mmo...@gmail.com wrote: Hello, We are using Camel 2.2.0 with Spring 3.0.1.RELEASE in the context of a web service. We've been using @EndpointInject to inject ProducerTemplates into our beans. Some of our beans are request scoped, and so a new

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-13 Thread matthewm
Thank you Claus and Willem. The plot thickened a bit this morning. Hoping that disabling JMX would disable the leak, I turned it off (by adding an agent definition to my application context). This slowed but did not eliminate the leak. Further digging showed that, even with management

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-13 Thread Willem Jiang
Hi Matt, Please see my comment in the mail. matthewm wrote: Thank you Claus and Willem. The plot thickened a bit this morning. Hoping that disabling JMX would disable the leak, I turned it off (by adding an agent definition to my application context). This slowed but did not eliminate the

Re: Injecting ProducerTemplates, scoping, and JMX memleak

2010-04-12 Thread Willem Jiang
Hi, ProducerTemplates has a cache which holds the reference of the endpoints those he send to. It's a good idea to inject a new ProducerTemplate per request. We need to update the document for it. The JMX issue should be fixed also, please feel free to log a JIRA[1] for it.