/** * Notifies user of a JMS exception. * * @param exception The JMS exception */ @Override public void onException(final JMSException exception) { if (ActiveMQConnection.EXCEPTION_FAILOVER.equals(exception.getErrorCode())) { return; } if (logger.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("onException(" + exception + ")"); } if (isDestroyed.get()) { if (logger.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("Ignoring error on already destroyed connection " + this, exception); } return; } ActiveMQRALogger.LOGGER.handlingJMSFailure(exception); try { connection.setExceptionListener(null); } catch (JMSException e) { logger.debug("Unable to unset exception listener", e); } ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, exception); sendEvent(event); }
/** * Notifies user of a JMS exception. * * @param exception The JMS exception */ @Override public void onException(final JMSException exception) { if (ActiveMQConnection.EXCEPTION_FAILOVER.equals(exception.getErrorCode())) { return; } if (logger.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("onException(" + exception + ")"); } if (isDestroyed.get()) { if (logger.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("Ignoring error on already destroyed connection " + this, exception); } return; } ActiveMQRALogger.LOGGER.handlingJMSFailure(exception); try { connection.setExceptionListener(null); } catch (JMSException e) { logger.debug("Unable to unset exception listener", e); } ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, exception); sendEvent(event); }
connection.setExceptionListener(null); } catch (JMSException e) { logger.debug("Error unsetting the exception listener " + this, e);
connection.setExceptionListener(null); } catch (JMSException e) { logger.debug("Error unsetting the exception listener " + this, e);
connection.setExceptionListener(this); connection.setExceptionListener(this); connection.setExceptionListener(this);
connection.setExceptionListener(this); connection.setExceptionListener(this); connection.setExceptionListener(this);