Reputation: 1578
I have an application and two application servers. I deployed the same application to each of my application server but I also made them run as active-passive. To do this, I am using a lock.
Now I am coding my application with apache camel. In route, I want my code to be intercepted by a control which looks up a that if the lock released or not. According to the result, route will go on or not.
How can I do this with xml definition of camel?
Upvotes: 2
Views: 1316
Reputation: 22279
There is a <stop/>
tag you can use.
<choice>
<when>
<simple>${bean:controller?method=isLocked} eq 'true'</simple>
<stop/>
</when>
<otherwise>
<to uri="direct:continueProcessing"/>
</otherwise>
</choice>
Upvotes: 1