* `DefaultPersistenceUnitManager.java`
`dataSourceLookup` is initialized with a non-null `DataSourceLookup`, so `getDataSourceLookup()` does not return `null`.
* `TestContextTransactionUtils.java`
The transaction attribute name is stored as a non-null value, so `getName()` does not return `null`.
* `RequestContext.java`
The model is represented by a `Map` rather than a nullable value, so `getModel()` can return a non-null `Map`.
Closes gh-37379
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
Prior to this commit, JpaTransactionManager and
HibernateTransactionManager stated that they do not support "running
within DataSourceTransactionManager" when encountering a pre-bound
JDBC Connection that is not synchronized with a transaction.
However, DataSourceTransactionManager marks its ConnectionHolder as
synchronized with the transaction and therefore does not trigger this
check. Instead, the exception is typically caused by another
JpaTransactionManager or HibernateTransactionManager for a different
persistence unit exposing a JDBC Connection for the same DataSource,
or by a JDBC Connection that has been left bound to the current
thread.
This commit revises the exception message accordingly so that it no
longer points to DataSourceTransactionManager.
See gh-14130
Closes gh-37356
Signed-off-by: rene.schakmann <rene.schakmann@reetgroup.com>
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
This commit adds the missing reflection hints for Hibernate 8 support:
`PersistenceUnitInfoDescriptor` and `StatelessSession`.
Fixes gh-37247
Fixes gh-37249
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
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
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