Merge branch '7.0.x'

# Conflicts:
#	framework-platform/framework-platform.gradle
This commit is contained in:
Juergen Hoeller
2026-07-29 12:17:09 +02:00
3 changed files with 22 additions and 24 deletions
@@ -50,7 +50,7 @@ public class CheckstyleConventions {
project.getPlugins().apply(CheckstylePlugin.class); project.getPlugins().apply(CheckstylePlugin.class);
project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g")); project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g"));
CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class); CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class);
checkstyle.setToolVersion("13.7.0"); checkstyle.setToolVersion("13.9.0");
checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle")); checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle"));
String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion(); String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion();
DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies(); DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies();
+8 -8
View File
@@ -15,8 +15,8 @@ dependencies {
api(platform("org.apache.groovy:groovy-bom:5.0.7")) api(platform("org.apache.groovy:groovy-bom:5.0.7"))
api(platform("org.apache.logging.log4j:log4j-bom:2.26.1")) api(platform("org.apache.logging.log4j:log4j-bom:2.26.1"))
api(platform("org.assertj:assertj-bom:3.27.7")) api(platform("org.assertj:assertj-bom:3.27.7"))
api(platform("org.eclipse.jetty:jetty-bom:12.1.10")) api(platform("org.eclipse.jetty:jetty-bom:12.1.11"))
api(platform("org.eclipse.jetty.ee11:jetty-ee11-bom:12.1.10")) api(platform("org.eclipse.jetty.ee11:jetty-ee11-bom:12.1.11"))
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.11.0")) api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.11.0"))
api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.11.0")) api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.11.0"))
api(platform("org.junit:junit-bom:6.1.2")) api(platform("org.junit:junit-bom:6.1.2"))
@@ -96,10 +96,10 @@ dependencies {
api("org.apache.httpcomponents.client5:httpclient5:5.6") api("org.apache.httpcomponents.client5:httpclient5:5.6")
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.4.2") api("org.apache.httpcomponents.core5:httpcore5-reactive:5.4.2")
api("org.apache.poi:poi-ooxml:5.5.1") api("org.apache.poi:poi-ooxml:5.5.1")
api("org.apache.tomcat.embed:tomcat-embed-core:11.0.23") api("org.apache.tomcat.embed:tomcat-embed-core:11.0.24")
api("org.apache.tomcat.embed:tomcat-embed-websocket:11.0.23") api("org.apache.tomcat.embed:tomcat-embed-websocket:11.0.24")
api("org.apache.tomcat:tomcat-util:11.0.23") api("org.apache.tomcat:tomcat-util:11.0.24")
api("org.apache.tomcat:tomcat-websocket:11.0.23") api("org.apache.tomcat:tomcat-websocket:11.0.24")
api("org.aspectj:aspectjrt:1.9.25") api("org.aspectj:aspectjrt:1.9.25")
api("org.aspectj:aspectjtools:1.9.25") api("org.aspectj:aspectjtools:1.9.25")
api("org.aspectj:aspectjweaver:1.9.25") api("org.aspectj:aspectjweaver:1.9.25")
@@ -120,8 +120,8 @@ dependencies {
api("org.glassfish:jakarta.el:4.0.2") api("org.glassfish:jakarta.el:4.0.2")
api("org.graalvm.sdk:graal-sdk:22.3.1") api("org.graalvm.sdk:graal-sdk:22.3.1")
api("org.hamcrest:hamcrest:3.0") api("org.hamcrest:hamcrest:3.0")
api("org.hibernate.orm:hibernate-core:7.4.4.Final") api("org.hibernate.orm:hibernate-core:7.4.5.Final")
api("org.hibernate.validator:hibernate-validator:9.1.2.Final") api("org.hibernate.validator:hibernate-validator:9.1.3.Final")
api("org.hsqldb:hsqldb:2.7.4") api("org.hsqldb:hsqldb:2.7.4")
api("org.htmlunit:htmlunit:4.21.0") api("org.htmlunit:htmlunit:4.21.0")
api("org.javamoney:moneta:1.4.4") api("org.javamoney:moneta:1.4.4")
@@ -24,6 +24,7 @@ import java.util.concurrent.locks.ReentrantLock;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceException; import jakarta.persistence.PersistenceException;
import org.eclipse.persistence.sessions.DatabaseLogin; import org.eclipse.persistence.sessions.DatabaseLogin;
import org.eclipse.persistence.sessions.DatabaseSession;
import org.eclipse.persistence.sessions.UnitOfWork; import org.eclipse.persistence.sessions.UnitOfWork;
import org.jspecify.annotations.Nullable; import org.jspecify.annotations.Nullable;
@@ -45,10 +46,6 @@ import org.springframework.transaction.TransactionException;
* EclipseLink in shared cache mode. * EclipseLink in shared cache mode.
* *
* <p><b>NOTE: This dialect supports custom isolation levels with limitations.</b> * <p><b>NOTE: This dialect supports custom isolation levels with limitations.</b>
* Consistent isolation level handling is only guaranteed when all Spring
* transaction definitions specify a concrete isolation level and when using the
* default isolation level with non-readOnly and non-lazy transactions; see the
* {@link #setLazyDatabaseTransaction "lazyDatabaseTransaction" javadoc} for details.
* Internal locking happens for transaction isolation management in EclipseLink's * Internal locking happens for transaction isolation management in EclipseLink's
* DatabaseLogin, at the granularity of the {@code EclipseLinkJpaDialect} instance; * DatabaseLogin, at the granularity of the {@code EclipseLinkJpaDialect} instance;
* for independent persistence units with different target databases, use distinct * for independent persistence units with different target databases, use distinct
@@ -79,13 +76,6 @@ public class EclipseLinkJpaDialect extends DefaultJpaDialect {
* even for non-read-only transactions, allowing access to EclipseLink's * even for non-read-only transactions, allowing access to EclipseLink's
* shared cache and following EclipseLink's connection mode configuration, * shared cache and following EclipseLink's connection mode configuration,
* assuming that isolation and visibility at the JDBC level are less important. * assuming that isolation and visibility at the JDBC level are less important.
* <p><b>NOTE: Lazy database transactions are not guaranteed to work reliably
* in combination with custom isolation levels. Use read-only as well as this
* lazy flag with care. If other transactions use custom isolation levels,
* it is not recommended to use read-only and lazy transactions at all.</b>
* Otherwise, you may see non-default isolation levels used during read-only
* or lazy access. If this is not acceptable, don't use read-only and lazy
* next to custom isolation levels in potentially concurrent transactions.
* @see org.eclipse.persistence.sessions.UnitOfWork#beginEarlyTransaction() * @see org.eclipse.persistence.sessions.UnitOfWork#beginEarlyTransaction()
* @see TransactionDefinition#isReadOnly() * @see TransactionDefinition#isReadOnly()
* @see TransactionDefinition#getIsolationLevel() * @see TransactionDefinition#getIsolationLevel()
@@ -186,6 +176,13 @@ public class EclipseLinkJpaDialect extends DefaultJpaDialect {
public Connection getConnection() { public Connection getConnection() {
Connection con = this.connection; Connection con = this.connection;
if (con == null) { if (con == null) {
DatabaseSession dbs = this.entityManager.unwrap(DatabaseSession.class);
if (dbs.isInTransaction()) {
// Existing Connection to be retrieved from this EntityManager.
con = this.entityManager.unwrap(Connection.class);
}
else {
// New Connection to be acquired by this EntityManager.
transactionIsolationLock.lock(); transactionIsolationLock.lock();
try { try {
con = this.entityManager.unwrap(Connection.class); con = this.entityManager.unwrap(Connection.class);
@@ -193,6 +190,7 @@ public class EclipseLinkJpaDialect extends DefaultJpaDialect {
finally { finally {
transactionIsolationLock.unlock(); transactionIsolationLock.unlock();
} }
}
this.connection = con; this.connection = con;
} }
return con; return con;