8.3. Using Apache Camel with Orchestra
Prev | Chapter 8. Advanced features | Next

## 8.3. Using Apache Camel with Orchestra

When using Orchestra with CXF Web Service framework, Orchestra can use Apache Camel as transport for web services interactions.

Orchestra-Camel integration allows processes to produce/consume messages on the Camel context. It allows a process to use for example JMS, mail, file connectors to connect to remote services.

For more information about Apache Camel features, please read Camel documentation

### 8.3.1. How to create a Camel context for a process ?

Orchestra uses Camel Spring language to describe routes. To define the Camel routes deployed with a process, add a camel-context.xml file in your BAR archive. Orchestra will deploy and start the routes with the process. If your camel-context.xml uses external Java classes, you can add them too to the BAR archive.

Example of camel-context.xml file:

    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
           http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://camel.apache.org/schema/spring
            http://camel.apache.org/schema/spring/camel-spring.xsd">
      <camelContext xmlns="http://camel.apache.org/schema/spring" autoStartup="false">
        <route>
          <from uri="file:///inputDir" />
          <to uri="direct:hello"/>
        </route>
      </camelContext>
    </beans>

Prev | Up | Next
8.2. Clustering configuration | Home | 8.3.2. How to use camel context instead of HTTP for Web Service interactions ?