Replies: 2 comments
-
another thing: i have been debugging my spring boot application and noticed:
In your test sourcecode i see that jdbi is defining explicitly a DataSourceTransactionManager: https://github.com/jdbi/jdbi/blob/d27dcc7f2ff392c960237fb35ede34499c3e51ca/spring5/src/test/resources/org/jdbi/v3/spring5/test-context.xml#L23C78-L23C106 Why you override it? is it not recommend to use the already created JdbiTransactionManager? might it it lead to unintentional behavior? |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
I have a spring boot application which is also using
@Transactional
annotations in the service layer.Question 1:
To make
@Transactional
work i have to wrap the DataSource either with TranscationAwareDataSourceProxy or use JDBI's SpringConnectionFactory when creating the JDBI bean. Which is the proper way?Question 2:
I saw in same code samples that a PlatformTransactionManager is defined. But it doesn't seem to be required to make the @transactional annotation work. What is the pupose of this bean? Should i always create an instance of this Bean in my configuration class ?
Beta Was this translation helpful? Give feedback.
All reactions