Skip to content

Wrong TransactionManager selected when mixing @Transactional with and w/o qualifier [SPR-12606] #17207

Closed

Description

@spring-projects-issues

Alexander Imfeld opened SPR-12606 and commented

When using multiple TransactionManagers and declarative transaction management with @Transactional (with and w/o qualifier) and @EnableTransactionManagement, the TransactionInterceptor will lookup and store the default transaction manager in TransactionAspectSupport#determineTransactionManager in case there is no qualifier. This TransactionManager will then also be used in case there actually is a qualifier (as soon as a transactionManager is set it in determineTransactionManager, it will be used for all further calls).

Seems to me it's not possible to have multiple TransactionManagers (e.g. 'transactionManager' and 'anotherTransactionManager) and mix qualified with non-qualified Transactional annotations (e.g. @Transactional and @Transactional("anotherTransactionManager"))

Shouldn't qualifier based TransactionManager lookup be the primary mechanism to determine the TransactionManager in TransactionAspectSupport?


Affects: 4.1.3

Issue Links:

Activity

  1. spring-projects-issues commented on Jan 9, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    I suppose this has been fixed along with #17145 for the 4.1.4 release already. Please upgrade to 4.1.4 and double-check that...

    Note that there has been a side effect of that 4.1.4 fix which has been fixed for the upcoming 4.1.5 (#17178) and is available in recent 4.1.5 snapshots. Please try such a snapshot in case any problems remain with 4.1.4 for you.

    Juergen

  2. added
    type: bug
    in: data
    on Jan 11, 2019
  3. added this to the 4.1.4 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: datatype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions