[ 
https://issues.apache.org/jira/browse/CAMEL-6814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bounkong khamphousone closed CAMEL-6814.
----------------------------------------

    Resolution: Duplicate

> use exceptionHandler on XmppConsumer
> ------------------------------------
>
>                 Key: CAMEL-6814
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6814
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-xmpp
>            Reporter: bounkong khamphousone
>            Priority: Trivial
>
> Hi!
> What do you think about adding a call to the exceptionHandler in the 
> doStart() method of XmppConsumer class ?
> It would looks like : 
> try {
>             connection = endpoint.createConnection();
>         } catch (XMPPException e) {
>             if (endpoint.isTestConnectionOnStartup()) {
>                 throw new RuntimeException("Could not connect to XMPP 
> server.", e);
>             }  else {
>               final String xmppExceptionLogMessage = 
> XmppEndpoint.getXmppExceptionLogMessage(e);
>                 LOG.warn(xmppExceptionLogMessage);
>                 
> getExceptionHandler().handleException(xmppExceptionLogMessage,e);
>                 scheduleDelayedStart();
>                 return;
>             }
>         }
> This allowed an exceptionHandler to be notified of failure connection.
> The testConnectionOnStartup doesn't call exceptionHandler because the 
> exception is thrown while starting the consumer.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to