camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Cosentino (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-6819) Use exceptionHandler on Xmpp Consumer
Date Tue, 13 May 2014 21:03:15 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-6819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13996892#comment-13996892
] 

Andrea Cosentino edited comment on CAMEL-6819 at 5/13/14 9:02 PM:
------------------------------------------------------------------

The original pull request come from a wrong branch, so I've close it and I've submitted this
new one. Sorry. Now is ok.

Bye


was (Author: ancosen):
The original pull request come from a wrong branch, so I've close it and I've submitted this
new one. Sorry. Now is ok.

Byer

> Use exceptionHandler on Xmpp Consumer
> -------------------------------------
>
>                 Key: CAMEL-6819
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6819
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-xmpp
>    Affects Versions: 2.12.1
>         Environment: all
>            Reporter: bounkong khamphousone
>            Priority: Minor
>
> 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.2#6252)

Mime
View raw message