Dear all

I have a route which is called by <loop> like the following:

<route>
        <from uri="direct:repeatReversal" />
        <to uri="bean:messageUtil?method=markRepeatRequired" />
        <loop>
                <method bean="messageUtil" method="readNumberOfRepeat" />
                <to uri="direct:invoke" />
        </loop>
        <to uri="bean:messageUtil?method=printMsg" />
</route>

<route>
        <from uri="direct:invoke" />

        <onException>
                <exception>my.Exception</exception>
                <handled><constant>true</constant></handled>
                <to uri="bean:messageUtil?method=markRepeatRequired" />
        </onException>

        <delay>
                <constant>5000</constant>
        </delay>

        <choice>
                <when>
                        <simple>${in.header.repeat} != null</simple>
                        <to 
uri="bean:aBusinessBean?method=invokeWithPossibleMyException" />
                        <to uri="bean:messageUtil?method=unmarkRepeatRequired"/>
                </when>
        </choice>
        <to uri="bean:messageUtil?method=printMsg" />
</route>

The problem is, once a MyException arise, the loop stop completely.
How this happened?

Regards

-- 
~The best men are men who benefit to others
http://michsan.web.id

Yang berkualitas memang beda rasanya!
http://rizqi-cookies.com

Reply via email to