The PollingComponentSupport uses it to launch the polling threads. However, usually, all lightweight components implements the MessageExchangeListener, which means that they delegate the threading to the flow (seda, jms, etc ..). If you don't implement this interface, you will be able to completely control the threads in use by your components, but at the same time, you will have to poll the delivery channel for incoming jbi exchanges. If you are looking for complete controlling of the threading, you should go this way.
On 1/22/07, Brinkman, Rob <[EMAIL PROTECTED]> wrote:
Are any (lw components) in the source of servicemix that explicitly use the thread pool ? That way I can use them as a base and I don't have to bother you (for this moment ;)) Thank you again, it's appreciated, Rob -----Original Message----- From: Guillaume Nodet [mailto:[EMAIL PROTECTED] Sent: maandag 22 januari 2007 22:22 To: [email protected] Subject: Re: Using ExecutorFactory on persistent flows On 1/22/07, RBrinkman <[EMAIL PROTECTED]> wrote: > > Hi Guillaume, thank you very much for the quick response, we appreciate it. > > Below my servicemix.xml, its a lw component (sandbox-trace) that we want to > configure: > > Is it possible to give a certain lw component an own executorFactory > configuration or is its configuration for all lw components. What would be > the way to adress this component ? key="component.sandbox-trace" ? Yes, that's true if the component inherits the PollingComponentSupport. But the component has to explicitely use the thread pool. Another way would be to put a synchronized block in the lightweight component. As only one instance is used to process all incoming exchanges, it will effectively serialize the processing, though they won't be actually processed within a single thread. > > All answers, hints or tips are very welcome. > > Thank you again for your support, > > Rob > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns:sm="http://servicemix.apache.org/config/1.0" > xmlns:eip="http://servicemix.apache.org/eip/1.0" > xmlns:tryout="http://tntpost.com/ddb/tryout/1.0" > xmlns:jms="http://servicemix.apache.org/jms/1.0" > xmlns:srq="http://tntpost.com/ddb/srq/1.0" > xmlns:amq="http://activemq.org/config/1.0"> > > <classpath inverse="true"> > <location>.</location> > </classpath> > > <sm:serviceunit id="jbi"> > <sm:activationSpecs> > > <sm:activationSpec componentName="sandbox-trace" > service="tryout:sandbox-trace"> > <sm:component> > <bean > > class="org.apache.servicemix.components.util.TraceComponent" /> > </sm:component> > </sm:activationSpec> > <!-- Read incoming files --> > <sm:activationSpec > componentName="sandbox-worker" > service="tryout:sandbox-worker" > destinationService="tryout:sandbox-trace"> > <sm:component> > <bean > class="com.tntpost.ddb.tryout.WorkerTestImpl"> > <property name="delay" > value="0" /> > <property name="messages" > value="50" /> > <property name="period" > value="60000" /> > </bean> > </sm:component> > </sm:activationSpec> > > </sm:activationSpecs> > </sm:serviceunit> > </beans> > > > > gnodet wrote: > > > > Currently, thread pools are configured for a given component, > > but not for a given endpoint ... > > What is the component / endpoint you are trying to configure ? > > > > > > On 1/22/07, RBrinkman <[EMAIL PROTECTED]> wrote: > >> > >> I've an urgent issue: > >> > >> When using seda flows i configured an executor whit just one thread in > >> the > >> servicemix.xml: > >> <entry key="flow.seda.sandbox-trace"> > >> <bean > >> class="org.apache.servicemix.executors.impl.ExecutorConfig"> > >> <property name="corePoolSize" value="1"/> > >> <property name="maximumPoolSize" value="1"/> > >> <property name="queueSize" value="1024"/> > >> </bean> > >> </entry> > >> This works great and every 'request' is handled by the same thread. > >> > >> Since i switched to jms/jca flows by setting persistent="true" on the > >> sm:container this does not work any more. > >> I tried the following as key name: > >> flow.jca.org.apache.servicemix.jca.{http://tntpost.com/ddb/tryout/1.0}sa ndbox-trace:sandbox-trace > >> > >> When i use flow.jms as key it does work but thats just to much, i'd like > >> only the sandbox-trace component to have one thread. > >> > >> Could someone please help my out because this configuration option would > >> be > >> very valuable for us. > >> > >> Thank you in advance, > >> > >> Rob > >> > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Using-ExecutorFactory-on-persistent-flows-tf305871 6s12049.html#a8504569 > >> Sent from the ServiceMix - User mailing list archive at Nabble.com. > >> > >> > > > > > > -- > > Cheers, > > Guillaume Nodet > > ------------------------ > > Architect, LogicBlaze (http://www.logicblaze.com/) > > Blog: http://gnodet.blogspot.com/ > > > > > > -- > View this message in context: http://www.nabble.com/Using-ExecutorFactory-on-persistent-flows-tf305871 6s12049.html#a8509819 > Sent from the ServiceMix - User mailing list archive at Nabble.com. > > -- Cheers, Guillaume Nodet ------------------------ Architect, LogicBlaze (http://www.logicblaze.com/) Blog: http://gnodet.blogspot.com/ This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
-- Cheers, Guillaume Nodet ------------------------ Architect, LogicBlaze (http://www.logicblaze.com/) Blog: http://gnodet.blogspot.com/
