746 Commits
Author SHA1 Message Date
Juergen Hoeller 8a511726cd Consistent JPA/Hibernate transaction interoperability
Closes gh-37273
2026-09-14 15:54:43 +02:00
Brian Clozel 280861e7ee Add missing proxy hints for Hibernate 8's MutationOrSelectionQuery
Prior to this commit, Hibernate 8 types extending
`MutationOrSelectionQuery` would fail proxying at runtime in native
images because reflection hints were not registered at build time.

While the `MutationOrSelectionQueryImpl` case can be solved with an
additional proxy hint, `NativeMutationOrSelectionQueryImpl` is
impossible to solve that way due to multi interface mismatch.
This was found in gh-36878 and handled with a fallback proxy.

In this case, native image will throw a
`MissingReflectionRegistrationError` - but obviously we cannot depend on
this type in JVM applications. `MissingReflectionRegistrationError`
extends `LinkageError`, which we will use along
IllegalArgumentException` to detect that the proxying operation failed
and that we should use the fallback.

This commit also register a proxy hint for the said fallback.

Fixes gh-37251
2026-09-09 10:35:25 +02:00
Brian Clozel 486db005a1 Add missing Hibernate reflection hints
This commit adds the missing reflection hints for Hibernate 8 support:
`PersistenceUnitInfoDescriptor` and `StatelessSession`.

Fixes gh-37247
Fixes gh-37249
2026-09-07 09:34:38 +02:00
Juergen Hoeller 8a64fe9c45 Fix accidental bypass of registerStoredProcedureParameter
Closes gh-37221
2026-08-31 17:30:56 +02:00
Juergen Hoeller 178eb17191 Remove lock around transform step
Closes gh-37199
2026-08-31 10:52:35 +02:00
Juergen Hoeller 133a372f91 Reduce lock-guarded boolean field to thread-local
Closes gh-37199
2026-08-29 20:00:24 +02:00
Juergen Hoeller 9aeda49273 Polishing 2026-08-12 00:08:59 +02:00
Juergen Hoeller 6d04ea9e84 Check existing database transaction against UnitOfWork
See gh-37085
2026-07-31 16:24:09 +02:00
Juergen Hoeller 8fa7d88a0c Avoid getConnection lock for existing database transaction
Closes gh-37085
2026-07-29 11:30:17 +02:00
Juergen Hoeller 0b5a9ea30a Adapt query proxy if necessary (for compatibility with Hibernate 8.0)
Closes gh-36878
2026-06-09 22:40:22 +02:00
Juergen Hoeller 175c1f9437 Runtime compatibility with JPA 4.0 M4
Closes gh-36784
2026-05-29 13:28:46 +02:00
Juergen Hoeller 8fe1de4595 Polishing 2026-05-13 19:46:07 +02:00
Juergen Hoeller b7882d703c Expose package-info classes through PersistenceUnitInfo#getAllClassNames()
Closes gh-36784
2026-05-12 13:09:51 +02:00
Yanming Zhou bfb88cfc1c Remove unnecessary invocations of toString()
Closes gh-36709

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2026-04-27 11:27:29 +03:00
Sam Brannen a40ec44cb7 Convert assertThat(x instanceof X).isTrue() to assertThat(x).isInstanceOf()
Search:  assertThat\((.+?) instanceof (.+?)\)(.*?)\.isTrue\(\)

Replace: assertThat($1)$3.isInstanceOf($2.class)

See gh-36504
2026-03-20 10:54:23 +01:00
Sam Brannen 4c14abf0cd Remove obsolete "test" prefix from test method names
Although this commit also changes the visibility of some test methods
to package-private, the remainder of that task will be addressed in
conjunction with gh-36496.

Closes gh-36495
2026-03-18 18:16:15 +01:00
Sam Brannen 17699103dc Consistently use American English spelling
Since the Spring Framework uses American English spelling, this commit
updates Javadoc and the reference manual to ensure consistency in that
regard. However, there are two exceptions to this rule that arise due
to their use within a technical context.

- We use "cancelled/cancelling" instead of "canceled/canceling" in
  numerous places (including error messages).
- We use "implementor" instead of "implementer".

Closes gh-36470
2026-03-15 17:04:23 +01:00
Juergen Hoeller 4734c15d81 Polishing 2026-03-03 23:28:37 +01:00
Juergen Hoeller 36815f4021 Add support for JPA 4.0 FlushModeType.EXPLICIT
Includes defensive nullable field access in EclipseLinkConnectionHandle.

Closes gh-36401
2026-02-28 19:37:27 +01:00
Sam Brannen 59b9057e59 Polishing 2026-02-25 10:52:28 +01:00
Juergen Hoeller 394a97d7e0 Add setPackagesToScan to LocalEntityManagerFactoryBean (and make setDataSource work)
Includes fix for consistent PersistenceException in case of no unit found for name.
Includes proper tests for Local(Container)EntityManagerFactoryBean with scan setup.

Closes gh-36270
Closes gh-36271
2026-02-08 17:54:02 +01:00
Juergen Hoeller 05ffe8249f Adapt to getAllClassNames SPI (post JPA 4.0 M1)
See gh-35705
2026-02-07 21:01:25 +01:00
Juergen Hoeller 3666ad9d7f Derive StatelessSession from primary Session in HibernateJpaDialect
This is analogous to LocalSessionFactoryBean's SpringSessionContext.

See gh-36025
2026-02-06 00:18:00 +01:00
Juergen Hoeller 652d509cfc Avoid direct javadoc reference to JPA 4.0 EntityAgent class
See gh-36025
2026-02-05 20:13:20 +01:00
Juergen Hoeller 153c378bb2 Polishing 2026-02-05 20:01:47 +01:00
Juergen Hoeller cdbaa7f3a7 Early support for JPA 4.0 EntityAgent (autowiring a shared proxy)
Includes skipping of isOpen check on close where easily possible.

Closes gh-36025
2026-02-05 20:01:26 +01:00
Juergen Hoeller ac243fae65 Runtime compatibility with JPA 4.0.0-M1 and Hibernate ORM 8.0.0.Alpha1
Closes gh-35705
2026-02-03 19:13:48 +01:00
Juergen Hoeller 80a57c2468 Consistent references to Hibernate ORM 7.x 2026-01-27 20:46:30 +01:00
Juergen Hoeller 02e05b40b0 Polishing 2026-01-27 20:30:46 +01:00
Juergen Hoeller c8c99d0464 Support JtaTransactionManager/SpringBeanContainer on HibernateJpaVendorAdapter
Makes ConfigurableJtaPlatform public and removes outdated WebSphere UOW check.

Closes gh-36216
2026-01-27 20:30:21 +01:00
Juergen Hoeller fd3bbb057e Polishing 2026-01-25 10:42:13 +01:00
Juergen Hoeller 22cf7958a5 Revise setPersistenceUnitName javadoc
Closes gh-36205
2026-01-25 10:38:24 +01:00
Juergen Hoeller 2b96a61063 Apply transactionIsolationLock in EclipseLinkConnectionHandle as well
Closes gh-36165
2026-01-16 23:12:07 +01:00
Juergen Hoeller 62fd09dfa5 Polishing 2026-01-14 22:05:06 +01:00
Yanming Zhou d3a385d222 Retain original requested bean class for SpringContainedBean
Closes GH-36115

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2026-01-09 19:52:22 +01:00
Sam Brannen e94aaab288 Improve exception message for JPA entity scanning 2026-01-07 13:13:27 +01:00
Juergen Hoeller 6d5a512d90 Suppress serial warning 2025-12-16 13:54:40 +01:00
Juergen Hoeller e2ab9cd5da Use composed cache key for different SmartFactoryBean object types
Closes gh-35974
2025-12-09 12:59:19 +01:00
Brian Clozel e0fd42981a Fix compilation warnings
See gh-35711
2025-11-17 15:24:44 +01:00
Juergen Hoeller 8999336458 Make SessionHolder publicly accessible for external resource management
Closes gh-35799
2025-11-12 14:14:04 +01:00
Sébastien Deleuze 687c40454f Merge branch '6.2.x' 2025-11-11 13:54:35 +01:00
Sébastien Deleuze 5aec239261 Add hints for entities package-private methods
Closes gh-35711
2025-11-11 13:52:59 +01:00
Juergen Hoeller 73dfd08526 Merge branch '6.2.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
#	spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
2025-11-08 10:03:18 +01:00
Juergen Hoeller 6f81cb625c Avoid unnecessary bridge method resolution around getMostSpecificMethod
Closes gh-35780
2025-11-08 09:16:31 +01:00
Juergen Hoeller 585b4e08e8 Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
#	spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesBeanRegistrationAotProcessor.java
#	spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesBeanRegistrationAotProcessorTests.java
2025-11-05 12:54:30 +01:00
Juergen Hoeller 0243059f53 Polishing 2025-11-05 12:22:56 +01:00
Sébastien Deleuze 694224f1a6 Remove outdated Spring version mentions
Close gh-35696
2025-10-28 13:58:09 +01:00
Sam Brannen 24b50650d7 Suppress warnings 2025-10-26 16:06:08 +01:00
Juergen Hoeller b85993c7cb Add test for HibernatePersistenceConfiguration
See gh-35662
2025-10-19 10:45:57 +02:00
Juergen Hoeller 228662ad9f Derive StatelessSession from transactional Session on Hibernate 7.2
Closes gh-35664
See gh-7184
2025-10-19 10:45:43 +02:00