SeamFramework.orgCommunity Documentation

Chapter 4. Framework Integration

4.1. Creating and Firing an ExceptionToCatchEvent
4.2. Default Handlers and Qualifiers
4.2.1. Default Handlers
4.2.2. Qualifiers

Integration of Seam Catch with other frameworks consists of one main step, and one other optional (but highly encouraged) step:

An ExceptionToCatchEvent is constructed by passing a Throwable and optionally qualifiers for handlers. Firing the event is done via CDI events (either straight from the BeanManager or injecting a Event<ExceptionToCatchEvent> and calling fire).

To ease the burden on the application developers, the integration should tie into the exception handling mechanism of the integrating framework, if any exist. By tying into the framework's exception handling, any uncaught exceptions should be routed through the Seam Catch system and allow handlers to be invoked. This is the typical way of using the Seam Catch framework. Of course, it doesn't stop the application developer from firing their own ExceptionToCatchEvent within a catch block.