Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Camel will configure these functions by doing a lookup in the Spring bean registry to find beans of the given type
When Camel finds and uses any of these it logs at INFO level.

...

Type

Number of beans

Description

PackageScanClassResolver

0..1

To use a 3rd party package scan resolver. More details at XXXX.

ClassResolver

0..1

To use a 3rd party class resolver. More details at XXXX.

FactoryFinderResolver

0..1

To use a 3rd party factory finder.

LifecycleStrategy

0..1

To use a 3rd party lifecycle strategy. By default Camel uses a JMX aware that does JMX instrumentation.

Registry

0..1

To use a 3rd party bean registry. By default Camel will use Spring ApplicationContext as registry.

Debugger

0..1

To use a Debugger usually for tooling.

Tracer

0..1

To use a 3rd party Tracer.

TraceFormatter

0..1

To use a bean that has the tracing options configured.

HandleFault

0..1

To use a 3rd part HandleFault that handles FAULT messages. The default implementation turns fault handler to handle FAULT messages into Exceptions.

Delayer

0..1

To use a 3rd part Delayer.

...

InterceptStrategy

0..n

To use your own Interceptor that intercepts every processing steps in all routes in the CamelContext. For instance you can use this to do an AOP like performance timer interceptor.

Adding container wide interceptors

Imagine that you have multiple CamelContext and you want to configure that they all use the same container wide interceptor. How do we do that? Well we can leverage the fact that Camel can auto detect and use custom interceptors. So what we simply do is to define our interceptor in the spring xml file. The sample below does this and also define 2 camel contexts. The sample is based on unit test.

TODO: snippet XML e1

Okay lets build our interceptor to simply count the number of interceptions. This is quite easy as we can just implement this logic in our implementation directly as the code below illustrates:

TODO: snippet java e1

See Also