以下是流程的异常策略部分
<choice-exception-strategy doc:name="Choice Exception Strategy">
<catch-exception-strategy when="exception.causedBy(java.sql.BatchUpdateException)" doc:name="SQL deadlock error">
<logger message="SQL EXCEPTION - RETRYING BATCH PROCESS"
level="ERROR" doc:name="Payload Logger" category="asi_user"/>
<set-variable variableName="Exception" value="User" doc:name="Exception Type"/>
<flow-ref name="Reload_Batch" doc:name="Retry Batch Results"/>
</catch-exception-strategy>
<catch-exception-strategy when="exception.causedBy(com.microsoft.sqlserver.jdbc.SQLServerException)" doc:name="SQL error">
<logger message="SQL EXCEPTION - RETRYING BATCH PROCESS"
level="ERROR" category="asi_user" doc:name="Payload Logger" />
<set-variable variableName="Exception" value="User" doc:name="Exception Type"/>
<flow-ref name="Reload_Batch" doc:name="Retry Batch Results"/>
</catch-exception-strategy>
<catch-exception-strategy doc:name="Unexpected errors">
<logger message="UNEXPECTED EXCEPTION - SEND EMAIL NOTIFICATION"
level="ERROR" category="asi_user" doc:name="Payload Logger" />
<set-payload value="#[exception.cause.message]" doc:name="Set Payload"/>
<flow-ref name="Send_Error_Notification" doc:name="Send Email Notification"/>
</catch-exception-strategy>
</choice-exception-strategy>
即使从流程中抛出 java.sql.BatchUpdateException,控制也会进入最终的异常策略“Unexpected Errors”,它不会进入 SQL 死锁错误
我是否缺少任何使它起作用的东西。
任何人都可以帮我解决这个问题。我使用的是 Mule server 3.4.0 EE
先感谢您