Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.3 M2
-
Component/s: Core: Exception Handling
-
Labels:None
-
User impact:Medium
-
Effort points:3
-
Similar Issues:None
-
Effort:S
-
% Users Impacted:>80%
-
Value:5
Description
Acceptance Criteria
- Must be able to redefine default exception strategy for flows and services in a single place.
- If a flow or service is configured without an explicitly defined exception strategy the custom default exception strategy is used.
- If there's a global exception strategy configured and no other exception strategy configured then flows / services must use that exception strategy.
When:<mule> <configuration defaultExceptionStrategy-ref="dlqExceptionStrategy"/> <catch-exception-strategy name="dlqExceptionStrategy"> <jms:outbound-endpoint queue="dlq"> <jms:transaction action="ALWAYS_BEGIN"/> </jms:outbound-endpoint> </catch-exception-strategy> <flow name="A"> ... </flow> <model> <service name="B"> ... </service> </model> </mule>
Then:
- flow A uses exception strategy defined in global-exception-strategy
- service B uses exception strategy defined in global-exception-strategy
- If there's a global exception strategy configured, an exception strategy configured for a model then services within that model must use exception strategy configured in the model.
When:<mule> <configuration defaultExceptionStrategy-ref="dlqExceptionStrategy"/> <catch-exception-strategy name="dlqExceptionStrategy"> <jms:outbound-endpoint queue="dlq"> <jms:transaction action="ALWAYS_BEGIN"/> </jms:outbound-endpoint> </catch-exception-strategy> <flow name="A"> ... </flow> <model> <default-exception-strategy> ... </default-exception-strategy> <service name="B"> ... </service> </model> </mule>
Then:
- flow A uses exception strategy defined within it
- service B uses exception strategy defined within model
- If there's a global exception strategy configured, an exception strategy configured in a model and a service with a configured exception strategy within that model, then for that service the exception strategy to use must be the one defined in the service.
When:<mule> <configuration defaultExceptionStrategy-ref="dlqExceptionStrategy"/> <catch-exception-strategy name="dlqExceptionStrategy"> <jms:outbound-endpoint queue="dlq"> <jms:transaction action="ALWAYS_BEGIN"/> </jms:outbound-endpoint> </catch-exception-strategy> <flow name="A"> ... <default-exception-strategy> ... </default-exception-strategy> </flow> <flow name="B"> ... </flow> <model> <default-exception-strategy> ... </default-exception-strategy> <service name="C"> ... <default-exception-strategy> ... </default-exception-strategy> </service> <service name="D"> ... </service> </model> </mule>
Then:
- flow A uses exception strategy defined within it
- flow B uses global exception strategy
- service C uses exception strategy defined within it
- service D uses exception strategy defined within model
Documentation http://www.mulesoft.org/documentation/display/MULECDEV/Error+Handling+Reuse+Documentation