You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
@Configuration
("duplicates")The text was updated successfully, but these errors were encountered: