Created
September 4, 2018 14:40
-
-
Save phaelfp/329f3b7e0a4348c1e99010de2e6bcaa7 to your computer and use it in GitHub Desktop.
Exemplo de tratamento de exception Mule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <choice-exception-strategy doc:name="Choice Exception Strategy"> | |
| <catch-exception-strategy doc:name="Catch Exception Strategy" when="#[exception.causedBy(org.mule.api.transformer.TransformerException)]"> | |
| <set-payload doc:name="Set Payload" value="#[payload]"> | |
| <jms:outbound-endpoint connector-ref="Active_MQ" doc:name="JMS" queue="Dead.Letter.Invalid.Data"> | |
| </jms:outbound-endpoint></set-payload></catch-exception-strategy> | |
| <catch-exception-strategy doc:name="Catch Database Connection Exception" when="#[exception.causedBy(java.sql.SQLException)]"> | |
| <set-payload doc:name="Set Payload" value="#[payload]"> | |
| <jms:outbound-endpoint connector-ref="Active_MQ" doc:name="JMS" queue="Dead.Letter.Invalid.Data"> | |
| </jms:outbound-endpoint></set-payload></catch-exception-strategy> | |
| <catch-exception-strategy doc:name="Catch ActiveMQ Connection Exception" when="#[exception.causedBy(java.lang.Exception)]"> | |
| <set-payload doc:name="Set Payload" value="The request cannot be processed, the error is #[exception.getSummaryMessage()] "> | |
| <logger doc:name="Logger" level="INFO" message="Unexpected Exception: #[payload]"> | |
| </logger></set-payload></catch-exception-strategy> | |
| </choice-exception-strategy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment