camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bounkong khamphousone (JIRA)" <>
Subject [jira] [Created] (CAMEL-6819) Use exceptionHandler on Xmpp Consumer
Date Wed, 02 Oct 2013 16:56:45 GMT
bounkong khamphousone created CAMEL-6819:

             Summary: Use exceptionHandler on Xmpp Consumer
                 Key: CAMEL-6819
             Project: Camel
          Issue Type: Improvement
          Components: camel-xmpp
    Affects Versions: 2.12.1
         Environment: all
            Reporter: bounkong khamphousone


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);

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

View raw message