How to configure the Jetty thread pool of the Pax-Web HTTP service in Fuse ESB?
Environment
- Fuse ESB Enterprise 7.x
- Fuse ESB 4.4.x
Issue
How can the Jetty thread pool of the Pax-Web HTTP service in the FUSE ESB container be configured?
Resolution
Fuse ESB and Fuse ESB Enterprise deploy a default HTTP stack out of the box leveraging the Pax-Web project.
Other OSGi bundles can use this HTTP stack. E.g. a CXF based Web Service will utilize the Pax-Web HTTP stack by default when running in an OSGI environment (unless it gets configured to use the CXF Servlet transport).
The default HTTP thread pool configuration is not always sufficient for every use-case. If required, this thread pool can be reconfigured using the configuration file in etc/jetty.xml. To specifically configure the Jetty thread pool, the following XML configuration can be applied with the
<Set name="threadPool">
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">1000</Set>
</New>
</Set>
A restart of the ESB container is needed for this change to take effect.
Consult the Jetty XML syntax reference guide for a full documentation.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
