Chapter 9. Exception handling and transaction management with Mule

 

This chapter covers

  • Error handling strategies
  • Using transaction mechanisms in Mule
  • Using transaction demarcation

Dealing with the unexpected is an unfortunate reality when you’re writing software. Through the use of exceptions, the Java platform provides a framework for dealing with events of this sort. Exceptions occur when unanticipated events arise in a system. These events include network failures, I/O issues, and authentication errors. When you control a system, you can anticipate these events and provide a means to recover from them. This luxury is often absent in a distributed integration environment. Remote applications you have no control over will fail for no apparent reason or supply malformed data. A messaging broker somewhere in your environment might begin to refuse connections. Your mail server’s disk may fill up, prohibiting you from downloading emails. Your own code might even have a bug that’s causing your data to be routed improperly. In any case, it’s undesirable for your entire application to fail because of a single unanticipated error.

9.1. Dealing with errors

9.2. Using transactions with Mule

9.3. Summary

sitemap