Merge branch '6.0.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -67,9 +67,9 @@ import org.springframework.util.Assert;
|
||||
* </pre>
|
||||
*
|
||||
* <p>The target ResourceAdapter may be configured as a local Spring bean as well
|
||||
* (the typical case) or obtained from JNDI (e.g. on WebLogic). For the
|
||||
* example above, a local ResourceAdapter bean could be defined as follows
|
||||
* (matching the "resourceAdapter" bean reference above):
|
||||
* (the typical case) or obtained from JNDI. For the example above, a local
|
||||
* ResourceAdapter bean could be defined as follows (matching the "resourceAdapter"
|
||||
* bean reference above):
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean id="resourceAdapter" class="org.springframework.jca.support.ResourceAdapterFactoryBean">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -265,7 +265,7 @@ public interface TransactionDefinition {
|
||||
/**
|
||||
* Return the name of this transaction. Can be {@code null}.
|
||||
* <p>This will be used as the transaction name to be shown in a
|
||||
* transaction monitor, if applicable (for example, WebLogic's).
|
||||
* transaction monitor, if applicable.
|
||||
* <p>In case of Spring's declarative transactions, the exposed name will be
|
||||
* the {@code fully-qualified class name + "." + method name} (by default).
|
||||
* @return the name of this transaction ({@code null} by default}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -67,16 +67,15 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
|
||||
/**
|
||||
* Create a new SpringJtaSynchronizationAdapter for the given Spring
|
||||
* TransactionSynchronization and JTA TransactionManager.
|
||||
* <p>Note that this adapter will never perform a rollback-only call on WebLogic,
|
||||
* since WebLogic Server is known to automatically mark the transaction as
|
||||
* rollback-only in case of a {@code beforeCompletion} exception. Hence,
|
||||
* on WLS, this constructor is equivalent to the single-arg constructor.
|
||||
* @param springSynchronization the Spring TransactionSynchronization to delegate to
|
||||
* @param jtaUserTransaction the JTA UserTransaction to use for rollback-only
|
||||
* setting in case of an exception thrown in {@code beforeCompletion}
|
||||
* (can be omitted if the JTA provider itself marks the transaction rollback-only
|
||||
* in such a scenario, which is required by the JTA specification as of JTA 1.1).
|
||||
* @deprecated as of 6.0.12 since JTA 1.1+ requires implicit rollback-only setting
|
||||
* in case of an exception thrown in {@code beforeCompletion}, so the regular
|
||||
* {@link #SpringJtaSynchronizationAdapter(TransactionSynchronization)} constructor
|
||||
* is sufficient for all scenarios
|
||||
*/
|
||||
@Deprecated(since = "6.0.12")
|
||||
public SpringJtaSynchronizationAdapter(TransactionSynchronization springSynchronization,
|
||||
@Nullable UserTransaction jtaUserTransaction) {
|
||||
|
||||
@@ -87,21 +86,21 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
|
||||
/**
|
||||
* Create a new SpringJtaSynchronizationAdapter for the given Spring
|
||||
* TransactionSynchronization and JTA TransactionManager.
|
||||
* <p>Note that this adapter will never perform a rollback-only call on WebLogic,
|
||||
* since WebLogic Server is known to automatically mark the transaction as
|
||||
* rollback-only in case of a {@code beforeCompletion} exception. Hence,
|
||||
* on WLS, this constructor is equivalent to the single-arg constructor.
|
||||
* @param springSynchronization the Spring TransactionSynchronization to delegate to
|
||||
* @param jtaTransactionManager the JTA TransactionManager to use for rollback-only
|
||||
* setting in case of an exception thrown in {@code beforeCompletion}
|
||||
* (can be omitted if the JTA provider itself marks the transaction rollback-only
|
||||
* in such a scenario, which is required by the JTA specification as of JTA 1.1)
|
||||
* @deprecated as of 6.0.12 since JTA 1.1+ requires implicit rollback-only setting
|
||||
* in case of an exception thrown in {@code beforeCompletion}, so the regular
|
||||
* {@link #SpringJtaSynchronizationAdapter(TransactionSynchronization)} constructor
|
||||
* is sufficient for all scenarios
|
||||
*/
|
||||
public SpringJtaSynchronizationAdapter(
|
||||
TransactionSynchronization springSynchronization, @Nullable TransactionManager jtaTransactionManager) {
|
||||
@Deprecated(since = "6.0.12")
|
||||
public SpringJtaSynchronizationAdapter(TransactionSynchronization springSynchronization,
|
||||
@Nullable TransactionManager jtaTransactionManager) {
|
||||
|
||||
this(springSynchronization);
|
||||
this.jtaTransaction = new UserTransactionAdapter(jtaTransactionManager);
|
||||
this.jtaTransaction =
|
||||
(jtaTransactionManager != null ? new UserTransactionAdapter(jtaTransactionManager) : null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -358,10 +358,10 @@ public class TransactionSynchronizationManager {
|
||||
* Return whether there currently is an actual transaction active.
|
||||
* This indicates whether the current context is associated with an actual
|
||||
* transaction rather than just with active transaction synchronization.
|
||||
* <p>To be called by resource management code that wants to discriminate
|
||||
* between active transaction synchronization (with or without backing
|
||||
* <p>To be called by resource management code that wants to differentiate
|
||||
* between active transaction synchronization (with or without a backing
|
||||
* resource transaction; also on PROPAGATION_SUPPORTS) and an actual
|
||||
* transaction being active (with backing resource transaction;
|
||||
* transaction being active (with a backing resource transaction;
|
||||
* on PROPAGATION_REQUIRED, PROPAGATION_REQUIRES_NEW, etc).
|
||||
* @see #isSynchronizationActive()
|
||||
*/
|
||||
|
||||
@@ -426,10 +426,10 @@ public abstract class TransactionSynchronizationManager {
|
||||
* Return whether there currently is an actual transaction active.
|
||||
* This indicates whether the current thread is associated with an actual
|
||||
* transaction rather than just with active transaction synchronization.
|
||||
* <p>To be called by resource management code that wants to discriminate
|
||||
* between active transaction synchronization (with or without backing
|
||||
* <p>To be called by resource management code that wants to differentiate
|
||||
* between active transaction synchronization (with or without a backing
|
||||
* resource transaction; also on PROPAGATION_SUPPORTS) and an actual
|
||||
* transaction being active (with backing resource transaction;
|
||||
* transaction being active (with a backing resource transaction;
|
||||
* on PROPAGATION_REQUIRED, PROPAGATION_REQUIRES_NEW, etc).
|
||||
* @see #isSynchronizationActive()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user