aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Pitts (JIRA)" <>
Subject [jira] [Issue Comment Deleted] (ARIES-1497) jpa-support XAJpaTemplate does not properly handle RollbackException
Date Tue, 03 Jan 2017 13:41:58 GMT


Matthew Pitts updated ARIES-1497:
    Comment: was deleted

(was: I will be out of the office from Monday, December 26th through Monday, January 2nd.

If you need general automation assistance during this time please contact the whole team via
our group email -

If you have an urgent need during this time, please contact one of the following individuals

Rich Fix (
Kurt Whitsel (
Chris Stamp (

I can also be reached via my cell - 336.202.3913 - for immediate production problems.

> jpa-support XAJpaTemplate does not properly handle RollbackException
> --------------------------------------------------------------------
>                 Key: ARIES-1497
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>          Components: JPA
>    Affects Versions: jpa-2.3.0
>            Reporter: Matthew Pitts
>            Assignee: Christian Schneider
>         Attachments: jpa-support-RollbackException-handling.patch
> There are a couple of problems addressed here: 
> 1. No checked exceptions ever reach the safeRollback method in XAJpaTemplate. This is
due to the fact that safeFinish catches and wraps via wrapThrowable. This means that the shouldRollback
logic will always (or almost always) be true, because no checked exceptions have the opportunity
to bubble-up as-is from safeFinish.
> 2. Because of the above problem, javax.transaction.RollbackException events are not properly
handled since they result in another rollback attempt.
> The proposed fix (and patch) is to allow RollbackExceptions to bubble up from safeFinish,
thus allowing for their direct passing to safeRollback. Basically, because this is a checked
exception, shouldRollback will be false during safeRollback handling, thus preventing a rollback
attempt while this exception is propagating. Additionally, because safeRollback calls safeFinish
which ultimately calls the corresponding TransactionAttribute.finish method, then the logic
therein to issue a rollback in the event of STATUS_MARKED_ROLLBACK will be executed when this
exception is propagating. Thus, no other special handling is really required.
> Please validate and correct my statement of the problem and my fix.

This message was sent by Atlassian JIRA

View raw message