Versions Compared

Key

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

...

URI format

Code Block
bean:someName[?methodName=someMethod]

Where someName can be any string which is used to lookup the bean in the Registry and someMethod defines the name of the method to invoke.

This will use the Bean Binding to map the message exchange to the bean.

Using

Object instance that can receive invocations, must be explicitly registered with the PojoComponent Registry. For example if you are using Spring you must define the bean in the spring.xml; or if you don't use Spring then put the bean in JNDI.

Wiki Markup
{snippet:id=register|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java}

...

Wiki Markup
{snippet:id=route|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java}

A pojobean: endpoint cannot be defined as the input to the route. Consider using a direct: or queue: endpoint as the input for a PojoExchange.

You can use the createProxy() methods on PojoComponent ProxyHelper to create a proxy that will generate PojoExchanges BeanExchanges and send them to any endpoint:

...