HI Christian,
I am pasting the reply again as some parts of the message seem to be distorted in the earlier post, Let me try and clarify the use case further :- Consider the following routes within a camel context context <route id="r1"> <from/>....</to> <from>........<to/> </route> <route id="r2"> <from/>............<to/> </route> <route id="r3"> <from/>............<to/> </route> <route id="r4"> <from/>............<to/> <from uri="file://d:/input"> <to uri="file://d:/output"> </route> </context> a. I need to update a record in the DB immediately after the last route is executed (in our case route=r4 i.e after the last <from uri="file://d:/input"><to uri="file://d:/output"> statements of the r4, are executed, the DB has to be updated. b. The twist here is that this solution has to be generic. Different users might have their own cameml routes. We need to provide a generic solution wherein the database update happens immediately after the last statement of the last route is executed. (we could distribute a a jar file to the users to accomplish this) c. I was wondering if the onCompletion statement could be executed on the fly. i.e the end user could just update a properties file about the last route and the onCompletion could be hooked to that route. d. Or, is there any way of knowing the last statetement of the last route of a given context and automatically update the DB after the last statement is executed. Please do let us know how to go about this. Appreciate all your help. Regards, Bhavani Thanks and Regards, Bhavani ________________________________ From: Christian Mueller [via Camel] [ml-node+s465427n5726811...@n5.nabble.com] Sent: Saturday, February 02, 2013 4:06 PM To: Bhavani Ananth (WT01 - BAS) Subject: Re: Regarding OnCompletion functionality Sorry, I didn't understand your requirements. Could you explain it in more detail? See my comments inline. Sent from a mobile device Am 01.02.2013 11:38 schrieb "BAnanth" <[hidden email]<https://webmail.wipro.com/owa/UrlBlockedError.aspx>>: > > Hi, > > We have a requirement wherein we need to insert/update DB record after the > last route in the context is executed. Explain what you mean. > > The solution has to be generic in the sense the last route detail (id) would > have to be read from the properties file and then insert/update stmt has to > be executed. Please explain. > > We are planning to use OnCompletion. But we are not sure how to implement > the same in a generic way. The user would be only giving the route id and we > need to write a jav class that would read the file and based on the route > id, trigger the oncompletion functionality. > > Thanks in advance for your help. > > Regards, > Bhavani > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Regarding-OnCompletion-functionality-tp5726726.html > Sent from the Camel - Users mailing list archive at Nabble.com. ________________________________ If you reply to this email, your message will be added to the discussion below: http://camel.465427.n5.nabble.com/Regarding-OnCompletion-functionality-tp5726726p5726811.html To unsubscribe from Regarding OnCompletion functionality, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5726726&code=YmhhdmFuaS5hbmFudGhAd2lwcm8uY29tfDU3MjY3MjZ8MTk0MzU5ODk5NQ==>. NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- View this message in context: http://camel.465427.n5.nabble.com/Regarding-OnCompletion-functionality-tp5726726p5726870.html Sent from the Camel - Users mailing list archive at Nabble.com.