2017-06-18 10 views
0

キャメルが私のJVMで動いていて、それに接続しています。私は、JMXのhawtioタブでCamelの詳細を見ることができます。私がcamelcontex.xmlで何かを変更し、カーラフを再起動すると、変更がhawtioに反映されませんでした。キャメルの文脈の変化が笑顔に反映されない

私はルートhawtioをデバッグできません。

変更がハワイに反映されるように、設定を提案してもらえますか。ハワイを通してルートをデバッグできますか。

<route xmlns="http://camel.apache.org/schema/spring" id="cbr-route"> 
     <from uri="file:work/cbr/input" id="_from1"/> 
     <log message="Receiving order ${file:name}" id="_log1"/> 
     <choice id="_choice1"> 
      <when id="_when1"> 
       <xpath>/order/customer/country = 'UK'</xpath> 
       <log message="Sending order ${file:name} to the UK" id="_log2"/> 
       <to uri="file:work/cbr/output/uk" id="_to1"/> 
      </when> 
      <when id="_when2"> 
       <xpath>/order/customer/country = 'US'</xpath> 
       <log message="Sending order ${file:name} to the US" id="_log3"/> 
       <to uri="file:work/cbr/output/us" id="_to2"/> 
      </when> 
      <otherwise id="_otherwise1"> 
       <log message="Sending order ${file:name} to another country" id="_log4"/> 
       <to uri="file:work/cbr/output/others" id="_to3"/> 
      </otherwise> 
     </choice> 
     <log message="Done processing ${file:name}" id="_log5"/> 
    </route> 

マイCamelContex.xml

<route id="cbr-route"> 
      <from id="_from1" uri="file://C:/temp/camel"/> 
      <log id="_log1" message="Receiving order ${file:name}"/> 
      <choice id="_choice1"> 
       <when id="_when1"> 
        <xpath id="_xpath1">/order/customer/country = 'UK'</xpath> 
        <log id="_log2" message="Sending order ${file:name} to the UK"/> 
        <to id="_to1" uri="file:work/cbr/output/uk"/> 
       </when> 
       <when id="_when2"> 
        <xpath id="_xpath2">/order/customer/country = 'US'</xpath> 
        <log id="_log3" message="Sending order ${file:name} to the US"/> 
        <to id="_to2" uri="file:work/cbr/output/us"/> 
       </when> 
       <otherwise id="_otherwise1"> 
        <log id="_log4" message="Sending order ${file:name} to another country"/> 
        <to id="_to3" uri="file:work/cbr/output/others"/> 
       </otherwise> 
      </choice> 
      <log id="_log5" message="Done processing ${file:name}"/> 
     </route> 

hawtioソース]タブのルートは、高度にどうもありがとうございます。

+0

私はすべてのhawtioバンドルを停止して起動しようとしましたが、動作していない – Arun

+0

Karaf 6.3 Apacheのキャメル2.17.0 hawtio 1.4.0 – Arun

答えて

1

Camel XMLをhawtioウェブコンソールから変更した場合、それらの変更は永続的ではなく、実行時に変更されるだけです。永続的な変更が必要な場合は、ソースコードを変更して、再構築してkarafに再デプロイする必要があります。

しかし、Karafは、単一のxmlファイルをdeployフォルダにコピーすることによっても展開できます。その後、そのファイルに変更を加えて保存することができ、karafはファイルの変更を検出して自動的に再デプロイする必要があります。

+0

はそんなに@Clausイプセン、あなたを話してその名誉をありがとうございました。私はApache CamelとFuseには新しく、プロジェクトをサーバーに追加することでJboss Studioに2つのFuseプロジェクトを配備しようとしていました。 Jaboss Studioを通じてKarafで2〜3のプロジェクトを追加する方法を教えてください。 2.)また、Karafにソースコードを再構築して再デプロイする際に、さまざまな時間を変更しようとしました。データフォルダを削除しても、ソースコードの変更はhawtioに反映されません。 hahtioで変更された設定ファイルを変更する必要がありますか?あなたの貴重な考えをお伝えください。 – Arun

+0

@ArunあなたのバンドルをPOMに '-SNAPSHOT'バージョンでマークしてください。同じ安定版を再デプロイすると、すべてがリロードされないことがあります。 –