spring-framework / org.springframework.orm.hibernate5 / HibernateTransactionManager / setAutodetectDataSource

setAutodetectDataSource

open fun setAutodetectDataSource(autodetectDataSource: Boolean): Unit

Set whether to autodetect a JDBC DataSource used by the Hibernate SessionFactory, if set via LocalSessionFactoryBean's setDataSource. Default is "true".

Can be turned off to deliberately ignore an available DataSource, in order to not expose Hibernate transactions as JDBC transactions for that DataSource.

See Also
#setDataSource