Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

If a bean is defined in Spring XML or scanned using the Spring component scanning mechanism and a <camelContext> is used or a CamelBeanPostProcessor then we process a number of Camel annotations to do various things such as injecting resources or producing, consuming or routing messages.

The following annotations is supported and inject by Camel's CamelBeanPostProcessor

Annotation

Description

@EndpointInject

To inject an endpoint, see more details at POJO Producing.

@BeanInject

Camel 2.13: To inject a bean obtained from the Registry. See Bean Injection.

@PropertyInject

Camel 2.12: To inject a value using property placeholder.

@Produce

To inject a producer to send message to an endpoint. See POJO Producing.

@Consume

To inject a consumer on a method. See POJO Consuming.

See more details at:

Tip
titleExample

See the POJO Messaging Example for how to use the annotations for routing and messaging.

Bean Component

The Bean component allows one to invoke a particular method. Alternately the Bean component supports the creation of a proxy via ProxyHelper to a Java interface; which the implementation just sends a message containing a BeanInvocation to some Camel endpoint.

...