Hello Claus, Does it mean that I can export custom ExecutorService as OSGi service and then reuse it across all the camel applications I have? Is that way safe enough to avoid different classloading issues in OSGi environment?
Regards, Sergey -----Original Message----- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Tuesday, November 22, 2011 8:13 PM To: users@camel.apache.org Subject: Re: Too many OnCompletion threads Hi The <onCompletion> supports specifying a executorServiceRef where you can refer to a shared thread pool, which other <onCompletion> can use as well. Then you can re-use threads from the same thread pool. See details here as well http://camel.apache.org/threading-model.html On Tue, Nov 22, 2011 at 12:28 PM, Zhemzhitsky Sergey <sergey_zhemzhit...@troika.ru> wrote: > Hi Claus, > > You are right, I suppose that all those threads are connected with > <onCompletion>. > > Here is how my route looks > > <route id="route"> > <from uri="direct:start" /> > > <setProperty propertyName="originalBody"> > <simple>${body}</simple> > </setProperty> > <to uri="log:foo.bar.{{source}}?level=INFO" /> > > <convertBodyTo type="{{source.type}}" /> > <to uri="log:foo.bar.{{source}}?level=INFO" /> > > <to uri="velocity://templates/{{source}}.vm?contentCache=true" /> > <log message="${body}" loggingLevel="INFO" > logName="foo.bar.{{source}}" /> > > <to uri="jdbc:datasource" /> > > <onCompletion onCompleteOnly="true"> > <log message="Message ${body} processed" loggingLevel="INFO" > logName="foo.bar.{{source}}" /> > </onCompletion> > </route> > > > Regards, > Sergey > > -----Original Message----- > From: Claus Ibsen [mailto:claus.ib...@gmail.com] > Sent: Tuesday, November 22, 2011 12:25 PM > To: users@camel.apache.org > Subject: Re: Too many OnCompletion threads > > Hi > > Can you post an example of a route which has the OnCompletion? > Just to be sure what you talk about, eg are you using <onCompletion> or > something else? > > > 2011/11/22 Zhemzhitsky Sergey <sergey_zhemzhit...@troika.ru>: >> Hi there, >> >> I’m using camel 2.6.0 within servicemix and have about 50 camel applications >> deployed.. >> Now I have about 260 “OnCompletion” threads which seems to be a lot, >> especially because the number of camel applications is going to be increased >> significantly on my environment. >> >> Is there any way to decrease the number of “OnCompletion” threads? >> >> >> Best Regards, >> Sergey >> >> _______________________________________________________ >> >> The information contained in this message may be privileged and conf >> idential and protected from disclosure. If you are not the original intended >> recipient, you are hereby notified that any review, retransmission, >> dissemination, or other use of, or taking of any action in reliance upon, >> this information is prohibited. If you have received this communication in >> error, please notify the sender immediately by replying to this message and >> delete it from your computer. Thank you for your cooperation. Troika Dialog, >> Russia. >> If you need assistance please contact our Contact Center (+7495) 258 >> 0500 or go to www.troika.ru/eng/Contacts/system.wbp >> >> > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cib...@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus, fusenews > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/