...
- Camel uses Spring Transactions as the default transaction handling in components like JMS and JPA
- Camel works with Spring 2 XML processing with the Xml Configuration
- Camel Spring XML Schema's is defined at Xml Reference
- Camel supports a powerful version of Spring Remoting which can use powerful routing between the client and server side along with using all of the available Components for the transport
- Camel provides powerful Bean Integration with any bean defined in a Spring ApplicationContext
- Camel integrates with various Spring helper classes; such as providing Type Converter support for Spring Resources etc
- Allows Spring to dependency inject Component instances or the CamelContext instance itself and auto-expose Spring beans as components and endpoints.
- Allows you to reuse the Spring Testing framework to simplify your unit and integration testing using Enterprise Integration Patterns and Camel's powerful Mock and Test endpoints
...
Wiki Markup |
---|
{snippet:id=example5|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextRouteBuilderRef.xml} |
Infowarning |
---|
Use caution when specifying the package name as |
...
Wiki Markup |
---|
{snippet:id=example|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactory.xml} |
Or you can refer to camel XSD in the XML declaration:
Wiki Markup |
---|
{snippet:id=example5|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml} |
... and then use the camel: namespace prefix, and you can omit the inline namespace declaration:
Wiki Markup |
---|
{snippet:id=example6|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml} |
Configuring Components and Endpoints
...
If you want to be injected with the CamelContext in your POJO just implement the CamelContextAware interface; then when Spring creates your POJO the CamelContext will be injected into your POJO. Also see the Bean Integration for further injections.
XSD reference
See Xml Reference for how to XXXX