You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Nafees <s....@gmail.com> on 2012/07/10 13:30:07 UTC

Updating status when FTP connection fails

Hi

I have a FTP component and we have a class OptimerPollStrategy which
implements PollingConsumerPollStrategy, in rollback() method, I am stopping
the consumer as consumer.stop. Also, i want to know the details of the Route
for which this exception had raised. I want to update to some database
tables regarding the status of this process.

My FTP url is :
{0}://{1}@{2}/{3}?password={4}&binary={5}&passiveMode=true&pollStrategy=#optimerPoll&throwExceptionOnConnectFailed=true&maximumReconnectAttempts=0&localWorkDirectory=/tmp&idempotent=true

We can run multiple ftp routes , I want to stop the route and update the
status when exception occurs.

Please help me

Thanks
Nafees

--
View this message in context: http://camel.465427.n5.nabble.com/Updating-status-when-FTP-connection-fails-tp5715802.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Updating status when FTP connection fails

Posted by Nafees <s....@gmail.com>.
Hi Claus,

Thanks for ur response, I will try to use CamelContext to get required
information. Will take ur help if i am getting strucked up.

Thank you

--
View this message in context: http://camel.465427.n5.nabble.com/Updating-status-when-FTP-connection-fails-tp5715802p5715919.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Updating status when FTP connection fails

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Jul 10, 2012 at 1:30 PM, Nafees <s....@gmail.com> wrote:
> Hi
>
> I have a FTP component and we have a class OptimerPollStrategy which
> implements PollingConsumerPollStrategy, in rollback() method, I am stopping
> the consumer as consumer.stop. Also, i want to know the details of the Route
> for which this exception had raised. I want to update to some database
> tables regarding the status of this process.
>
> My FTP url is :
> {0}://{1}@{2}/{3}?password={4}&binary={5}&passiveMode=true&pollStrategy=#optimerPoll&throwExceptionOnConnectFailed=true&maximumReconnectAttempts=0&localWorkDirectory=/tmp&idempotent=true
>
> We can run multiple ftp routes , I want to stop the route and update the
> status when exception occurs.
>

A consumer does not need to be in a route, and hence why the API can't
have a Route instance.
That said we have A JIRA ticket for Camel 3.0 to have a specialized
Consumer as RouteConsumer etc so you can easy get the Route instance.

What you have is the Endpoint, as the consumer have getEndpoint().
You can also from CamelContext lookup all the routes, and then "figure
out" which route the consumer is from.


> Please help me
>
> Thanks
> Nafees
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Updating-status-when-FTP-connection-fails-tp5715802.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen