Red Hat Training

A Red Hat training course is available for Red Hat Fuse

76.9. Camel の CXF トランスポート層との統合

Camel Tranport を CXF バスに含めるには、CamelTransportFactory を使用します。これは、Java および Spring で実行できます。

76.9.1. Spring での Camel トランスポートの設定

特別な設定を行う場合は、applicationcontext で以下のスニペットを使用できます。camel トランスポートのみをアクティベートする場合は、アプリケーションコンテキストで何もする必要はありません。アプリに camel-cxf-transport jar(または camel バージョンが 2.7.x 未満の場合は camel-cxf.jar)が含まれる場合すぐに、cxf は jar をスキャンし、CamelTransportFactory を読み込みます。

<!-- you don't need to specify the CamelTransportFactory configuration as it is auto load by CXF bus -->
<bean class="org.apache.camel.component.cxf.transport.CamelTransportFactory">
  <property name="bus" ref="cxf" />
  <property name="camelContext" ref="camelContext" />
  <!-- checkException new added in Camel 2.1 and Camel 1.6.2 -->
  <!-- If checkException is true , CamelDestination will check the outMessage's
     exception and set it into camel exchange. You can also override this value
     in CamelDestination's configuration. The default value is false.
     This option should be set true when you want to leverage the camel's error
     handler to deal with fault message -->
  <property name="checkException" value="true" />
  <property name="transportIds">
    <list>
      <value>http://cxf.apache.org/transports/camel</value>
    </list>
  </property>
</bean>