Analogous to HibernateTransactionManager, there is a "prepareConnection" flag on HibernateJpaDialect which allows for overriding the actual mode of operation. This is easily accessible from HibernateJpaVendorAdapter now which declares HibernateJpaDialect from its getJpaDialect() method.
Issue: SPR-8959
Issue: SPR-11942
HibernateEntityManagerFactoryIntegrationTests in the spring-orm module
has been disabled for quite some time due to a dependency on the
AnnotationBeanConfigurerAspect from the spring-aspects module. Since
spring-aspects depends on spring-orm, a cyclical dependency would
result if this code were re-enabled "as is".
This commit removes the dependency on AnnotationBeanConfigurerAspect in
HibernateEntityManagerFactoryIntegrationTests by deleting all test code
and configuration related to @Configurable. In addition, this commit
also deletes all SessionFactory-specific test code in
HibernateEntityManagerFactoryIntegrationTests, allowing the test class
to focus on Hibernate as a JPA provider.
Issue: SPR-11922
This commit deletes all test annotations from the spring-orm module in
order to reduce unnecessary confusion between these "copies" and the
real, current versions of such classes in the spring-test module.
Furthermore, the legacy abstract JUnit 3.8 base classes and test cases
have been refactored accordingly.
Prior to this commit, the codebase was using a mix of log4j.xml
and log4j.properties for test-related logging configuration. This
can be an issue as log4j takes the xml variant first when looking
for a default bootstrap configuration.
In practice, some modules declaring the properties variant were
taking the xml variant configuration from another module.
The general structure of the configuration has also been
harmonized to provide a standard console output as well as an
easy way to enable trace logs for the current module.
- Fix Javadoc in HibernateTemplate so that it compiles in Eclipse.
- Suppress generics warnings in HibernateTemplateTests.
- Remove unnecessary deprecation warning suppression in constructor for
LocalSessionFactoryBuilder.
Note that this variant of HibernateTemplate is stripped down in terms of Session management options and just provides a current-session style with a fallback to a temporary session-per-operation. Furthermore, in the latter fallback mode, only read operations are supported, just like with a JPA EntityManager.
Issue: SPR-11291