-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Use JdbcTransactionManager in favor of DatasourceTransactionManager #23572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7558e4f
to
0113035
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I need to get back to the framework doc to better understand this change in the hierarchy. I've added a note for myself in the review, no need to act on it now.
@@ -47,17 +46,17 @@ | |||
@ConditionalOnClass({ JdbcTemplate.class, TransactionManager.class }) | |||
@AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE) | |||
@EnableConfigurationProperties(DataSourceProperties.class) | |||
public class DataSourceTransactionManagerAutoConfiguration { | |||
public class JdbcTransactionManagerAutoConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a breaking change as the name of the class is public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did consider changing only the configuration to return a JdbcTransactionManager
instead of a DataSourceTransactionManager
. I can still do that and revert this rename and only keep the implementation change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the rename and only kept the config change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks but I explicitly asked you to not act on it
I've added a note for myself in the review, no need to act on it now.
I might have to ask you to undo that based on further analysis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. I assumed you meant the change from DataSourceTransactionManager
to JdbcTransactionManager
and not the change in the name of the configuration. If I need to change it again or add a migration path of sorts please let me know.
Spring 5.3 introduced the JdbcTransactionManager with exception translation on commit and rollback. With this commit this transaction manager is going to be used in favor of the DataSourceTransactionManager used previously.
0113035
to
8a01411
Compare
Unfortunately, I made a typo while copying the reference of the issue. This was fixed by 9293b26 |
Spring 5.3 introduced the JdbcTransactionManager with exception translation
on commit and rollback. With this commit, this transaction manager is going
to be used in favour of the DataSourceTransactionManager used previously.