Hi Gnodet,

Thanks for your valuable inputs. The inputs are very much helpful to my
project.

I have added the thread configuration in the WEB-INF/servicemix.xml.

Is there any way we can verify that the configuration is loaded or not?

Secondly, I have found one more thread pool configuration for service-http
component, i.e. JettyThreadPoolSize. This configuration is configured in
org.apache.servicemix.http.HttpConfiguration.java class of servicemix-http
component.
How this thread pooling is different from coreThreadPool size of servicemix.


Thanks,
Puneet




gnodet wrote:
> 
> On Tue, Mar 25, 2008 at 7:14 PM, puneetjain <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> Hi Gnodet,
>>
>> Sorry to bother you.
>>
>> Actually I was not concerned with the thread pool size this time but the
>> instance pool size.
>> We are in the process of evaluating the ESB product(servicemix and mule).
>> Mule provide flexibility to configure the Threading Profiling as well as
>> Pooling Profile(the instance pool size).  So I just want to confirm
>> whether
>> we can configure Thread pool size as well as Instance pool size in
>> servicemix while running with JBoss. You have already guided me regarding
>> configuration for thread pool size. This time I was just asking regarding
>> Instance pool size.
> 
> 
> I guess this would only apply to servicemix-bean, servicemix-jsr181 and
> servicemix-cxf-se; they are the main components where you deploy services
> as
> a java class.   The jsr181 and cxf-se both use the servlet threading
> model:
> a single instance will be used to server all the requests concurrently. 
> In
> such a case, there is no need to pool instances because they are assumed
> to
> be thread safe.   If this is not the case, you could easily wrap your
> POJOs
> in a pool using spring (see
> http://static.springframework.org/spring/docs/2.5.x/reference/aop-api.html#aop-ts-poolfor
> example).   For servicemix-bean, there are two modes: either use a
> single instance or create one for each request, depending on if you set
> the
> classname or the pojo.
> For all other components, you do not have to care about that because it is
> an internal detail and all those components are thread safe and can
> process
> multiple requests concurrently (the concurrency level  being configured
> with
> the thread pools).
> 
> 
>>
>>
>> The duplicate messages were sent because of the mail I received from
>> Nabble
>> with the subject "Post to mailing list still Pending".
> 
> 
> Well, I guess you need to be a bit more patient then  ;-)
> 
> 
>>
>>
>> Your inputs are really valuable to me and I really appreciate your
>> support.
>>
>> Thanks,
>> Puneet
>>
>>
>>
>> gnodet wrote:
>> >
>> > Please stop flooding the mailing list, there's no real need to send
>> > multiple
>> > messages to ask the same question again.  And it sounds like your
>> question
>> > is the same you asked 7 hours ago which I have already answered twice.
>>  I
>> > can't really help you unless you try what I say and come back asking
>> for
>> > more specific informations or reporting a problem....  If my answers
>> are
>> > not
>> > clear, please tell me what you don't understand, but asking the same
>> > question again will lead to the same answer again.
>> >
>> > Question 2:
>> > =======
>> >                 How can I configure the thread pool size?
>> >
>> > If you use the JBoss deployer, there is no real way to do that.  You
>> would
>> > have to modify the code of the JBoss deployer to create an
>> ExecutorFactory
>> > and configure it the way you want.
>> >
>> > If you deploy ServiceMix using the standard web app distribution, you
>> can
>> > modify the servicemix.xml configuration file that creates the JBI
>> > container
>> > and add the needed definitions for the thread pools so that they can be
>> > configured:
>> >
>> >   <sm:container ... >
>> >     ...
>> >     <sm:executorFactory>
>> >       <bean class="org.apache.servicemix.executors
>> > .impl.ExecutorFactoryImpl">
>> >         <property name="defaultConfig">
>> >             <bean
>> > class="org.apache.servicemix.executors.impl.ExecutorConfig
>> > ">
>> >               <property name="corePoolSize"
>> > value="${servicemix.corePoolSize
>> > }"/>
>> >               <property name="maximumPoolSize" value="${
>> > servicemix.maximumPoolSize}"/>
>> >               <property name="queueSize" value="${servicemix.queueSize
>> }"/>
>> >             </bean>
>> >         </property>
>> >       </bean>
>> >     </sm:executorFactory>
>> >   </sm:container>
>> >
>> >
>> > Or maybe that one:
>> >
>> > Regarding Question2:
>> > ===============
>> > Firstly, what are the steps to create and configure ExecutorFactory for
>> > jboss deployer.
>> >
>> > In the java code of the JBoss deployer, try to modify the
>> > JBIService#startService() method.
>> >
>> >   ExecutorFactoryImpl executorFactory = new ExecutorFactoryImp();
>> >   ExecutorConfig config = new ExecutorConfig();
>> >   config.setCorePoolSize(32);
>> >    ...
>> >   executorFactory.setDefaultConfig(config);
>> >   jbiContainer.setExecutorFactory(executorFactory);
>> >
>> >
>> > On Tue, Mar 25, 2008 at 3:25 PM, puneetjain <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> >>
>> >> Hi Gnodet,
>> >>
>> >> I am highly appreciate your inputs.
>> >>
>> >> I am implementing the executor factory to configure JBI Container
>> thread
>> >> pool size.
>> >>
>> >> Can we configure the instance pool for the servicemix components
>> running
>> >> in
>> >> JBoss Application Server? If yes How can we congiure it and what is
>> the
>> >> default instance pool size of servicemix components running with Jboss
>> >> Application Server using jboss deployer?
>> >>
>> >> Thanks,
>> >> Puneet
>> >>
>> >>
>> >>
>> >>
>> >> gnodet wrote:
>> >> >
>> >> > This won't work.  The executor factory can not be configured that
>> way.
>> >>  It
>> >> > has to be configured on the JBI container.
>> >> >
>> >> > On Tue, Mar 25, 2008 at 11:54 AM, puneetjain
>> <[EMAIL PROTECTED]>
>> >> > wrote:
>> >> >
>> >> >>
>> >> >> Hi Gnodet,
>> >> >>
>> >> >> Thanks for your valuable input.
>> >> >>
>> >> >> I am still a bit confused with the thread pooling in servicemix.
>> >> >> Could you please explain that what is difference between servicemix
>> >> >> thread
>> >> >> pool size and servicemix component thread pool size? The example of
>> >> >> servicemix component thread pool size is the JettyThreadPoolSize of
>> >> >> servicemix-http component.
>> >> >>
>> >> >> How both of them are function togather in case of servicemix
>> running
>> >> with
>> >> >> Jboss using jboss deployer?
>> >> >>
>> >> >> Secondly, I have configured the ExecutorFactoryImpl in my
>> >> xbean.xmlfiles
>> >> >> of
>> >> >> servicemix-http and servicemix-bean components. The xbean.xml file
>> for
>> >> >> servicemix-http is given below:
>> >> >>
>> >> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> >> <!--
>> >> >>        This is the configuration file for servicemix-http binding
>> >> >> component.
>> >> >>        @author Puneet Jain
>> >> >> -->
>> >> >>
>> >> >> <beans xmlns:http="http://servicemix.apache.org/http/1.0";
>> >> >>       xmlns:ex="http://www.servicemix.org/example";>
>> >> >>
>> >> >>  <http:consumer service="ex:httplistener"
>> >> >>                 endpoint="listenerEndpoint"
>> >> >>                 locationURI="http://0.0.0.0:8192/upload/";
>> >> >>                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
>> >> >>                 targetService="ex:lineReverse"
>> >> >>                 marshaler="#marshaler" />
>> >> >>
>> >> >>  <bean id="marshaler"
>> >> class="com.oki.us.esb.sm.perftester.HTTPMarshaler
>> >> "
>> >> >> />
>> >> >>
>> >> >>  <bean id="executorFactory"
>> >> >> class="org.apache.servicemix.executors.impl.ExecutorFactoryImpl">
>> >> >>     <property name="defaultConfig">
>> >> >>         <bean
>> >> >> class="org.apache.servicemix.executors.impl.ExecutorConfig">
>> >> >>            <property name="corePoolSize" value="32"/>
>> >> >>           <property name="maximumPoolSize" value="40"/>
>> >> >>           <property name="queueSize" value="500"/>
>> >> >>         </bean>
>> >> >>     </property>
>> >> >>   </bean>
>> >> >>
>> >> >> </beans>
>> >> >>
>> >> >> Will this override the default thread pool size for the servicemix
>> >> >> components in case of servicemix running with Jboss Application
>> >> Server.
>> >> >> (Integrated using jboss deployer).
>> >> >>
>> >> >> Thanks,
>> >> >> Puneet
>> >> >>
>> >> >>
>> >> >> gnodet wrote:
>> >> >> >
>> >> >> > On Tue, Mar 25, 2008 at 10:23 AM, puneetjain
>> >> <[EMAIL PROTECTED]>
>> >> >> > wrote:
>> >> >> >
>> >> >> >>
>> >> >> >> Hi Gnodet,
>> >> >> >>
>> >> >> >> Thanks for your quick reply.
>> >> >> >>
>> >> >> >> Regarding Question1:
>> >> >> >> ===============
>> >> >> >> It means that servicemix uses same thread pool size running on
>> >> JBoss
>> >> >> as
>> >> >> >> well
>> >> >> >> standalone.
>> >> >> >
>> >> >> >
>> >> >> > Not really.  The standalone version override the default settings
>> >> with
>> >> >> the
>> >> >> > following ones:
>> >> >> >
>> >> >> > corePoolSize = 4
>> >> >> > maximumPoolSize = 32
>> >> >> > queueSize = 256
>> >> >> >
>> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >> Regarding Question2:
>> >> >> >> ===============
>> >> >> >> Firstly, what are the steps to create and configure
>> ExecutorFactory
>> >> >> for
>> >> >> >> jboss deployer.
>> >> >> >
>> >> >> >
>> >> >> > In the java code of the JBoss deployer, try to modify the
>> >> >> > JBIService#startService() method.
>> >> >> >
>> >> >> >   ExecutorFactoryImpl executorFactory = new ExecutorFactoryImp();
>> >> >> >   ExecutorConfig config = new ExecutorConfig();
>> >> >> >   config.setCorePoolSize(32);
>> >> >> >    ...
>> >> >> >   executorFactory.setDefaultConfig(config);
>> >> >> >   jbiContainer.setExecutorFactory(executorFactory);
>> >> >> >
>> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >> Secondly, I have tried to deploy my servicemix service assembly
>> >> using
>> >> >> the
>> >> >> >> standard web app distribution too, but there was one issue while
>> >> >> running
>> >> >> >> the
>> >> >> >> application. The response of http consumer is not coming back on
>> >> the
>> >> >> >> browser. The link for details is given below. I have replication
>> >> the
>> >> >> same
>> >> >> >> problem on Tomcat 6, JBoss 4.2.2.GA and Geronimo(with tomcat)
>> >> 2.0.2.
>> >> >> >> The issue is already mailed to forum but still unresolved.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >>
>> http://www.nabble.com/Re%3A-Issue-Bug-with-Servicemix-web-3.2.1-%28WAR%29-tt15560488s12049.html
>> >> >> >>
>> >> >> >
>> >> >> > I'll have a look at it.
>> >> >> >
>> >> >> >
>> >> >> >>
>> >> >> >> Regarding Question3:
>> >> >> >> ===============
>> >> >> >> If we change the JettyThreadPoolSize of servicemix-http
>> component
>> >> >> using
>> >> >> >> JMX
>> >> >> >> console, will that improve the performance of the application in
>> >> case
>> >> >> of
>> >> >> >> JBoss deployer or not?
>> >> >> >
>> >> >> >
>> >> >> > Yes, there will be an impact.  The jetty thread pool size
>> controls
>> >> how
>> >> >> > many
>> >> >> > threads will be used by the embedded jetty server to service
>> >> incoming
>> >> >> > requests.  You may want to try changing the configuration and see
>> if
>> >> it
>> >> >> > improves the performances.
>> >> >> >
>> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >> Please give me some pointer to resolve these issues.
>> >> >> >>
>> >> >> >> Thanks,
>> >> >> >> Puneet
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> gnodet wrote:
>> >> >> >> >
>> >> >> >> > On Tue, Mar 25, 2008 at 8:22 AM, puneetjain <
>> >> [EMAIL PROTECTED]>
>> >> >> >> > wrote:
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Hi,
>> >> >> >> >>
>> >> >> >> >> We have a servicemix application integrated with JBoss
>> server.
>> >> >> >> >> The application is based on servicemix-http consumer and
>> >> >> >> servicemix-bean
>> >> >> >> >> components.
>> >> >> >> >> I have certain doubts regarding thread pool size:
>> >> >> >> >>
>> >> >> >> >> Question 1:
>> >> >> >> >> =======
>> >> >> >> >>                  Could anyone please let me know, what is the
>> >> >> default
>> >> >> >> >> thread pool size of the servicemix running with JBoss
>> >> Application
>> >> >> >> Server?
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > corePoolSize = 4
>> >> >> >> > maximumPoolSize = -1
>> >> >> >> > queueSize = 1024
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> Question 2:
>> >> >> >> >> =======
>> >> >> >> >>                 How can I configure the thread pool size?
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> > If you use the JBoss deployer, there is no real way to do
>> that.
>> >>  You
>> >> >> >> would
>> >> >> >> > have to modify the code of the JBoss deployer to create an
>> >> >> >> ExecutorFactory
>> >> >> >> > and configure it the way you want.
>> >> >> >> >
>> >> >> >> > If you deploy ServiceMix using the standard web app
>> distribution,
>> >> >> you
>> >> >> >> can
>> >> >> >> > modify the servicemix.xml configuration file that creates the
>> JBI
>> >> >> >> > container
>> >> >> >> > and add the needed definitions for the thread pools so that
>> they
>> >> can
>> >> >> be
>> >> >> >> > configured:
>> >> >> >> >
>> >> >> >> >   <sm:container ... >
>> >> >> >> >     ...
>> >> >> >> >     <sm:executorFactory>
>> >> >> >> >       <bean
>> >> >> >> >
>> class="org.apache.servicemix.executors.impl.ExecutorFactoryImpl
>> >> >> >> > ">
>> >> >> >> >         <property name="defaultConfig">
>> >> >> >> >             <bean
>> >> >> >> > class="org.apache.servicemix.executors.impl.ExecutorConfig
>> >> >> >> > ">
>> >> >> >> >               <property name="corePoolSize"
>> >> >> >> > value="${servicemix.corePoolSize
>> >> >> >> > }"/>
>> >> >> >> >               <property name="maximumPoolSize" value="${
>> >> >> >> > servicemix.maximumPoolSize}"/>
>> >> >> >> >               <property name="queueSize" value="${
>> >> >> servicemix.queueSize
>> >> >> >> }"/>
>> >> >> >> >             </bean>
>> >> >> >> >         </property>
>> >> >> >> >       </bean>
>> >> >> >> >     </sm:executorFactory>
>> >> >> >> >   </sm:container>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Question 3:
>> >> >> >> >> =======
>> >> >> >> >>                 What is the significance of
>> JettyThreadPoolSize
>> >> of
>> >> >> >> >> servicemix-http component when it is deployed on JBoss
>> >> Application
>> >> >> >> >> Server?
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> > The JBoss deployer will not reuse the HTTP server from JBoss.
>>  It
>> >> >> will
>> >> >> >> use
>> >> >> >> > an embedded Jetty server instead.  On the other side, the
>> >> servicemix
>> >> >> >> web
>> >> >> >> > application distribution will reuse the web server onto which
>> it
>> >> has
>> >> >> >> been
>> >> >> >> > deployed.
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Environment:
>> >> >> >> >> ========
>> >> >> >> >>
>> >> >> >> >> Servicemix 3.2.1
>> >> >> >> >> JBoss 4.2.2.GA
>> >> >> >> >> OS: Redhat Enterprise Linux 4
>> >> >> >> >>
>> >> >> >> >> Any reply will be appreciated.
>> >> >> >> >>
>> >> >> >> >> Greetings,
>> >> >> >> >> Puneet
>> >> >> >> >> --
>> >> >> >> >> View this message in context:
>> >> >> >> >>
>> >> >> >>
>> >> >>
>> >>
>> http://www.nabble.com/%28Urgent%29-Default-Thread-Pool-Size-of-Servicemix-running-with-JBoss-tp16269404s12049p16269404.html
>> >> >> >> >> Sent from the ServiceMix - User mailing list archive at
>> >> Nabble.com.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Cheers,
>> >> >> >> > Guillaume Nodet
>> >> >> >> > ------------------------
>> >> >> >> > Blog: http://gnodet.blogspot.com/
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >> --
>> >> >> >> View this message in context:
>> >> >> >>
>> >> >>
>> >>
>> http://www.nabble.com/%28Urgent%29-Default-Thread-Pool-Size-of-Servicemix-running-with-JBoss-tp16269404s12049p16271924.html
>> >> >> >> Sent from the ServiceMix - User mailing list archive at
>> Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Cheers,
>> >> >> > Guillaume Nodet
>> >> >> > ------------------------
>> >> >> > Blog: http://gnodet.blogspot.com/
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/%28Urgent%29-Default-Thread-Pool-Size-of-Servicemix-running-with-JBoss-tp16269404s12049p16273573.html
>> >> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > Cheers,
>> >> > Guillaume Nodet
>> >> > ------------------------
>> >> > Blog: http://gnodet.blogspot.com/
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/%28Urgent%29-Default-Thread-Pool-Size-of-Servicemix-running-with-JBoss-tp16269404s12049p16275105.html
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> > ------------------------
>> > Blog: http://gnodet.blogspot.com/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/%28Urgent%29-Default-Thread-Pool-Size-of-Servicemix-running-with-JBoss-tp16269404s12049p16282903.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%28Urgent%29-Default-Thread-Pool-Size-of-Servicemix-running-with-JBoss-tp16269404s12049p16296490.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to