Augus Topor created CAMEL-9277:
----------------------------------

             Summary: FTP shutdown whole context on startup if 
throwExceptionOnConnectFailed true
                 Key: CAMEL-9277
                 URL: https://issues.apache.org/jira/browse/CAMEL-9277
             Project: Camel
          Issue Type: Bug
          Components: camel-ftp
    Affects Versions: 1.6.1
         Environment: jdk64_1.7.0_71, simple Java program for testing
            Reporter: Augus Topor


I recently upgrade from camel 2.14.1 to 2.16.1 and discover following issue: 
Unable to catch the Exception on startup if throwExceptionOnConnectFailed=true 
and autoCreate=true or autoCreate not declared.

If at the time of startup, the FTP site was down or unreachable, the Exception 
cannot be handled by any means I currently know which are onException route and 
doTry-doCatch method.

Following are my FTP parameters:
&maximumReconnectAttempts=0&stepwise=false&disconnect=true&throwExceptionOnConnectFailed=true&consumer.bridgeErrorHandler=true"

The only workaround without compromising error log functionality is by adding 
parameter "autoCreate=false".

Based on Camel-FTP documentation: "
For Camel 2.16, autoCreate option is supported. When consumer starts, before 
polling is scheduled, there's additional FTP operation performed to create the 
directory configured for endpoint. The default value for autoCreate is true.
"

In my opinion, the exception should be able to be caught, instead shutdown the 
whole Camel context. And description for throwExceptionOnConnectFailed need to 
be updated so unaware developer does not suffer the same as I did.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to