198.3.2. Deploying KuraRouter
Kura ルータークラスを含むバンドルは、OSGi マニフェストに以下のパッケージをインポートする必要があります。
Import-Package: org.osgi.framework;version="1.3.0", org.slf4j;version="1.6.4", org.apache.camel,org.apache.camel.impl,org.apache.camel.core.osgi,org.apache.camel.builder,org.apache.camel.model, org.apache.camel.component.kura
Import-Package: org.osgi.framework;version="1.3.0",
org.slf4j;version="1.6.4",
org.apache.camel,org.apache.camel.impl,org.apache.camel.core.osgi,org.apache.camel.builder,org.apache.camel.model,
org.apache.camel.component.kura
Camel コンポーネントはランタイムレベルでサービスとして解決されるため、ルートで使用する予定の Camel コンポーネントバンドルをすべてインポートする必要がないことに注意してください。
ルーターバンドルをデプロイする前に、以下の Camel コアバンドルをデプロイ(および起動)し(Kura GoGo shell を使用)…
また、ルートで使用する予定のすべてのコンポーネント:
install file:///home/user/.m2/repository/org/apache/camel/camel-stream/2.15.0/camel-stream-2.15.0.jar start <camel-stream-bundle-id>
install file:///home/user/.m2/repository/org/apache/camel/camel-stream/2.15.0/camel-stream-2.15.0.jar
start <camel-stream-bundle-id>
次に、最後にルーターバンドルをデプロイします。
install file:///home/user/.m2/repository/com/example/myrouter/1.0/myrouter-1.0.jar start <your-bundle-id>
install file:///home/user/.m2/repository/com/example/myrouter/1.0/myrouter-1.0.jar
start <your-bundle-id>