<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
    <bean id="errorManager" class="org.mule.samples.errorhandler.ErrorManager">
        <property name="handlers">
            <list>
                <ref local="fatalHandler"/>
                <ref local="defaultHandler"/>
                <ref local="businessHandler"/>
            </list>
        </property>
    </bean>

    <bean id="businessErrorManager" class="org.mule.samples.errorhandler.BusinessErrorManager"/>

    <bean id="defaultHandler" class="org.mule.samples.errorhandler.handlers.DefaultHandler">
        <property name="endpointName">
            <value>ExceptionFileWriter</value>
        </property>
        <property name="errorManager">
            <ref local="errorManager"/>
        </property>
    </bean>

    <bean id="fatalHandler" class="org.mule.samples.errorhandler.handlers.FatalHandler">
        <property name="endpointName">
            <value>ExceptionEmailer</value>
        </property>
        <property name="errorManager">
            <ref local="errorManager"/>
        </property>
    </bean>

    <bean id="businessHandler" class="org.mule.samples.errorhandler.handlers.BusinessHandler">
        <property name="endpointName">
            <value>ExceptionQueue</value>
        </property>
        <property name="errorManager">
            <ref local="errorManager"/>
        </property>
    </bean>
</beans>