Skip to content
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

Add any TransactionExecutionListener beans to the auto-configured transaction manager #36770

Closed
wilkinsona opened this issue Aug 7, 2023 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@wilkinsona
Copy link
Member

Suggestion from Juergen:

Boot could automatically inject any TransactionExecutionListener beans in the context into a PlatformTransactionManager or ReactiveTransactionManager that it configures, along the following lines:

@Bean
public JdbcTransactionManager transactionManager(DataSource dataSource, Collection<TransactionExecutionListener transactionExecutionListeners) {
   JdbcTransactionManager tm = new JdbcTransactionManager();
   tm.setDataSource(dataSource);
   tm.setTransactionExecutionListeners(transactionExecutionListeners);
   return tm;
}
@snicoll
Copy link
Member

snicoll commented Aug 8, 2023

I'd like to fix #36801 before going forward as I implemented it as a customizer which make the problem more apparent.

@snicoll snicoll added the status: on-hold We can't start working on this issue yet label Aug 8, 2023
@snicoll snicoll removed their assignment Sep 28, 2023
@wilkinsona wilkinsona self-assigned this Sep 29, 2023
@wilkinsona wilkinsona removed the status: on-hold We can't start working on this issue yet label Sep 29, 2023
@wilkinsona wilkinsona modified the milestones: 3.2.x, 3.2.0-RC1 Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants