Description
mishraawake opened SPR-17216 and commented
We are trying to implement the feature “provider_disables_autocommit” in our application.
Problem context in our application: We have a manager class which has complex business logic. We configured HibernateTransactionManager around the methods of manager class.
In many cases, we simply returns from the manager without touching the database.
This option of hibernate seems very promising to us. However, we observe there are some caveat with the option.
. To implement this is via spring HibernateTransactionManager, we have to set txManager.setPrepareConnection(false), txManager.setAutodetectDataSource(false) , otherwise it tries to acquire connection when transaction is starting. Is there a negative impact of this?
Affects: 5.0.8
Issue Links:
- LocalSessionFactoryBean and HibernateTransactionManager for JPA EntityManagerFactory setup [SPR-17002] #21540 LocalSessionFactoryBean and HibernateTransactionManager for JPA EntityManagerFactory setup
- Propagate read-only status to Hibernate Session through setDefaultReadOnly [SPR-16956] #21494 Propagate read-only status to Hibernate Session through setDefaultReadOnly
- HibernateTransactionManager (unintentionally) bound to Hibernate 5.2 SharedSessionContractImplementor [SPR-17557] #22089 HibernateTransactionManager (unintentionally) bound to Hibernate 5.2 SharedSessionContractImplementor
- Notification for db connection acquired when LazyConnectionDataSourceProxy is used [SPR-17278] #21811 Notification for db connection acquired when LazyConnectionDataSourceProxy is used
Referenced from: commits 78cad0f