org.mule.service
Class DefaultServiceExceptionStrategy

java.lang.Object
  extended by org.mule.AbstractExceptionListener
      extended by org.mule.DefaultExceptionStrategy
          extended by org.mule.service.DefaultServiceExceptionStrategy
All Implemented Interfaces:
ExceptionListener, MuleContextAware, Disposable, Initialisable
Direct Known Subclasses:
CxfComponentExceptionStrategy

public class DefaultServiceExceptionStrategy
extends DefaultExceptionStrategy

DefaultServiceExceptionStrategy is the default exception handler for components. The handler logs errors and will forward the message and exception to an exception endpointUri if one is set on this Exception strategy


Field Summary
 
Fields inherited from class org.mule.AbstractExceptionListener
commitTxFilter, enableNotifications, endpoints, initialised, logger, muleContext, rollbackTxFilter
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
DefaultServiceExceptionStrategy()
           
 
Method Summary
protected  void defaultHandler(Throwable t)
           
protected  ServiceStatistics getServiceStatistics()
           
protected  void logFatal(MuleMessage message, Throwable t)
          Logs a fatal error message to the logging system.
protected  void routeException(MuleMessage message, ImmutableEndpoint failedEndpoint, Throwable t)
          Routes the current exception to an error endpoint such as a Dead Letter Queue (jms) This method is only invoked if there is a MuleMessage available to dispatch.
 
Methods inherited from class org.mule.DefaultExceptionStrategy
handleLifecycleException, handleMessagingException, handleRoutingException, handleStandardException, messageFromContextIfAvailable
 
Methods inherited from class org.mule.AbstractExceptionListener
addEndpoint, closeStream, dispose, doInitialise, exceptionThrown, fireNotification, getCommitTxFilter, getEndpoints, getEndpoints, getErrorMessagePayload, getExceptionType, getRollbackTxFilter, handleTransaction, initialise, isEnableNotifications, isInitialised, logException, removeEndpoint, rollbackTransaction, setCommitTxFilter, setEnableNotifications, setEndpoints, setMuleContext, setRollbackTxFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServiceExceptionStrategy

public DefaultServiceExceptionStrategy()
Method Detail

defaultHandler

protected void defaultHandler(Throwable t)
Overrides:
defaultHandler in class DefaultExceptionStrategy

logFatal

protected void logFatal(MuleMessage message,
                        Throwable t)
Description copied from class: AbstractExceptionListener
Logs a fatal error message to the logging system. This should be used mostly if an error occurs in the exception listener itself. This implementation logs the the message itself to the logs if it is not null

Overrides:
logFatal in class AbstractExceptionListener
Parameters:
message - The MuleMessage currently being processed
t - the fatal exception to log

routeException

protected void routeException(MuleMessage message,
                              ImmutableEndpoint failedEndpoint,
                              Throwable t)
Description copied from class: AbstractExceptionListener
Routes the current exception to an error endpoint such as a Dead Letter Queue (jms) This method is only invoked if there is a MuleMessage available to dispatch. The message dispatched from this method will be an ExceptionMessage which contains the exception thrown the MuleMessage and any context information.

Overrides:
routeException in class AbstractExceptionListener
Parameters:
message - the MuleMessage being processed when the exception occurred
failedEndpoint - optional; the endpoint being dispatched or received on when the error occurred. This is NOT the endpoint that the message will be disptched on and is only supplied to this method for logging purposes
t - the exception thrown. This will be sent with the ExceptionMessage
See Also:
ExceptionMessage

getServiceStatistics

protected ServiceStatistics getServiceStatistics()


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.