Hi guys,
I wrote a camel route that each "PERIOD" execute a java program, than at the
end of this program a would like to read the output of the program
(file.log) and write it to my camel log file.
The problem is that I'm not able to read the file at runtime, each time te
route start (PERIOD) I have always the same initial content of the body in
my log file, even if the program is called and the file.log changes. 
Here is my route:

<route id="route4" startupOrder="4" autoStartup="false"
routePolicyRef="myStartPolicy">
            <from uri="timer://foo?fixedRate=true&amp;period={{PERIOD}}"/>
            <to uri="exec:{{EXEC}}"/>
                <onCompletion onCompleteOnly="true">
                        <camel:setBody>
                                <camel:simple
resultType="java.lang.String">resource:file:///C:/Entratel/prog/file.log</camel:simple>
                        </camel:setBody>
                        <camel:log 
message="******************************************"/>
                        <camel:log message="[ROUTE-4] file content: ${body}"/>
                        <camel:log 
message="********************************************"/>
            </onCompletion>
            <onException useOriginalMessage="true">
            </onException>
</route>

Any idea? I can I read a file at runtime?
Thanks in advance.

PPL



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-setBody-from-file-runtime-loading-tp5781891.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to