Hi Amit,

The Apache Camel Servlet component registers a CamelServlet which extend
the javax.servlet.http.HTTPServlet class. This servlet which is managed by
the Web Container is by default multithreaded and by consequence will
manage in parallel incoming requests. Our camel servlet code supports
concurrency and will be able to achieve that goal

public class CamelServlet extends HttpServlet {
    private static final long serialVersionUID = -7061982839117697829L;
    protected final Logger log = LoggerFactory.getLogger(getClass());

    /**
     *  We have to define this explicitly so the name can be set as we can
not always be
     *  sure that it is already set via the init method
     */
    private String servletName;

    private ServletResolveConsumerStrategy servletResolveConsumerStrategy =
new HttpServletResolveConsumerStrategy();
    private final ConcurrentMap<String, HttpConsumer> consumers = new
ConcurrentHashMap<String, HttpConsumer>(); // THREAD SAFE & WORK WITH
MULTIPLE HTTP C/IENT IN //

Regards,


On Mon, Oct 27, 2014 at 4:49 PM, Amit <[email protected]> wrote:

> Would please answer the following questions. I also have
> http://camel.apache.org/camel-23-threadpool-configuration.html doc but i
> am
> NOT clear how the thread pool works.
>
> 1) What is default thread pool and component level thread pool?
> 2) When i created a component such as http4, does it uses the defaultThread
> pool by default?
> 3) If i have to set Thread pool for servlet endpoint Which thread pool I
> should use?
> 4) Does endpoint Thread pool overwrite the Component Thread Pool?
> 5) If i set thread pool for servlet route as below does this thread pool
> apply to only the consumer <from  servlet.
>
>
> <threadPoolRule route=""jaxrsExample" source="to"
> executorServiceRef="myRoute3Pool"/>
>
> <route xmlns="http://camel.apache.org/schema/spring"; trace="true"
> id="jaxrsExample">
>   <from uri="servlet:///jaxrsExample?matchOnUriPrefix=true" />
>   <to uri="cxfbean:jaxrsServices" />
> </route>
>
> Thanks,
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/What-is-default-thread-pool-and-component-level-thread-pool-tp5758107.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Reply via email to