0
ソケット()からデータを読み込み、ibatisを使用してデータベースにパースして書き込む必要があります。このプロセスを連続的に実行する方法は不明です。ラクダの使用を考えていますが、ループ回数について言及する必要があるようです。jbossヒューズのラクダルートを使用してループを連続して実行する
<route id="vts-data">
<from uri="timer://runOnce?repeatCount=1" />
<doTry>
<loop>
<to uri="bean:vtsProcessor?method=extractLocations" />
<log message="Details List is : ${body}" />
</loop>
<choice>
<when>
<simple>${body.size} == 0</simple>
<log message="List is null ${body}" />
</when>
<otherwise>
<to uri="mybatisPromis:insertLocationData?statementType=SelectList" />
<log message="Details List is : ${body}" />
<choice>
<when>
<simple>${body.size} == 0</simple>
<log message="Details List is null : ${body}" />
</when>
<otherwise>
<log message="Details List is : ${body}" />
</otherwise>
</choice>
</otherwise>
</choice>
<doCatch>
<exception>java.lang.Exception</exception>
</doCatch>
<doFinally>
<to uri="log:body" />
</doFinally>
</doTry>
</route>
私はラクダとヒューズを新しくしました。プロセスを連続的に実行するためにワーカースレッドを使用することは考えられますが、幸運はありません。最適化されたアプローチで行うにはいくつかの指針が必要です。