Skip to content

support for multiple transaction managers with @Transactional / <tx:annotation-driven> [SPR-3955] #8635

@spring-projects-issues

Description

@spring-projects-issues

Brad C. opened SPR-3955 and commented

the @Transactional annotation / tx:annotation-driven feature only supports one transaction manager. The tx:annotation-driven xml configuration does permit naming a specific transaction manager for use, and the XSD schema permits multiple tx:annotation-driven elements, however there is no way to specify which transaction manager to use in the @Transactional annotation.

This is a proposal to add an optional field to the @Transactional annotation for specifying the bean name of the transaction manager to use. If a bean name is not specified, then it assumes there is only one tx:annotation-driven element in the xml and uses that transaction manager.

Of course, any better ideas to support multiple transaction managers with @Transactional are more than welcome.


Affects: 2.0.7

Issue Links:

Referenced from: commits 0698947

20 votes, 24 watchers

Metadata

Metadata

Assignees

Labels

has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importin: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions