Versions Compared

Key

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

...

Wiki Markup
{snippet:id=example|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactoryTest.xml}

Configuring Components and Endpoints

You can configure your Component or Endpoint instances in your Spring XML as follows.

Wiki Markup
{snippet:id=example|lang=xml|url=activemq/camel/trunk/camel-jms/src/test/resources/org/apache/camel/component/jms/jmsRouteUsingSpringTest.xml}

Wiki Markup
Which allows you to configure a component using some name (activemq in the above example), then you can refer to the component using *activemq:\[queue:\|topic:\]destinationName*. This works by the SpringCamelContext lazily fetching components from the spring context for the scheme name you use for [Endpoint] [URIs].

For more detail see Configuring Endpoints and Components.