Skip to content

Use HibernateJpaVendorAdapter to configure Hibernate with a BeanContainer and JtaPlatform #48969

@mauromol

Description

@mauromol

Using Spring Boot 4.0.2.
Spring Boot is providing SpringJtaPlatform which implements Hibernate JtaPlatform interface.

However, now the Spring Framework has ConfigurableJtaPlatform, which in addition also uses the TransactionSynchronizationRegistry if available (and Spring's JtaTransactionManager can indeed carry it). The Spring Framework is using it in LocalSessionFactoryBuilder, taking data from a JtaTransactionManager.
Not sure about the benefits of using the TransactionSynchronizationRegistry if available... but, anyway, isn't ConfigurableJtaPlatform now a more comprehensive solution?

The only problem I see (while trying to use ConfigurableJtaPlatform myself in place of SpringJtaPlatform) is that the former has package-private visibility.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions