Skip to content

Doc: Nested declarative transaction management leads to UnexpectedRollbackException in case of a silent inner setRollbackOnly call [SPR-3452] #8135

@spring-projects-issues

Description

@spring-projects-issues

Thomas Hoppe opened SPR-3452 and commented

Hi,

First off: I'm not sure whether this is really a bug!

As I could not get a hint in the forum, nor the documentation, on the
topic discussed here:

http://forum.springframework.org/showthread.php?t=36298

I'm filing this as a bug.

A similar problem is described here:
http://forum.springframework.org/showthread.php?t=26574

The author describes his problem with an UnexpectedRollbackException
and Jürgen Höller responds that ...in the case of nested transactions with JTA, you have to roll back in the outer most transaction...

I think I'm doing this by defining propagation="REQUIRED" for nested method calls but rolling back only works when I roll back in the outer most method.
But why? With propagation="REQUIRED" all nested method invocations should pick up
the transaction of the outer most method (I confirmed this by looking at the debug output)


Affects: 2.0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: taskA general task

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions