jbosstm/narayana — pull request #598 by sebplorenz (2014-02-14 07:40:20+00:00)
Title: Deferred exceptions second attempt

This is my second attempt for handling deferred exceptions. The first approach only worked for a single resource. This one works for multiple resources enlisted in a JTA transaction.
1. I moved the ExceptionDeferrer interface to ArjunaJTA.
2. XAOnePhaseResource and XAResourceRecord implement ExceptionDeferrer.
3. Each time TransactionImple wraps an XAResource into an ExceptionDeferrer it adds the ExceptionDeferrer to a list.
4. Before TransactionImple throws an exception during commit it will add all deferred exceptions from the ExceptionDeferrerS to the suppressed throwables of the exception to be thrown.