...
div |
class |
confluenceTableSmall |
|
Option |
Type |
Description |
propertyPlaceholder.XXX |
|
To configure property placeholders 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. |
messageHistory |
Boolean |
Camel 2.12.2: Whether to enable or disable Message History (enabled by default). |
streamCache |
Boolean |
Whether to enable Stream Cachingcaching. |
trace |
Boolean |
Whether to enable Tracer. |
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 Logginglogging. |
useBreadcrumb |
Boolean |
Whether to use breadcrumb. |
managementNamePattern |
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. |
CamelContextLifecycle |
|
Refers to a FQN classname of an implementation of org.apache.camel.component.servletlistener.CamelContextLifecycle . Which allows to execute custom code before and after CamelContext has been started or stopped. See below for further details. |
XXX |
|
To set any option on CamelContext. |
|
...
See Servlet Tomcat No Spring Example.
Accessing the created CamelContext
Available as of Camel 2.14/2.13.3/2.12.5
The created CamelContext
is stored on the ServletContext
as an attribute with the key "CamelContext". You can get hold of the CamelContext if you can get hold of the ServletContext
as shown below:
Code Block |
ServletContext sc = ...
CamelContext camel = (CamelContext) sc.getAttribute("CamelContext");
|
Configuring routes
You need to configure which routes to use in the web.xml file. You can do this in a number of ways, though all the parameters must be prefixed with "routeBuilder".
...