-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement
Milestone
Description
MIhalcea Vlad opened SPR-16956 and commented
By default, @Transactional(readOnly = true) sets the FlushMode to MANUAL. However, Hibernate can save up lots of memory by discarding the associated hydrated state if we also set the session.setDefaultReadOnly(true).
Not only that we save memory, but we also save CPU cycles because, if the user tries to do a manual flush, we won't propagate it to any entity since they are virtually read-only.
Affects: 5.0.7
Issue Links:
- Support for Hibernate ORM 5.3 [SPR-16303] #20850 Support for Hibernate ORM 5.3
- Support Hibernate 5.3's ManagedBeanRegistry for dependency injection [SPR-16305] #20852 Support Hibernate 5.3's ManagedBeanRegistry for dependency injection
- Propagate read-only status as FlushMode.MANUAL to Query instances [SPR-15759] #20314 Propagate read-only status as FlushMode.MANUAL to Query instances
- HibernateTransactionManager (unintentionally) bound to Hibernate 5.2 SharedSessionContractImplementor [SPR-17557] #22089 HibernateTransactionManager (unintentionally) bound to Hibernate 5.2 SharedSessionContractImplementor
- LocalSessionFactoryBean and HibernateTransactionManager for JPA EntityManagerFactory setup [SPR-17002] #21540 LocalSessionFactoryBean and HibernateTransactionManager for JPA EntityManagerFactory setup
- HibernateTransactionManager should lazily acquire JDBC Connection (like HibernateJpaDialect) [SPR-17216] #21749 HibernateTransactionManager should lazily acquire JDBC Connection (like HibernateJpaDialect)
- HibernateJpaDialect cannot translate JDBCException to custom DataAccessException [SPR-17015] #21553 HibernateJpaDialect cannot translate JDBCException to custom DataAccessException
Referenced from: pull request #1861, and commits 010ba33, d22d408
0 votes, 5 watchers
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement