Skip to content

Transaction manager cache fails to repopulate when multiple transaction managers defined [SPR-14609] #19177

Closed

Description

@spring-projects-issues

Tim Lenz opened SPR-14609 and commented

When TransactionAspectSupport is initialized, the transaction manager cache is populated by the setTransactionManager method. At this point there can be multiple TransactionInterceptor instances defined, each with its own cache, with no conflicts.

However, as soon as the transaction cache entry in TransactionAspectSupport is cleared by the garbage collector, the transaction manager bean is then looked up by type, which leads to a NoUniqueBeanDefinitionException if multiple transaction managers are defined in your application context.

This is a regression caused by #19080.


Affects: 4.3.2

Issue Links:

Activity

  1. spring-projects-issues commented on Aug 24, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    This is the trigger to undo #19080 for the (still unreleased) 4.2.8, whereas we'll try to fix it retaining #19080 for 4.3.3.

  2. spring-projects-issues commented on Aug 24, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    TransactionAspectSupport stores a given PlatformTransactionManager instance as a strong reference (again) while retaining the soft cache for retrieved PlatformTransactionManager beans.

  3. added
    type: regression
    in: data
    on Jan 11, 2019
  4. added this to the 4.3.3 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: regression

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions