Author: buildbot Date: Fri Jan 4 10:18:25 2013 New Revision: 844902 Log: Production update by buildbot for camel Added: websites/production/camel/content/servletlistener-component.html Modified: websites/production/camel/content/cache/main.pageCache Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Added: websites/production/camel/content/servletlistener-component.html ============================================================================== --- websites/production/camel/content/servletlistener-component.html (added) +++ websites/production/camel/content/servletlistener-component.html Fri Jan 4 10:18:25 2013 @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + Apache Camel: ServletListener Component + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + +
+

ServletListener Component

+

Available as of Camel 2.11

+ +

This component is used for bootstrapping Camel applications in web applications. For example beforehand people would have to find their own way of bootstrapping Camel, or rely on 3rd party frameworks such as Spring to do it.

+ +

There may be situations where you want a pure Camel based solution, without the extra overhead of Spring Framework.

+ +
Sidebar
This component works as a javax.servlet.ServletContextListener, which works in any web container of today, as well any older containers.
+There may be solutions around the corner which is based on Servlet 3.x and annotation driven configuration, or using CDI or other means.
+This component is old school and based on the pure API from Servlet 2.x, which means it works in any web container. Also the old ones, which was the goal.
+ +

TODO: Maven dependency

+ +

Using

+ +

To use this you need to configure the org.apache.camel.component.servletlistener.CamelServletContextListener in the WEB-INF/web.xml file as shown below:
+TODO: myweb.xml

+ +

Example

+

See [Servlet Tomcat No Spring Example].

+ +

Options

+ +

The org.apache.camel.component.servletlistener.CamelServletContextListener supports the following options which can be configured as context-param in the web.xml file.

+ +
+
Option Type Description
propertyPlaceholder.XXX   To configure [Using PropertyPlaceholder] in Camel. You should prefix the option with "propertyPlaceholder.", for example to configure the location, use propertyPlaceholder.location as name. You can configure all the options from the Properties component.
jmx.XXX   To configure JMX. You should prefix the option with "jmx.", for example to disable JMX, use jmx.disabled as name. You can configure all the options from org.apache.camel.spi.ManagementAgent. As well the options mentioned on the JMX page.
name String To configure the name of the CamelContext.
streamCache Boolean Whether to enable Stream caching.
trace Boolean Whether to enable [Tracing].
delayer Long To set a delay value for Delay Interceptor.
handleFault Boolean Whether to enable handle fault.
errorHandlerRef String Refers to a context scoped Error Handler to be used.
autoStartup Boolean Whether to start all routes when starting Camel.
useMDCLogging Boolean Whether to use MDC logging.
useBreadcrumb Boolean Whether to use [Breadcrumb].
managementNam ePattern String To set a custom naming pattern for JMX MBeans.
threadNamePattern String To set a custom naming pattern for threads.
properties.XXX   To set custom properties on CamelContext.getProperties. This is seldom in use.
routebuilder.XXX   To configure routes to be used. See below for more details.
XXX   To set any option on CamelContext.
+
+ + + + +

See Also

+ +
+
+ +
+ + +
+
+
+
+
+
+ +
+
+
+© 2004-2011 The Apache Software Foundation. +
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. +
+Graphic Design By Hiram +
+ + + + + + + +