Hi,
I'm using Camel 2.8 in conjunction with camel-cxf.
Now I have the following scenario.
I have 2 specialized .NET services which do server me the following two services
- doSomeSpecialHandling
-- this is a rather lengthy process running which returns right after
start and keeps on processing
- checkStatus
-- checks if the other process is still running
For the second service I have a speicalized route which looks like this:
<camel:route id="checkRoute">
<camel:from uri="direct:checkRoute" />
<camel:setBody>
<camel:mvel>[ ]</camel:mvel>
</camel:setBody>
<camel:doTry>
<camel:recipientList parallelProcessing="true">
<camel:simple>cxf:bean:productionServer?address=${header.address}&wrappedStyle=true</camel:simple>
</camel:recipientList>
<camel:choice>
<camel:when>
<camel:mvel>
<![CDATA[request.body[0] !=
'Success' && request.body[0] !=
'Failure' && request.body[0] != 'Unknown']]>
</camel:mvel>
<delay>
<constant>5000</constant>
</delay>
<camel:to
uri="direct:checkRoute" />
</camel:when>
</camel:choice>
<camel:doCatch>
<camel:exception>java.lang.Exception</camel:exception>
<camel:to uri="direct:handleException"
/>
</camel:doCatch>
</camel:doTry>
</camel:route>
This Route runs recursively, after a while if the underlying system
takes to long, I'll run into a problem cause the stack runs full due
to the recursive calls.
Is there a way of looping with an unknown end? Cause the looping
component only loops for n-iterations where n needs to be known
beforehand. Basically I'm trying to
do a while(condition) loop with camel :)
Any Idea is welcome.
Thanks, Achim