Skip to content

Missing @Configuration annotation will cause transaction not working [SPR-9479] #14114

Closed
@spring-projects-issues

Description

@spring-projects-issues

Simon Wong opened SPR-9479 and commented

The Spring reference didn't mention that I MUST use @Configuration for the configuration class being imported. And I found that the bean could be created normally most of the time.

The case I found that if @Configuration is missing, transaction is not behave normally in some cases.

I have setup a simple program to illustrate this. Please refer to "readme.txt" for the running procedures. From the log, I have checked that the transaction commit command has been issued, but the end result is the value is not committed.

In the example, I have already used SingleConnectionDataSource, to avoid multiple database connection issue.

I have also tried to move the @EnableTransactionManagement and transactionManager() to other Spring Java Config class (no matter with/without @Configuration), but the problem still occurs.


Affects: 3.1.1

Attachments:

Issue Links:

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions