You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/11/20 08:35:26 UTC
[jira] [Updated] (CAMEL-6819) Use exceptionHandler on Xmpp Consumer
[ https://issues.apache.org/jira/browse/CAMEL-6819?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-6819:
-------------------------------
Fix Version/s: (was: 2.12.2)
2.12.3
> 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
> Fix For: 2.13.0, 2.12.3
>
>
> 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)