Red Hat Bugzilla – Bug 984849
Runtime and checked exceptions are handled differently from auditors POV
Last modified: 2015-08-02 19:44:10 EDT
When a checked exception is thrown then it is handled by provider processor but when runtime exception is thrown it is handled by error processor. This can lead into different behaviour and introduce hard-to-find bugs.
An example is attached - see test OrderServiceTest. A service is called twice once throwing checked and once unchecked exception.
Diff files f1.txt and f2.txt in reproducer to see that different processors are in place.
Created attachment 774055 [details]
The internal handling of these exceptions is different, so I would expect the audit behavior to be different as well. Auditors are intended as low-level debugging tools and are tightly integrated with the bus behavior in SY. User applications should use these sparingly and should not use them at all to influence runtime behavior. ExchangeInterceptors, on the other hand, should be very predictable and can be used by end users in both test and runtime.