/** * Log the given exception at warn level, provided that warn logging has been activated through the {@link * #setWarnLogCategory "warnLogCategory"} property. * * <p>Calls {@link #buildLogMessage} in order to determine the concrete message to log. Always passes the full * exception to the logger. * * @param ex the exception that got thrown during handler execution * @param messageContext current message context request * @see #setWarnLogCategory * @see #buildLogMessage * @see org.apache.commons.logging.Log#warn(Object, Throwable) */ protected void logException(Exception ex, MessageContext messageContext) { if (this.warnLogger != null && this.warnLogger.isWarnEnabled()) { this.warnLogger.warn(buildLogMessage(ex, messageContext), ex); } }
/** * Default implementation that checks whether the given {@code endpoint} is in the set of {@link * #setMappedEndpoints mapped endpoints}. * * @see #resolveExceptionInternal(MessageContext,Object,Exception) */ @Override public final boolean resolveException(MessageContext messageContext, Object endpoint, Exception ex) { Object mappedEndpoint = endpoint instanceof MethodEndpoint ? ((MethodEndpoint) endpoint).getBean() : endpoint; if (mappedEndpoints != null && !mappedEndpoints.contains(mappedEndpoint)) { return false; } // Log exception, both at debug log level and at warn level, if desired. if (logger.isDebugEnabled()) { logger.debug("Resolving exception from endpoint [" + endpoint + "]: " + ex); } logException(ex, messageContext); return resolveExceptionInternal(messageContext, endpoint, ex); }
/** * Default implementation that checks whether the given {@code endpoint} is in the set of {@link * #setMappedEndpoints mapped endpoints}. * * @see #resolveExceptionInternal(MessageContext,Object,Exception) */ @Override public final boolean resolveException(MessageContext messageContext, Object endpoint, Exception ex) { Object mappedEndpoint = endpoint instanceof MethodEndpoint ? ((MethodEndpoint) endpoint).getBean() : endpoint; if (mappedEndpoints != null && !mappedEndpoints.contains(mappedEndpoint)) { return false; } // Log exception, both at debug log level and at warn level, if desired. if (logger.isDebugEnabled()) { logger.debug("Resolving exception from endpoint [" + endpoint + "]: " + ex); } logException(ex, messageContext); return resolveExceptionInternal(messageContext, endpoint, ex); }
/** * Default implementation that checks whether the given <code>endpoint</code> is in the set of {@link * #setMappedEndpoints mapped endpoints}. * * @see #resolveExceptionInternal(MessageContext,Object,Exception) */ public final boolean resolveException(MessageContext messageContext, Object endpoint, Exception ex) { Object mappedEndpoint = endpoint instanceof MethodEndpoint ? ((MethodEndpoint) endpoint).getBean() : endpoint; if (mappedEndpoints != null && !mappedEndpoints.contains(mappedEndpoint)) { return false; } // Log exception, both at debug log level and at warn level, if desired. if (logger.isDebugEnabled()) { logger.debug("Resolving exception from endpoint [" + endpoint + "]: " + ex); } logException(ex, messageContext); return resolveExceptionInternal(messageContext, endpoint, ex); }
/** * Log the given exception at warn level, provided that warn logging has been activated through the {@link * #setWarnLogCategory "warnLogCategory"} property. * * <p>Calls {@link #buildLogMessage} in order to determine the concrete message to log. Always passes the full * exception to the logger. * * @param ex the exception that got thrown during handler execution * @param messageContext current message context request * @see #setWarnLogCategory * @see #buildLogMessage * @see org.apache.commons.logging.Log#warn(Object, Throwable) */ protected void logException(Exception ex, MessageContext messageContext) { if (this.warnLogger != null && this.warnLogger.isWarnEnabled()) { this.warnLogger.warn(buildLogMessage(ex, messageContext), ex); } }
/** * Default implementation that checks whether the given {@code endpoint} is in the set of {@link * #setMappedEndpoints mapped endpoints}. * * @see #resolveExceptionInternal(MessageContext,Object,Exception) */ @Override public final boolean resolveException(MessageContext messageContext, Object endpoint, Exception ex) { Object mappedEndpoint = endpoint instanceof MethodEndpoint ? ((MethodEndpoint) endpoint).getBean() : endpoint; if (mappedEndpoints != null && !mappedEndpoints.contains(mappedEndpoint)) { return false; } // Log exception, both at debug log level and at warn level, if desired. if (logger.isDebugEnabled()) { logger.debug("Resolving exception from endpoint [" + endpoint + "]: " + ex); } logException(ex, messageContext); return resolveExceptionInternal(messageContext, endpoint, ex); }
/** * Log the given exception at warn level, provided that warn logging has been activated through the {@link * #setWarnLogCategory "warnLogCategory"} property. * * <p>Calls {@link #buildLogMessage} in order to determine the concrete message to log. Always passes the full * exception to the logger. * * @param ex the exception that got thrown during handler execution * @param messageContext current message context request * @see #setWarnLogCategory * @see #buildLogMessage * @see org.apache.commons.logging.Log#warn(Object, Throwable) */ protected void logException(Exception ex, MessageContext messageContext) { if (this.warnLogger != null && this.warnLogger.isWarnEnabled()) { this.warnLogger.warn(buildLogMessage(ex, messageContext), ex); } }
/** * Log the given exception at warn level, provided that warn logging has been activated through the {@link * #setWarnLogCategory "warnLogCategory"} property. * <p/> * Calls {@link #buildLogMessage} in order to determine the concrete message to log. Always passes the full * exception to the logger. * * @param ex the exception that got thrown during handler execution * @param messageContext current message context request * @see #setWarnLogCategory * @see #buildLogMessage * @see org.apache.commons.logging.Log#warn(Object, Throwable) */ protected void logException(Exception ex, MessageContext messageContext) { if (this.warnLogger != null && this.warnLogger.isWarnEnabled()) { this.warnLogger.warn(buildLogMessage(ex, messageContext), ex); } }