I have a couple of bean declarations in my camel-context.xml. How can I use them in a Processor class or similar?

Solution Unverified - Updated -


  • Fuse Mediation Router 2.x


I have "" instances declared in my CamelContext. Is there any way to access them as ordinary Spring beans in my java code?


The org.apache.camel.spi.Registry will allow you to lookup the spring beans.

In your Java code you can do it as follows:

Object myBean = camelContext.getRegistry().lookup("myBean");

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.