mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Merge branch '7.0.x'
# Conflicts: # framework-platform/framework-platform.gradle
This commit is contained in:
@@ -50,7 +50,7 @@ public class CheckstyleConventions {
|
||||
project.getPlugins().apply(CheckstylePlugin.class);
|
||||
project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g"));
|
||||
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"));
|
||||
String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion();
|
||||
DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies();
|
||||
|
||||
@@ -15,8 +15,8 @@ dependencies {
|
||||
api(platform("org.apache.groovy:groovy-bom:5.0.7"))
|
||||
api(platform("org.apache.logging.log4j:log4j-bom:2.26.1"))
|
||||
api(platform("org.assertj:assertj-bom:3.27.7"))
|
||||
api(platform("org.eclipse.jetty:jetty-bom:12.1.10"))
|
||||
api(platform("org.eclipse.jetty.ee11:jetty-ee11-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.11"))
|
||||
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.junit:junit-bom:6.1.2"))
|
||||
@@ -96,10 +96,10 @@ dependencies {
|
||||
api("org.apache.httpcomponents.client5:httpclient5:5.6")
|
||||
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.4.2")
|
||||
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-websocket:11.0.23")
|
||||
api("org.apache.tomcat:tomcat-util:11.0.23")
|
||||
api("org.apache.tomcat:tomcat-websocket:11.0.23")
|
||||
api("org.apache.tomcat.embed:tomcat-embed-core:11.0.24")
|
||||
api("org.apache.tomcat.embed:tomcat-embed-websocket:11.0.24")
|
||||
api("org.apache.tomcat:tomcat-util:11.0.24")
|
||||
api("org.apache.tomcat:tomcat-websocket:11.0.24")
|
||||
api("org.aspectj:aspectjrt:1.9.25")
|
||||
api("org.aspectj:aspectjtools: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.graalvm.sdk:graal-sdk:22.3.1")
|
||||
api("org.hamcrest:hamcrest:3.0")
|
||||
api("org.hibernate.orm:hibernate-core:7.4.4.Final")
|
||||
api("org.hibernate.validator:hibernate-validator:9.1.2.Final")
|
||||
api("org.hibernate.orm:hibernate-core:7.4.5.Final")
|
||||
api("org.hibernate.validator:hibernate-validator:9.1.3.Final")
|
||||
api("org.hsqldb:hsqldb:2.7.4")
|
||||
api("org.htmlunit:htmlunit:4.21.0")
|
||||
api("org.javamoney:moneta:1.4.4")
|
||||
|
||||
+13
-15
@@ -24,6 +24,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
import org.eclipse.persistence.sessions.DatabaseLogin;
|
||||
import org.eclipse.persistence.sessions.DatabaseSession;
|
||||
import org.eclipse.persistence.sessions.UnitOfWork;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
@@ -45,10 +46,6 @@ import org.springframework.transaction.TransactionException;
|
||||
* EclipseLink in shared cache mode.
|
||||
*
|
||||
* <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
|
||||
* DatabaseLogin, at the granularity of the {@code EclipseLinkJpaDialect} instance;
|
||||
* 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
|
||||
* shared cache and following EclipseLink's connection mode configuration,
|
||||
* 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 TransactionDefinition#isReadOnly()
|
||||
* @see TransactionDefinition#getIsolationLevel()
|
||||
@@ -186,12 +176,20 @@ public class EclipseLinkJpaDialect extends DefaultJpaDialect {
|
||||
public Connection getConnection() {
|
||||
Connection con = this.connection;
|
||||
if (con == null) {
|
||||
transactionIsolationLock.lock();
|
||||
try {
|
||||
DatabaseSession dbs = this.entityManager.unwrap(DatabaseSession.class);
|
||||
if (dbs.isInTransaction()) {
|
||||
// Existing Connection to be retrieved from this EntityManager.
|
||||
con = this.entityManager.unwrap(Connection.class);
|
||||
}
|
||||
finally {
|
||||
transactionIsolationLock.unlock();
|
||||
else {
|
||||
// New Connection to be acquired by this EntityManager.
|
||||
transactionIsolationLock.lock();
|
||||
try {
|
||||
con = this.entityManager.unwrap(Connection.class);
|
||||
}
|
||||
finally {
|
||||
transactionIsolationLock.unlock();
|
||||
}
|
||||
}
|
||||
this.connection = con;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user