Skip to content

HibernateTransactionManager should lazily acquire JDBC Connection (like HibernateJpaDialect) [SPR-17216] #21749

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits 78cad0f

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions