Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
This commit is contained in:
@@ -25,7 +25,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* Implementation of {@link PersistenceExceptionTranslator} that supports chaining,
|
||||
* allowing the addition of PersistenceExceptionTranslator instances in order.
|
||||
* Returns <code>non-null</code> on the first (if any) match.
|
||||
* Returns {@code non-null} on the first (if any) match.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -54,7 +54,7 @@ public abstract class DaoSupport implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Abstract subclasses must override this to check their configuration.
|
||||
* <p>Implementors should be marked as <code>final</code if concrete subclasses
|
||||
* <p>Implementors should be marked as {@code final} if concrete subclasses
|
||||
* are not supposed to override this template method themselves.
|
||||
* @throws IllegalArgumentException in case of illegal configuration
|
||||
*/
|
||||
|
||||
@@ -37,10 +37,10 @@ public abstract class DataAccessUtils {
|
||||
|
||||
/**
|
||||
* Return a single result object from the given Collection.
|
||||
* <p>Returns <code>null</code> if 0 result objects found;
|
||||
* <p>Returns {@code null} if 0 result objects found;
|
||||
* throws an exception if more than 1 element found.
|
||||
* @param results the result Collection (can be <code>null</code>)
|
||||
* @return the single result object, or <code>null</code> if none
|
||||
* @param results the result Collection (can be {@code null})
|
||||
* @return the single result object, or {@code null} if none
|
||||
* @throws IncorrectResultSizeDataAccessException if more than one
|
||||
* element has been found in the given Collection
|
||||
*/
|
||||
@@ -58,7 +58,7 @@ public abstract class DataAccessUtils {
|
||||
/**
|
||||
* Return a single result object from the given Collection.
|
||||
* <p>Throws an exception if 0 or more than 1 element found.
|
||||
* @param results the result Collection (can be <code>null</code>)
|
||||
* @param results the result Collection (can be {@code null})
|
||||
* @return the single result object
|
||||
* @throws IncorrectResultSizeDataAccessException if more than one
|
||||
* element has been found in the given Collection
|
||||
@@ -78,10 +78,10 @@ public abstract class DataAccessUtils {
|
||||
|
||||
/**
|
||||
* Return a unique result object from the given Collection.
|
||||
* <p>Returns <code>null</code> if 0 result objects found;
|
||||
* <p>Returns {@code null} if 0 result objects found;
|
||||
* throws an exception if more than 1 instance found.
|
||||
* @param results the result Collection (can be <code>null</code>)
|
||||
* @return the unique result object, or <code>null</code> if none
|
||||
* @param results the result Collection (can be {@code null})
|
||||
* @return the unique result object, or {@code null} if none
|
||||
* @throws IncorrectResultSizeDataAccessException if more than one
|
||||
* result object has been found in the given Collection
|
||||
* @see org.springframework.util.CollectionUtils#hasUniqueObject
|
||||
@@ -100,7 +100,7 @@ public abstract class DataAccessUtils {
|
||||
/**
|
||||
* Return a unique result object from the given Collection.
|
||||
* <p>Throws an exception if 0 or more than 1 instance found.
|
||||
* @param results the result Collection (can be <code>null</code>)
|
||||
* @param results the result Collection (can be {@code null})
|
||||
* @return the unique result object
|
||||
* @throws IncorrectResultSizeDataAccessException if more than one
|
||||
* result object has been found in the given Collection
|
||||
@@ -124,7 +124,7 @@ public abstract class DataAccessUtils {
|
||||
* Throws an exception if 0 or more than 1 result objects found,
|
||||
* of if the unique result object is not convertable to the
|
||||
* specified required type.
|
||||
* @param results the result Collection (can be <code>null</code>)
|
||||
* @param results the result Collection (can be {@code null})
|
||||
* @return the unique result object
|
||||
* @throws IncorrectResultSizeDataAccessException if more than one
|
||||
* result object has been found in the given Collection
|
||||
@@ -163,7 +163,7 @@ public abstract class DataAccessUtils {
|
||||
* Return a unique int result from the given Collection.
|
||||
* Throws an exception if 0 or more than 1 result objects found,
|
||||
* of if the unique result object is not convertable to an int.
|
||||
* @param results the result Collection (can be <code>null</code>)
|
||||
* @param results the result Collection (can be {@code null})
|
||||
* @return the unique int result
|
||||
* @throws IncorrectResultSizeDataAccessException if more than one
|
||||
* result object has been found in the given Collection
|
||||
@@ -182,7 +182,7 @@ public abstract class DataAccessUtils {
|
||||
* Return a unique long result from the given Collection.
|
||||
* Throws an exception if 0 or more than 1 result objects found,
|
||||
* of if the unique result object is not convertable to a long.
|
||||
* @param results the result Collection (can be <code>null</code>)
|
||||
* @param results the result Collection (can be {@code null})
|
||||
* @return the unique long result
|
||||
* @throws IncorrectResultSizeDataAccessException if more than one
|
||||
* result object has been found in the given Collection
|
||||
|
||||
@@ -98,7 +98,7 @@ public class PersistenceExceptionTranslationInterceptor
|
||||
* <p>Default is "false". Switch this flag to "true" in order to always translate
|
||||
* applicable exceptions, independent from the originating method signature.
|
||||
* <p>Note that the originating method does not have to declare the specific exception.
|
||||
* Any base class will do as well, even <code>throws Exception</code>: As long as the
|
||||
* Any base class will do as well, even {@code throws Exception}: As long as the
|
||||
* originating method does explicitly declare compatible exceptions, the raw exception
|
||||
* will be rethrown. If you would like to avoid throwing raw exceptions in any case,
|
||||
* switch this flag to "true".
|
||||
|
||||
@@ -44,7 +44,7 @@ public interface PersistenceExceptionTranslator {
|
||||
* Implementations may use Spring JDBC's sophisticated exception translation
|
||||
* to provide further information in the event of SQLException as a root cause.
|
||||
* @param ex a RuntimeException thrown
|
||||
* @return the corresponding DataAccessException (or <code>null</code> if the
|
||||
* @return the corresponding DataAccessException (or {@code null} if the
|
||||
* exception could not be translated, as in this case it may result from
|
||||
* user code rather than an actual persistence problem)
|
||||
* @see org.springframework.dao.DataIntegrityViolationException
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
|
||||
|
||||
/**
|
||||
* Exception thrown when a ResultSet has been accessed in an invalid fashion.
|
||||
* Such exceptions always have a <code>java.sql.SQLException</code> root cause.
|
||||
* Such exceptions always have a {@code java.sql.SQLException} root cause.
|
||||
*
|
||||
* <p>This typically happens when an invalid ResultSet column index or name
|
||||
* has been specified.
|
||||
|
||||
@@ -79,7 +79,7 @@ public abstract class ConnectionFactoryUtils {
|
||||
* when using {@link CciLocalTransactionManager}. Will bind a Connection to the thread
|
||||
* if transaction synchronization is active (e.g. if in a JTA transaction).
|
||||
* @param cf the ConnectionFactory to obtain Connection from
|
||||
* @param spec the ConnectionSpec for the desired Connection (may be <code>null</code>).
|
||||
* @param spec the ConnectionSpec for the desired Connection (may be {@code null}).
|
||||
* Note: If this is specified, a new Connection will be obtained for every call,
|
||||
* without participating in a shared transactional Connection.
|
||||
* @return a CCI Connection from the given ConnectionFactory
|
||||
@@ -142,7 +142,7 @@ public abstract class ConnectionFactoryUtils {
|
||||
* bound to the current thread by Spring's transaction facilities.
|
||||
* @param con the Connection to check
|
||||
* @param cf the ConnectionFactory that the Connection was obtained from
|
||||
* (may be <code>null</code>)
|
||||
* (may be {@code null})
|
||||
* @return whether the Connection is transactional
|
||||
*/
|
||||
public static boolean isConnectionTransactional(Connection con, ConnectionFactory cf) {
|
||||
@@ -157,9 +157,9 @@ public abstract class ConnectionFactoryUtils {
|
||||
* Close the given Connection, obtained from the given ConnectionFactory,
|
||||
* if it is not managed externally (that is, not bound to the thread).
|
||||
* @param con the Connection to close if necessary
|
||||
* (if this is <code>null</code>, the call will be ignored)
|
||||
* (if this is {@code null}, the call will be ignored)
|
||||
* @param cf the ConnectionFactory that the Connection was obtained from
|
||||
* (can be <code>null</code>)
|
||||
* (can be {@code null})
|
||||
* @see #getConnection
|
||||
*/
|
||||
public static void releaseConnection(Connection con, ConnectionFactory cf) {
|
||||
@@ -180,9 +180,9 @@ public abstract class ConnectionFactoryUtils {
|
||||
* Same as {@link #releaseConnection}, but throwing the original ResourceException.
|
||||
* <p>Directly accessed by {@link TransactionAwareConnectionFactoryProxy}.
|
||||
* @param con the Connection to close if necessary
|
||||
* (if this is <code>null</code>, the call will be ignored)
|
||||
* (if this is {@code null}, the call will be ignored)
|
||||
* @param cf the ConnectionFactory that the Connection was obtained from
|
||||
* (can be <code>null</code>)
|
||||
* (can be {@code null})
|
||||
* @throws ResourceException if thrown by JCA CCI methods
|
||||
* @see #doGetConnection
|
||||
*/
|
||||
|
||||
@@ -24,14 +24,14 @@ import org.springframework.core.NamedThreadLocal;
|
||||
|
||||
/**
|
||||
* An adapter for a target CCI {@link javax.resource.cci.ConnectionFactory},
|
||||
* applying the given ConnectionSpec to every standard <code>getConnection()</code>
|
||||
* call, that is, implicitly invoking <code>getConnection(ConnectionSpec)</code>
|
||||
* applying the given ConnectionSpec to every standard {@code getConnection()}
|
||||
* call, that is, implicitly invoking {@code getConnection(ConnectionSpec)}
|
||||
* on the target. All other methods simply delegate to the corresponding methods
|
||||
* of the target ConnectionFactory.
|
||||
*
|
||||
* <p>Can be used to proxy a target JNDI ConnectionFactory that does not have a
|
||||
* ConnectionSpec configured. Client code can work with the ConnectionFactory
|
||||
* without passing in a ConnectionSpec on every <code>getConnection()</code> call.
|
||||
* without passing in a ConnectionSpec on every {@code getConnection()} call.
|
||||
*
|
||||
* <p>In the following example, client code can simply transparently work with
|
||||
* the preconfigured "myConnectionFactory", implicitly accessing
|
||||
@@ -53,7 +53,7 @@ import org.springframework.core.NamedThreadLocal;
|
||||
* </bean></pre>
|
||||
*
|
||||
* <p>If the "connectionSpec" is empty, this proxy will simply delegate to the
|
||||
* standard <code>getConnection()</code> method of the target ConnectionFactory.
|
||||
* standard {@code getConnection()} method of the target ConnectionFactory.
|
||||
* This can be used to keep a UserCredentialsConnectionFactoryAdapter bean definition
|
||||
* just for the <i>option</i> of implicitly passing in a ConnectionSpec if the
|
||||
* particular target ConnectionFactory requires it.
|
||||
@@ -81,7 +81,7 @@ public class ConnectionSpecConnectionFactoryAdapter extends DelegatingConnection
|
||||
/**
|
||||
* Set a ConnectionSpec for this proxy and the current thread.
|
||||
* The given ConnectionSpec will be applied to all subsequent
|
||||
* <code>getConnection()</code> calls on this ConnectionFactory proxy.
|
||||
* {@code getConnection()} calls on this ConnectionFactory proxy.
|
||||
* <p>This will override any statically specified "connectionSpec" property.
|
||||
* @param spec the ConnectionSpec to apply
|
||||
* @see #removeConnectionSpecFromCurrentThread
|
||||
@@ -118,10 +118,10 @@ public class ConnectionSpecConnectionFactoryAdapter extends DelegatingConnection
|
||||
}
|
||||
|
||||
/**
|
||||
* This implementation delegates to the <code>getConnection(ConnectionSpec)</code>
|
||||
* This implementation delegates to the {@code getConnection(ConnectionSpec)}
|
||||
* method of the target ConnectionFactory, passing in the specified user credentials.
|
||||
* If the specified username is empty, it will simply delegate to the standard
|
||||
* <code>getConnection()</code> method of the target ConnectionFactory.
|
||||
* {@code getConnection()} method of the target ConnectionFactory.
|
||||
* @param spec the ConnectionSpec to apply
|
||||
* @return the Connection
|
||||
* @see javax.resource.cci.ConnectionFactory#getConnection(javax.resource.cci.ConnectionSpec)
|
||||
|
||||
@@ -28,7 +28,7 @@ import javax.resource.cci.RecordFactory;
|
||||
*
|
||||
* <p>Useful as a placeholder for a RecordFactory argument (for example as
|
||||
* defined by the RecordCreator callback), in particular when the connector's
|
||||
* <code>ConnectionFactory.getRecordFactory()</code> implementation happens to
|
||||
* {@code ConnectionFactory.getRecordFactory()} implementation happens to
|
||||
* throw NotSupportedException early rather than throwing the exception from
|
||||
* RecordFactory's methods.
|
||||
*
|
||||
|
||||
@@ -35,8 +35,8 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A CCI ConnectionFactory adapter that returns the same Connection on all
|
||||
* <code>getConnection</code> calls, and ignores calls to
|
||||
* <code>Connection.close()</code>.
|
||||
* {@code getConnection} calls, and ignores calls to
|
||||
* {@code Connection.close()}.
|
||||
*
|
||||
* <p>Useful for testing and standalone environments, to keep using the same
|
||||
* Connection for multiple CciTemplate calls, without having a pooling
|
||||
|
||||
@@ -43,7 +43,7 @@ import javax.resource.cci.ConnectionFactory;
|
||||
*
|
||||
* <p>Delegates to {@link ConnectionFactoryUtils} for automatically participating in
|
||||
* thread-bound transactions, for example managed by {@link CciLocalTransactionManager}.
|
||||
* <code>getConnection</code> calls and <code>close</code> calls on returned Connections
|
||||
* {@code getConnection} calls and {@code close} calls on returned Connections
|
||||
* will behave properly within a transaction, i.e. always operate on the transactional
|
||||
* Connection. If not within a transaction, normal ConnectionFactory behavior applies.
|
||||
*
|
||||
@@ -61,8 +61,8 @@ import javax.resource.cci.ConnectionFactory;
|
||||
* @since 1.2
|
||||
* @see javax.resource.cci.ConnectionFactory#getConnection
|
||||
* @see javax.resource.cci.Connection#close
|
||||
* @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#doGetConnection
|
||||
* @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#doReleaseConnection
|
||||
* @see ConnectionFactoryUtils#doGetConnection
|
||||
* @see ConnectionFactoryUtils#doReleaseConnection
|
||||
*/
|
||||
public class TransactionAwareConnectionFactoryProxy extends DelegatingConnectionFactory {
|
||||
|
||||
@@ -97,12 +97,12 @@ public class TransactionAwareConnectionFactoryProxy extends DelegatingConnection
|
||||
|
||||
/**
|
||||
* Wrap the given Connection with a proxy that delegates every method call to it
|
||||
* but delegates <code>close</code> calls to ConnectionFactoryUtils.
|
||||
* but delegates {@code close} calls to ConnectionFactoryUtils.
|
||||
* @param target the original Connection to wrap
|
||||
* @param cf ConnectionFactory that the Connection came from
|
||||
* @return the wrapped Connection
|
||||
* @see javax.resource.cci.Connection#close()
|
||||
* @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#doReleaseConnection
|
||||
* @see ConnectionFactoryUtils#doReleaseConnection
|
||||
*/
|
||||
protected Connection getTransactionAwareConnectionProxy(Connection target, ConnectionFactory cf) {
|
||||
return (Connection) Proxy.newProxyInstance(
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.springframework.util.Assert;
|
||||
* It executes core CCI workflow, leaving application code to provide parameters
|
||||
* to CCI and extract results. This class executes EIS queries or updates,
|
||||
* catching ResourceExceptions and translating them to the generic exception
|
||||
* hierarchy defined in the <code>org.springframework.dao</code> package.
|
||||
* hierarchy defined in the {@code org.springframework.dao} package.
|
||||
*
|
||||
* <p>Code using this class can pass in and receive {@link javax.resource.cci.Record}
|
||||
* instances, or alternatively implement callback interfaces for creating input
|
||||
@@ -101,7 +101,7 @@ public class CciTemplate implements CciOperations {
|
||||
* Note: This will trigger eager initialization of the exception translator.
|
||||
* @param connectionFactory JCA ConnectionFactory to obtain Connections from
|
||||
* @param connectionSpec the CCI ConnectionSpec to obtain Connections for
|
||||
* (may be <code>null</code>)
|
||||
* (may be {@code null})
|
||||
*/
|
||||
public CciTemplate(ConnectionFactory connectionFactory, ConnectionSpec connectionSpec) {
|
||||
setConnectionFactory(connectionFactory);
|
||||
@@ -142,10 +142,10 @@ public class CciTemplate implements CciOperations {
|
||||
/**
|
||||
* Set a RecordCreator that should be used for creating default output Records.
|
||||
* <p>Default is none: When no explicit output Record gets passed into an
|
||||
* <code>execute</code> method, CCI's <code>Interaction.execute</code> variant
|
||||
* {@code execute} method, CCI's {@code Interaction.execute} variant
|
||||
* that returns an output Record will be called.
|
||||
* <p>Specify a RecordCreator here if you always need to call CCI's
|
||||
* <code>Interaction.execute</code> variant with a passed-in output Record.
|
||||
* {@code Interaction.execute} variant with a passed-in output Record.
|
||||
* Unless there is an explicitly specified output Record, CciTemplate will
|
||||
* then invoke this RecordCreator to create a default output Record instance.
|
||||
* @see javax.resource.cci.Interaction#execute(javax.resource.cci.InteractionSpec, Record)
|
||||
@@ -253,7 +253,7 @@ public class CciTemplate implements CciOperations {
|
||||
* @param spec the CCI InteractionSpec instance that defines
|
||||
* the interaction (connector-specific)
|
||||
* @param inputRecord the input record
|
||||
* @param outputRecord output record (can be <code>null</code>)
|
||||
* @param outputRecord output record (can be {@code null})
|
||||
* @param outputExtractor object to convert the output record to a result object
|
||||
* @return the output data extracted with the RecordExtractor object
|
||||
* @throws DataAccessException if there is any problem
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.dao.DataAccessException;
|
||||
* <p>This is particularly useful for delegating to existing data access code
|
||||
* that expects a Connection to work on and throws ResourceException. For newly
|
||||
* written code, it is strongly recommended to use CciTemplate's more specific
|
||||
* <code>execute</code> variants.
|
||||
* {@code execute} variants.
|
||||
*
|
||||
* @author Thierry Templier
|
||||
* @author Juergen Hoeller
|
||||
@@ -44,7 +44,7 @@ import org.springframework.dao.DataAccessException;
|
||||
public interface ConnectionCallback<T> {
|
||||
|
||||
/**
|
||||
* Gets called by <code>CciTemplate.execute</code> with an active CCI Connection.
|
||||
* Gets called by {@code CciTemplate.execute} with an active CCI Connection.
|
||||
* Does not need to care about activating or closing the Connection, or handling
|
||||
* transactions.
|
||||
*
|
||||
@@ -56,14 +56,14 @@ public interface ConnectionCallback<T> {
|
||||
*
|
||||
* <p>Allows for returning a result object created within the callback, i.e.
|
||||
* a domain object or a collection of domain objects. Note that there's special
|
||||
* support for single step actions: see the <code>CciTemplate.execute</code>
|
||||
* support for single step actions: see the {@code CciTemplate.execute}
|
||||
* variants. A thrown RuntimeException is treated as application exception:
|
||||
* it gets propagated to the caller of the template.
|
||||
*
|
||||
* @param connection active CCI Connection
|
||||
* @param connectionFactory the CCI ConnectionFactory that the Connection was
|
||||
* created with (gives access to RecordFactory and ResourceAdapterMetaData)
|
||||
* @return a result object, or <code>null</code> if none
|
||||
* @return a result object, or {@code null} if none
|
||||
* @throws ResourceException if thrown by a CCI method, to be auto-converted
|
||||
* to a DataAccessException
|
||||
* @throws SQLException if thrown by a ResultSet method, to be auto-converted
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.dao.DataAccessException;
|
||||
* <p>This is particularly useful for delegating to existing data access code
|
||||
* that expects an Interaction to work on and throws ResourceException. For newly
|
||||
* written code, it is strongly recommended to use CciTemplate's more specific
|
||||
* <code>execute</code> variants.
|
||||
* {@code execute} variants.
|
||||
*
|
||||
* @author Thierry Templier
|
||||
* @author Juergen Hoeller
|
||||
@@ -45,7 +45,7 @@ import org.springframework.dao.DataAccessException;
|
||||
public interface InteractionCallback<T> {
|
||||
|
||||
/**
|
||||
* Gets called by <code>CciTemplate.execute</code> with an active CCI Interaction.
|
||||
* Gets called by {@code CciTemplate.execute} with an active CCI Interaction.
|
||||
* Does not need to care about activating or closing the Interaction, or
|
||||
* handling transactions.
|
||||
*
|
||||
@@ -57,14 +57,14 @@ public interface InteractionCallback<T> {
|
||||
*
|
||||
* <p>Allows for returning a result object created within the callback, i.e.
|
||||
* a domain object or a collection of domain objects. Note that there's special
|
||||
* support for single step actions: see the <code>CciTemplate.execute</code>
|
||||
* support for single step actions: see the {@code CciTemplate.execute}
|
||||
* variants. A thrown RuntimeException is treated as application exception:
|
||||
* it gets propagated to the caller of the template.
|
||||
*
|
||||
* @param interaction active CCI Interaction
|
||||
* @param connectionFactory the CCI ConnectionFactory that the Connection was
|
||||
* created with (gives access to RecordFactory and ResourceAdapterMetaData)
|
||||
* @return a result object, or <code>null</code> if none
|
||||
* @return a result object, or {@code null} if none
|
||||
* @throws ResourceException if thrown by a CCI method, to be auto-converted
|
||||
* to a DataAccessException
|
||||
* @throws SQLException if thrown by a ResultSet method, to be auto-converted
|
||||
|
||||
@@ -28,13 +28,13 @@ import org.springframework.dao.DataAccessException;
|
||||
*
|
||||
* <p>Used for input Record creation in CciTemplate. Alternatively,
|
||||
* Record instances can be passed into CciTemplate's corresponding
|
||||
* <code>execute</code> methods directly, either instantiated manually
|
||||
* {@code execute} methods directly, either instantiated manually
|
||||
* or created through CciTemplate's Record factory methods.
|
||||
*
|
||||
* <P>Also used for creating default output Records in CciTemplate.
|
||||
* This is useful when the JCA connector needs an explicit output Record
|
||||
* instance, but no output Records should be passed into CciTemplate's
|
||||
* <code>execute</code> methods.
|
||||
* {@code execute} methods.
|
||||
*
|
||||
* @author Thierry Templier
|
||||
* @author Juergen Hoeller
|
||||
@@ -49,10 +49,10 @@ public interface RecordCreator {
|
||||
|
||||
/**
|
||||
* Create a CCI Record instance, usually based on the passed-in CCI RecordFactory.
|
||||
* <p>For use as <i>input</i> creator with CciTemplate's <code>execute</code> methods,
|
||||
* <p>For use as <i>input</i> creator with CciTemplate's {@code execute} methods,
|
||||
* this method should create a <i>populated</i> Record instance. For use as
|
||||
* <i>output</i> Record creator, it should return an <i>empty</i> Record instance.
|
||||
* @param recordFactory the CCI RecordFactory (never <code>null</code>, but not guaranteed to be
|
||||
* @param recordFactory the CCI RecordFactory (never {@code null}, but not guaranteed to be
|
||||
* supported by the connector: its create methods might throw NotSupportedException)
|
||||
* @return the Record instance
|
||||
* @throws ResourceException if thrown by a CCI method, to be auto-converted
|
||||
|
||||
@@ -49,7 +49,7 @@ public interface RecordExtractor<T> {
|
||||
* Process the data in the given Record, creating a corresponding result object.
|
||||
* @param record the Record to extract data from
|
||||
* (possibly a CCI ResultSet)
|
||||
* @return an arbitrary result object, or <code>null</code> if none
|
||||
* @return an arbitrary result object, or {@code null} if none
|
||||
* (the extractor will typically be stateful in the latter case)
|
||||
* @throws ResourceException if thrown by a CCI method, to be auto-converted
|
||||
* to a DataAccessException
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.jca.cci.core.CciTemplate;
|
||||
*
|
||||
* <p>This base class is mainly intended for CciTemplate usage but can
|
||||
* also be used when working with a Connection directly or when using
|
||||
* <code>org.springframework.jca.cci.object</code> classes.
|
||||
* {@code org.springframework.jca.cci.object} classes.
|
||||
*
|
||||
* @author Thierry Templier
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* Classes supporting the <code>org.springframework.jca.cci.core</code> package.
|
||||
* Classes supporting the {@code org.springframework.jca.cci.core} package.
|
||||
* Contains a DAO base class for CciTemplate usage.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -33,8 +33,8 @@ import org.springframework.jca.cci.core.RecordExtractor;
|
||||
* converting to and from CCI Records.
|
||||
*
|
||||
* <p>Concrete subclasses must implement the abstract
|
||||
* <code>createInputRecord(RecordFactory, Object)</code> and
|
||||
* <code>extractOutputData(Record)</code> methods, to create an input
|
||||
* {@code createInputRecord(RecordFactory, Object)} and
|
||||
* {@code extractOutputData(Record)} methods, to create an input
|
||||
* Record from an object and to convert an output Record into an object,
|
||||
* respectively.
|
||||
*
|
||||
@@ -64,10 +64,10 @@ public abstract class MappingRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
* Set a RecordCreator that should be used for creating default output Records.
|
||||
* <p>Default is none: CCI's <code>Interaction.execute</code> variant
|
||||
* <p>Default is none: CCI's {@code Interaction.execute} variant
|
||||
* that returns an output Record will be called.
|
||||
* <p>Specify a RecordCreator here if you always need to call CCI's
|
||||
* <code>Interaction.execute</code> variant with a passed-in output Record.
|
||||
* {@code Interaction.execute} variant with a passed-in output Record.
|
||||
* This RecordCreator will then be invoked to create a default output Record instance.
|
||||
* @see javax.resource.cci.Interaction#execute(javax.resource.cci.InteractionSpec, Record)
|
||||
* @see javax.resource.cci.Interaction#execute(javax.resource.cci.InteractionSpec, Record, Record)
|
||||
@@ -80,8 +80,8 @@ public abstract class MappingRecordOperation extends EisOperation {
|
||||
/**
|
||||
* Execute the interaction encapsulated by this operation object.
|
||||
* @param inputObject the input data, to be converted to a Record
|
||||
* by the <code>createInputRecord</code> method
|
||||
* @return the output data extracted with the <code>extractOutputData</code> method
|
||||
* by the {@code createInputRecord} method
|
||||
* @return the output data extracted with the {@code extractOutputData} method
|
||||
* @throws DataAccessException if there is any problem
|
||||
* @see #createInputRecord
|
||||
* @see #extractOutputData
|
||||
@@ -94,7 +94,7 @@ public abstract class MappingRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
* Subclasses must implement this method to generate an input Record
|
||||
* from an input object passed into the <code>execute</code> method.
|
||||
* from an input object passed into the {@code execute} method.
|
||||
* @param inputObject the passed-in input object
|
||||
* @return the CCI input Record
|
||||
* @throws ResourceException if thrown by a CCI method, to be auto-converted
|
||||
@@ -106,7 +106,7 @@ public abstract class MappingRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
* Subclasses must implement this method to convert the Record returned
|
||||
* by CCI execution into a result object for the <code>execute</code> method.
|
||||
* by CCI execution into a result object for the {@code execute} method.
|
||||
* @param outputRecord the Record returned by CCI execution
|
||||
* @return the result object
|
||||
* @throws ResourceException if thrown by a CCI method, to be auto-converted
|
||||
@@ -119,7 +119,7 @@ public abstract class MappingRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
* Implementation of RecordCreator that calls the enclosing
|
||||
* class's <code>createInputRecord</code> method.
|
||||
* class's {@code createInputRecord} method.
|
||||
*/
|
||||
protected class RecordCreatorImpl implements RecordCreator {
|
||||
|
||||
@@ -137,7 +137,7 @@ public abstract class MappingRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
* Implementation of RecordExtractor that calls the enclosing
|
||||
* class's <code>extractOutputData</code> method.
|
||||
* class's {@code extractOutputData} method.
|
||||
*/
|
||||
protected class RecordExtractorImpl implements RecordExtractor {
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class SimpleRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
* Execute the CCI interaction encapsulated by this operation object.
|
||||
* <p>This method will call CCI's <code>Interaction.execute</code> variant
|
||||
* <p>This method will call CCI's {@code Interaction.execute} variant
|
||||
* that returns an output Record.
|
||||
* @param inputRecord the input record
|
||||
* @return the output record
|
||||
@@ -62,7 +62,7 @@ public class SimpleRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
* Execute the CCI interaction encapsulated by this operation object.
|
||||
* <p>This method will call CCI's <code>Interaction.execute</code> variant
|
||||
* <p>This method will call CCI's {@code Interaction.execute} variant
|
||||
* with a passed-in output Record.
|
||||
* @param inputRecord the input record
|
||||
* @param outputRecord the output record
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* The classes in this package represent EIS operations as threadsafe,
|
||||
* reusable objects. This higher level of CCI abstraction depends on the
|
||||
* lower-level abstraction in the <code>org.springframework.jca.cci.core</code> package.
|
||||
* Exceptions thrown are as in the <code>org.springframework.dao</code> package,
|
||||
* lower-level abstraction in the {@code org.springframework.jca.cci.core} package.
|
||||
* Exceptions thrown are as in the {@code org.springframework.dao} package,
|
||||
* meaning that code using this package does not need to worry about error handling.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* This package contains Spring's support for the Common Client Interface (CCI),
|
||||
* as defined by the J2EE Connector Architecture. It is conceptually similar
|
||||
* to the <code>org.springframework.jdbc</code> package, providing the same
|
||||
* to the {@code org.springframework.jdbc} package, providing the same
|
||||
* levels of data access abstraction.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -35,9 +35,9 @@ public interface BootstrapContextAware extends Aware {
|
||||
/**
|
||||
* Set the BootstrapContext that this object runs in.
|
||||
* <p>Invoked after population of normal bean properties but before an init
|
||||
* callback like InitializingBean's <code>afterPropertiesSet</code> or a
|
||||
* callback like InitializingBean's {@code afterPropertiesSet} or a
|
||||
* custom init-method. Invoked after ApplicationContextAware's
|
||||
* <code>setApplicationContext</code>.
|
||||
* {@code setApplicationContext}.
|
||||
* @param bootstrapContext BootstrapContext object to be used by this object
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
|
||||
|
||||
@@ -87,7 +87,7 @@ import org.springframework.util.StringUtils;
|
||||
* Note that "META-INF/applicationContext.xml" is the default context config
|
||||
* location, so it doesn't have to specified unless you intend to specify
|
||||
* different/additional config files. So in the default case, you may remove
|
||||
* the entire <code>config-property</code> section above.
|
||||
* the entire {@code config-property} section above.
|
||||
*
|
||||
* <p><b>For simple deployment needs, all you need to do is the following:</b>
|
||||
* Package all application classes into a RAR file (which is just a standard
|
||||
@@ -129,7 +129,7 @@ public class SpringContextResourceAdapter implements ResourceAdapter {
|
||||
* String that consists of multiple resource location, separated
|
||||
* by commas, semicolons, whitespace, or line breaks.
|
||||
* <p>This can be specified as "ContextConfigLocation" config
|
||||
* property in the <code>ra.xml</code> deployment descriptor.
|
||||
* property in the {@code ra.xml} deployment descriptor.
|
||||
* <p>The default is "classpath:META-INF/applicationContext.xml".
|
||||
*/
|
||||
public void setContextConfigLocation(String contextConfigLocation) {
|
||||
@@ -222,7 +222,7 @@ public class SpringContextResourceAdapter implements ResourceAdapter {
|
||||
}
|
||||
|
||||
/**
|
||||
* This implementation always returns <code>null</code>.
|
||||
* This implementation always returns {@code null}.
|
||||
*/
|
||||
public XAResource[] getXAResources(ActivationSpec[] activationSpecs) throws ResourceException {
|
||||
return null;
|
||||
|
||||
@@ -118,8 +118,8 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
|
||||
|
||||
|
||||
/**
|
||||
* This implementation returns <code>true</code> if a transaction manager
|
||||
* has been specified; <code>false</code> otherwise.
|
||||
* This implementation returns {@code true} if a transaction manager
|
||||
* has been specified; {@code false} otherwise.
|
||||
* @see #setTransactionManager
|
||||
* @see #setTransactionFactory
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
|
||||
}
|
||||
|
||||
/**
|
||||
* The standard JCA 1.5 version of <code>createEndpoint</code>.
|
||||
* The standard JCA 1.5 version of {@code createEndpoint}.
|
||||
* <p>This implementation delegates to {@link #createEndpointInternal()},
|
||||
* initializing the endpoint's XAResource before the endpoint gets invoked.
|
||||
*/
|
||||
@@ -139,7 +139,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
|
||||
}
|
||||
|
||||
/**
|
||||
* The alternative JCA 1.6 version of <code>createEndpoint</code>.
|
||||
* The alternative JCA 1.6 version of {@code createEndpoint}.
|
||||
* <p>This implementation delegates to {@link #createEndpointInternal()},
|
||||
* ignoring the specified timeout. It is only here for JCA 1.6 compliance.
|
||||
*/
|
||||
@@ -152,7 +152,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
|
||||
/**
|
||||
* Create the actual endpoint instance, as a subclass of the
|
||||
* {@link AbstractMessageEndpoint} inner class of this factory.
|
||||
* @return the actual endpoint instance (never <code>null</code>)
|
||||
* @return the actual endpoint instance (never {@code null})
|
||||
* @throws UnavailableException if no endpoint is available at present
|
||||
*/
|
||||
protected abstract AbstractMessageEndpoint createEndpointInternal()
|
||||
@@ -180,13 +180,13 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
|
||||
}
|
||||
|
||||
/**
|
||||
* This <code>beforeDelivery</code> implementation starts a transaction,
|
||||
* This {@code beforeDelivery} implementation starts a transaction,
|
||||
* if necessary, and exposes the endpoint ClassLoader as current
|
||||
* thread context ClassLoader.
|
||||
* <p>Note that the JCA 1.5 specification does not require a ResourceAdapter
|
||||
* to call this method before invoking the concrete endpoint. If this method
|
||||
* has not been called (check {@link #hasBeforeDeliveryBeenCalled()}), the
|
||||
* concrete endpoint method should call <code>beforeDelivery</code> and its
|
||||
* concrete endpoint method should call {@code beforeDelivery} and its
|
||||
* sibling {@link #afterDelivery()} explicitly, as part of its own processing.
|
||||
*/
|
||||
public void beforeDelivery(Method method) throws ResourceException {
|
||||
@@ -206,7 +206,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
|
||||
* Template method for exposing the endpoint's ClassLoader
|
||||
* (typically the ClassLoader that the message listener class
|
||||
* has been loaded with).
|
||||
* @return the endpoint ClassLoader (never <code>null</code>)
|
||||
* @return the endpoint ClassLoader (never {@code null})
|
||||
*/
|
||||
protected abstract ClassLoader getEndpointClassLoader();
|
||||
|
||||
@@ -230,7 +230,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
|
||||
}
|
||||
|
||||
/**
|
||||
* This <code>afterDelivery</code> implementation resets the thread context
|
||||
* This {@code afterDelivery} implementation resets the thread context
|
||||
* ClassLoader and completes the transaction, if any.
|
||||
* <p>Note that the JCA 1.5 specification does not require a ResourceAdapter
|
||||
* to call this method after invoking the concrete endpoint. See the
|
||||
|
||||
@@ -144,7 +144,7 @@ public class GenericMessageEndpointFactory extends AbstractMessageEndpointFactor
|
||||
* Internal exception thrown when a ResourceExeption has been encountered
|
||||
* during the endpoint invocation.
|
||||
* <p>Will only be used if the ResourceAdapter does not invoke the
|
||||
* endpoint's <code>beforeDelivery</code> and <code>afterDelivery</code>
|
||||
* endpoint's {@code beforeDelivery} and {@code afterDelivery}
|
||||
* directly, leavng it up to the concrete endpoint to apply those -
|
||||
* and to handle any ResourceExceptions thrown from them.
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ import javax.resource.spi.work.WorkManager;
|
||||
* interface, used for bootstrapping a JCA ResourceAdapter in a local environment.
|
||||
*
|
||||
* <p>Delegates to the given WorkManager and XATerminator, if any. Creates simple
|
||||
* local instances of <code>java.util.Timer</code>.
|
||||
* local instances of {@code java.util.Timer}.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0.3
|
||||
@@ -45,7 +45,7 @@ public class SimpleBootstrapContext implements BootstrapContext {
|
||||
/**
|
||||
* Create a new SimpleBootstrapContext for the given WorkManager,
|
||||
* with no XATerminator available.
|
||||
* @param workManager the JCA WorkManager to use (may be <code>null</code>)
|
||||
* @param workManager the JCA WorkManager to use (may be {@code null})
|
||||
*/
|
||||
public SimpleBootstrapContext(WorkManager workManager) {
|
||||
this.workManager = workManager;
|
||||
@@ -53,8 +53,8 @@ public class SimpleBootstrapContext implements BootstrapContext {
|
||||
|
||||
/**
|
||||
* Create a new SimpleBootstrapContext for the given WorkManager and XATerminator.
|
||||
* @param workManager the JCA WorkManager to use (may be <code>null</code>)
|
||||
* @param xaTerminator the JCA XATerminator to use (may be <code>null</code>)
|
||||
* @param workManager the JCA WorkManager to use (may be {@code null})
|
||||
* @param xaTerminator the JCA XATerminator to use (may be {@code null})
|
||||
*/
|
||||
public SimpleBootstrapContext(WorkManager workManager, XATerminator xaTerminator) {
|
||||
this.workManager = workManager;
|
||||
|
||||
@@ -56,7 +56,7 @@ import org.springframework.util.Assert;
|
||||
* This is for example appropriate on the Geronimo application server, where
|
||||
* WorkManager GBeans (e.g. Geronimo's default "DefaultWorkManager" GBean)
|
||||
* can be linked into the J2EE environment through "gbean-ref" entries
|
||||
* in the <code>geronimo-web.xml</code> deployment descriptor.
|
||||
* in the {@code geronimo-web.xml} deployment descriptor.
|
||||
*
|
||||
* <p><b>On JBoss and GlassFish, obtaining the default JCA WorkManager
|
||||
* requires special lookup steps.</b> See the
|
||||
@@ -131,8 +131,8 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport
|
||||
/**
|
||||
* Set whether to let {@link #execute} block until the work
|
||||
* has been actually started.
|
||||
* <p>Uses the JCA <code>startWork</code> operation underneath,
|
||||
* instead of the default <code>scheduleWork</code>.
|
||||
* <p>Uses the JCA {@code startWork} operation underneath,
|
||||
* instead of the default {@code scheduleWork}.
|
||||
* @see javax.resource.spi.work.WorkManager#startWork
|
||||
* @see javax.resource.spi.work.WorkManager#scheduleWork
|
||||
*/
|
||||
@@ -143,8 +143,8 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport
|
||||
/**
|
||||
* Set whether to let {@link #execute} block until the work
|
||||
* has been completed.
|
||||
* <p>Uses the JCA <code>doWork</code> operation underneath,
|
||||
* instead of the default <code>scheduleWork</code>.
|
||||
* <p>Uses the JCA {@code doWork} operation underneath,
|
||||
* instead of the default {@code scheduleWork}.
|
||||
* @see javax.resource.spi.work.WorkManager#doWork
|
||||
* @see javax.resource.spi.work.WorkManager#scheduleWork
|
||||
*/
|
||||
|
||||
@@ -54,7 +54,7 @@ public interface PlatformTransactionManager {
|
||||
* <p>An exception to the above rule is the read-only flag, which should be
|
||||
* ignored if no explicit read-only mode is supported. Essentially, the
|
||||
* read-only flag is just a hint for potential optimization.
|
||||
* @param definition TransactionDefinition instance (can be <code>null</code> for defaults),
|
||||
* @param definition TransactionDefinition instance (can be {@code null} for defaults),
|
||||
* describing propagation behavior, isolation level, timeout etc.
|
||||
* @return transaction status object representing the new or current transaction
|
||||
* @throws TransactionException in case of lookup, creation, or system errors
|
||||
@@ -84,7 +84,7 @@ public interface PlatformTransactionManager {
|
||||
* database right before commit, with the resulting DataAccessException
|
||||
* causing the transaction to fail. The original exception will be
|
||||
* propagated to the caller of this commit method in such a case.
|
||||
* @param status object returned by the <code>getTransaction</code> method
|
||||
* @param status object returned by the {@code getTransaction} method
|
||||
* @throws UnexpectedRollbackException in case of an unexpected rollback
|
||||
* that the transaction coordinator initiated
|
||||
* @throws HeuristicCompletionException in case of a transaction failure
|
||||
@@ -107,7 +107,7 @@ public interface PlatformTransactionManager {
|
||||
* The transaction will already have been completed and cleaned up when commit
|
||||
* returns, even in case of a commit exception. Consequently, a rollback call
|
||||
* after commit failure will lead to an IllegalTransactionStateException.
|
||||
* @param status object returned by the <code>getTransaction</code> method
|
||||
* @param status object returned by the {@code getTransaction} method
|
||||
* @throws TransactionSystemException in case of rollback or system errors
|
||||
* (typically caused by fundamental resource failures)
|
||||
* @throws IllegalTransactionStateException if the given transaction
|
||||
|
||||
@@ -38,8 +38,8 @@ public interface SavepointManager {
|
||||
|
||||
/**
|
||||
* Create a new savepoint. You can roll back to a specific savepoint
|
||||
* via <code>rollbackToSavepoint</code>, and explicitly release a
|
||||
* savepoint that you don't need anymore via <code>releaseSavepoint</code>.
|
||||
* via {@code rollbackToSavepoint}, and explicitly release a
|
||||
* savepoint that you don't need anymore via {@code releaseSavepoint}.
|
||||
* <p>Note that most transaction managers will automatically release
|
||||
* savepoints at transaction completion.
|
||||
* @return a savepoint object, to be passed into rollbackToSavepoint
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.sql.Connection;
|
||||
* <p>The {@link #isReadOnly() read-only flag} applies to any transaction context,
|
||||
* whether backed by an actual resource transaction or operating non-transactionally
|
||||
* at the resource level. In the latter case, the flag will only apply to managed
|
||||
* resources within the application, such as a Hibernate <code>Session</code>.
|
||||
* resources within the application, such as a Hibernate {@code Session}.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 08.05.2003
|
||||
@@ -55,15 +55,15 @@ public interface TransactionDefinition {
|
||||
* Support a current transaction; execute non-transactionally if none exists.
|
||||
* Analogous to the EJB transaction attribute of the same name.
|
||||
* <p><b>NOTE:</b> For transaction managers with transaction synchronization,
|
||||
* <code>PROPAGATION_SUPPORTS</code> is slightly different from no transaction
|
||||
* {@code PROPAGATION_SUPPORTS} is slightly different from no transaction
|
||||
* at all, as it defines a transaction scope that synchronization might apply to.
|
||||
* As a consequence, the same resources (a JDBC <code>Connection</code>, a
|
||||
* Hibernate <code>Session</code>, etc) will be shared for the entire specified
|
||||
* As a consequence, the same resources (a JDBC {@code Connection}, a
|
||||
* Hibernate {@code Session}, etc) will be shared for the entire specified
|
||||
* scope. Note that the exact behavior depends on the actual synchronization
|
||||
* configuration of the transaction manager!
|
||||
* <p>In general, use <code>PROPAGATION_SUPPORTS</code> with care! In particular, do
|
||||
* not rely on <code>PROPAGATION_REQUIRED</code> or <code>PROPAGATION_REQUIRES_NEW</code>
|
||||
* <i>within</i> a <code>PROPAGATION_SUPPORTS</code> scope (which may lead to
|
||||
* <p>In general, use {@code PROPAGATION_SUPPORTS} with care! In particular, do
|
||||
* not rely on {@code PROPAGATION_REQUIRED} or {@code PROPAGATION_REQUIRES_NEW}
|
||||
* <i>within</i> a {@code PROPAGATION_SUPPORTS} scope (which may lead to
|
||||
* synchronization conflicts at runtime). If such nesting is unavoidable, make sure
|
||||
* to configure your transaction manager appropriately (typically switching to
|
||||
* "synchronization on actual transaction").
|
||||
@@ -75,7 +75,7 @@ public interface TransactionDefinition {
|
||||
/**
|
||||
* Support a current transaction; throw an exception if no current transaction
|
||||
* exists. Analogous to the EJB transaction attribute of the same name.
|
||||
* <p>Note that transaction synchronization within a <code>PROPAGATION_MANDATORY</code>
|
||||
* <p>Note that transaction synchronization within a {@code PROPAGATION_MANDATORY}
|
||||
* scope will always be driven by the surrounding transaction.
|
||||
*/
|
||||
int PROPAGATION_MANDATORY = 2;
|
||||
@@ -86,9 +86,9 @@ public interface TransactionDefinition {
|
||||
* <p><b>NOTE:</b> Actual transaction suspension will not work out-of-the-box
|
||||
* on all transaction managers. This in particular applies to
|
||||
* {@link org.springframework.transaction.jta.JtaTransactionManager},
|
||||
* which requires the <code>javax.transaction.TransactionManager</code>
|
||||
* which requires the {@code javax.transaction.TransactionManager}
|
||||
* to be made available it to it (which is server-specific in standard J2EE).
|
||||
* <p>A <code>PROPAGATION_REQUIRES_NEW</code> scope always defines its own
|
||||
* <p>A {@code PROPAGATION_REQUIRES_NEW} scope always defines its own
|
||||
* transaction synchronizations. Existing synchronizations will be suspended
|
||||
* and resumed appropriately.
|
||||
* @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
|
||||
@@ -101,10 +101,10 @@ public interface TransactionDefinition {
|
||||
* <p><b>NOTE:</b> Actual transaction suspension will not work out-of-the-box
|
||||
* on all transaction managers. This in particular applies to
|
||||
* {@link org.springframework.transaction.jta.JtaTransactionManager},
|
||||
* which requires the <code>javax.transaction.TransactionManager</code>
|
||||
* which requires the {@code javax.transaction.TransactionManager}
|
||||
* to be made available it to it (which is server-specific in standard J2EE).
|
||||
* <p>Note that transaction synchronization is <i>not</i> available within a
|
||||
* <code>PROPAGATION_NOT_SUPPORTED</code> scope. Existing synchronizations
|
||||
* {@code PROPAGATION_NOT_SUPPORTED} scope. Existing synchronizations
|
||||
* will be suspended and resumed appropriately.
|
||||
* @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
|
||||
*/
|
||||
@@ -114,7 +114,7 @@ public interface TransactionDefinition {
|
||||
* Do not support a current transaction; throw an exception if a current transaction
|
||||
* exists. Analogous to the EJB transaction attribute of the same name.
|
||||
* <p>Note that transaction synchronization is <i>not</i> available within a
|
||||
* <code>PROPAGATION_NEVER</code> scope.
|
||||
* {@code PROPAGATION_NEVER} scope.
|
||||
*/
|
||||
int PROPAGATION_NEVER = 5;
|
||||
|
||||
@@ -175,8 +175,8 @@ public interface TransactionDefinition {
|
||||
* are prevented.
|
||||
* <p>This level includes the prohibitions in {@link #ISOLATION_REPEATABLE_READ}
|
||||
* and further prohibits the situation where one transaction reads all rows that
|
||||
* satisfy a <code>WHERE</code> condition, a second transaction inserts a row
|
||||
* that satisfies that <code>WHERE</code> condition, and the first transaction
|
||||
* satisfy a {@code WHERE} condition, a second transaction inserts a row
|
||||
* that satisfies that {@code WHERE} condition, and the first transaction
|
||||
* re-reads for the same condition, retrieving the additional "phantom" row
|
||||
* in the second read.
|
||||
* @see java.sql.Connection#TRANSACTION_SERIALIZABLE
|
||||
@@ -193,7 +193,7 @@ public interface TransactionDefinition {
|
||||
|
||||
/**
|
||||
* Return the propagation behavior.
|
||||
* <p>Must return one of the <code>PROPAGATION_XXX</code> constants
|
||||
* <p>Must return one of the {@code PROPAGATION_XXX} constants
|
||||
* defined on {@link TransactionDefinition this interface}.
|
||||
* @return the propagation behavior
|
||||
* @see #PROPAGATION_REQUIRED
|
||||
@@ -203,7 +203,7 @@ public interface TransactionDefinition {
|
||||
|
||||
/**
|
||||
* Return the isolation level.
|
||||
* <p>Must return one of the <code>ISOLATION_XXX</code> constants
|
||||
* <p>Must return one of the {@code ISOLATION_XXX} constants
|
||||
* defined on {@link TransactionDefinition this interface}.
|
||||
* <p>Only makes sense in combination with {@link #PROPAGATION_REQUIRED}
|
||||
* or {@link #PROPAGATION_REQUIRES_NEW}.
|
||||
@@ -232,23 +232,23 @@ public interface TransactionDefinition {
|
||||
* operating non-transactionally at the resource level
|
||||
* ({@link #PROPAGATION_SUPPORTS}). In the latter case, the flag will
|
||||
* only apply to managed resources within the application, such as a
|
||||
* Hibernate <code>Session</code>.
|
||||
<< * <p>This just serves as a hint for the actual transaction subsystem;
|
||||
* Hibernate {@code Session}.
|
||||
<< * <p>This just serves as a hint for the actual transaction subsystem;
|
||||
* it will <i>not necessarily</i> cause failure of write access attempts.
|
||||
* A transaction manager which cannot interpret the read-only hint will
|
||||
* <i>not</i> throw an exception when asked for a read-only transaction.
|
||||
* @return <code>true</code> if the transaction is to be optimized as read-only
|
||||
* @return {@code true} if the transaction is to be optimized as read-only
|
||||
* @see org.springframework.transaction.support.TransactionSynchronization#beforeCommit(boolean)
|
||||
* @see org.springframework.transaction.support.TransactionSynchronizationManager#isCurrentTransactionReadOnly()
|
||||
*/
|
||||
boolean isReadOnly();
|
||||
|
||||
/**
|
||||
* Return the name of this transaction. Can be <code>null</code>.
|
||||
* 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).
|
||||
* <p>In case of Spring's declarative transactions, the exposed name will be
|
||||
* the <code>fully-qualified class name + "." + method name</code> (by default).
|
||||
* the {@code fully-qualified class name + "." + method name} (by default).
|
||||
* @return the name of this transaction
|
||||
* @see org.springframework.transaction.interceptor.TransactionAspectSupport
|
||||
* @see org.springframework.transaction.support.TransactionSynchronizationManager#getCurrentTransactionName()
|
||||
|
||||
@@ -66,7 +66,7 @@ public class TransactionSystemException extends TransactionException {
|
||||
/**
|
||||
* Return the application exception that was thrown before this transaction exception,
|
||||
* if any.
|
||||
* @return the application exception, or <code>null</code> if none set
|
||||
* @return the application exception, or {@code null} if none set
|
||||
*/
|
||||
public final Throwable getApplicationException() {
|
||||
return this.applicationException;
|
||||
@@ -75,7 +75,7 @@ public class TransactionSystemException extends TransactionException {
|
||||
/**
|
||||
* Return the exception that was the first to be thrown within the failed transaction:
|
||||
* i.e. the application exception, if any, or the TransactionSystemException's own cause.
|
||||
* @return the original exception, or <code>null</code> if there was none
|
||||
* @return the original exception, or {@code null} if there was none
|
||||
*/
|
||||
public Throwable getOriginalException() {
|
||||
return (this.applicationException != null ? this.applicationException : getCause());
|
||||
|
||||
@@ -62,7 +62,7 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
|
||||
|
||||
/**
|
||||
* Create a default AnnotationTransactionAttributeSource, supporting
|
||||
* public methods that carry the <code>Transactional</code> annotation
|
||||
* public methods that carry the {@code Transactional} annotation
|
||||
* or the EJB3 {@link javax.ejb.TransactionAttribute} annotation.
|
||||
*/
|
||||
public AnnotationTransactionAttributeSource() {
|
||||
@@ -71,10 +71,10 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
|
||||
|
||||
/**
|
||||
* Create a custom AnnotationTransactionAttributeSource, supporting
|
||||
* public methods that carry the <code>Transactional</code> annotation
|
||||
* public methods that carry the {@code Transactional} annotation
|
||||
* or the EJB3 {@link javax.ejb.TransactionAttribute} annotation.
|
||||
* @param publicMethodsOnly whether to support public methods that carry
|
||||
* the <code>Transactional</code> annotation only (typically for use
|
||||
* the {@code Transactional} annotation only (typically for use
|
||||
* with proxy-based AOP), or protected/private methods as well
|
||||
* (typically used with AspectJ class weaving)
|
||||
*/
|
||||
@@ -135,11 +135,11 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
|
||||
* <p>This implementation delegates to configured
|
||||
* {@link TransactionAnnotationParser TransactionAnnotationParsers}
|
||||
* for parsing known annotations into Spring's metadata attribute class.
|
||||
* Returns <code>null</code> if it's not transactional.
|
||||
* Returns {@code null} if it's not transactional.
|
||||
* <p>Can be overridden to support custom annotations that carry transaction metadata.
|
||||
* @param ae the annotated method or class
|
||||
* @return TransactionAttribute the configured transaction attribute,
|
||||
* or <code>null</code> if none was found
|
||||
* or {@code null} if none was found
|
||||
*/
|
||||
protected TransactionAttribute determineTransactionAttribute(AnnotatedElement ae) {
|
||||
for (TransactionAnnotationParser annotationParser : this.annotationParsers) {
|
||||
|
||||
@@ -68,10 +68,10 @@ public enum Isolation {
|
||||
/**
|
||||
* A constant indicating that dirty reads, non-repeatable reads and phantom
|
||||
* reads are prevented. This level includes the prohibitions in
|
||||
* <code>ISOLATION_REPEATABLE_READ</code> and further prohibits the situation
|
||||
* where one transaction reads all rows that satisfy a <code>WHERE</code>
|
||||
* {@code ISOLATION_REPEATABLE_READ} and further prohibits the situation
|
||||
* where one transaction reads all rows that satisfy a {@code WHERE}
|
||||
* condition, a second transaction inserts a row that satisfies that
|
||||
* <code>WHERE</code> condition, and the first transaction rereads for the
|
||||
* {@code WHERE} condition, and the first transaction rereads for the
|
||||
* same condition, retrieving the additional "phantom" row in the second read.
|
||||
* @see java.sql.Connection#TRANSACTION_SERIALIZABLE
|
||||
*/
|
||||
|
||||
@@ -60,7 +60,7 @@ public enum Propagation {
|
||||
* Analogous to EJB transaction attribute of the same name.
|
||||
* <p>Note: Actual transaction suspension will not work on out-of-the-box
|
||||
* on all transaction managers. This in particular applies to JtaTransactionManager,
|
||||
* which requires the <code>javax.transaction.TransactionManager</code> to be
|
||||
* which requires the {@code javax.transaction.TransactionManager} to be
|
||||
* made available it to it (which is server-specific in standard J2EE).
|
||||
* @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ public enum Propagation {
|
||||
* Analogous to EJB transaction attribute of the same name.
|
||||
* <p>Note: Actual transaction suspension will not work on out-of-the-box
|
||||
* on all transaction managers. This in particular applies to JtaTransactionManager,
|
||||
* which requires the <code>javax.transaction.TransactionManager</code> to be
|
||||
* which requires the {@code javax.transaction.TransactionManager} to be
|
||||
* made available it to it (which is server-specific in standard J2EE).
|
||||
* @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
|
||||
*/
|
||||
|
||||
@@ -38,11 +38,11 @@ public interface TransactionAnnotationParser {
|
||||
* Parse the transaction attribute for the given method or class,
|
||||
* based on a known annotation type.
|
||||
* <p>This essentially parses a known transaction annotation into Spring's
|
||||
* metadata attribute class. Returns <code>null</code> if the method/class
|
||||
* metadata attribute class. Returns {@code null} if the method/class
|
||||
* is not transactional.
|
||||
* @param ae the annotated method or class
|
||||
* @return TransactionAttribute the configured transaction attribute,
|
||||
* or <code>null</code> if none was found
|
||||
* or {@code null} if none was found
|
||||
* @see AnnotationTransactionAttributeSource#determineTransactionAttribute
|
||||
*/
|
||||
TransactionAttribute parseTransactionAnnotation(AnnotatedElement ae);
|
||||
|
||||
@@ -85,8 +85,8 @@ public @interface Transactional {
|
||||
int timeout() default TransactionDefinition.TIMEOUT_DEFAULT;
|
||||
|
||||
/**
|
||||
* <code>true</code> if the transaction is read-only.
|
||||
* Defaults to <code>false</code>.
|
||||
* {@code true} if the transaction is read-only.
|
||||
* Defaults to {@code false}.
|
||||
* <p>This just serves as a hint for the actual transaction subsystem;
|
||||
* it will <i>not necessarily</i> cause failure of write access attempts.
|
||||
* A transaction manager which cannot interpret the read-only hint will
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.transaction.interceptor.TransactionInterceptor;
|
||||
* <p>By default, all proxies are created as JDK proxies. This may cause some
|
||||
* problems if you are injecting objects as concrete classes rather than
|
||||
* interfaces. To overcome this restriction you can set the
|
||||
* '<code>proxy-target-class</code>' attribute to '<code>true</code>', which
|
||||
* '{@code proxy-target-class}' attribute to '{@code true}', which
|
||||
* will result in class-based proxies being created.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.w3c.dom.Element;
|
||||
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
|
||||
/**
|
||||
* <code>NamespaceHandler</code> allowing for the configuration of
|
||||
* {@code NamespaceHandler} allowing for the configuration of
|
||||
* declarative transaction management using either XML or using annotations.
|
||||
*
|
||||
* <p>This namespace handler is the central piece of functionality in the
|
||||
@@ -29,8 +29,8 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
* to declaratively manage transactions.
|
||||
*
|
||||
* <p>One approach uses transaction semantics defined in XML using the
|
||||
* <code><tx:advice></code> elements, the other uses annotations
|
||||
* in combination with the <code><tx:annotation-driven></code> element.
|
||||
* {@code <tx:advice>} elements, the other uses annotations
|
||||
* in combination with the {@code <tx:annotation-driven>} element.
|
||||
* Both approached are detailed to great extent in the Spring reference manual.
|
||||
*
|
||||
* @author Rob Harrop
|
||||
|
||||
@@ -75,9 +75,9 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
|
||||
/**
|
||||
* Determine the transaction attribute for this method invocation.
|
||||
* <p>Defaults to the class's transaction attribute if no method attribute is found.
|
||||
* @param method the method for the current invocation (never <code>null</code>)
|
||||
* @param targetClass the target class for this invocation (may be <code>null</code>)
|
||||
* @return TransactionAttribute for this method, or <code>null</code> if the method
|
||||
* @param method the method for the current invocation (never {@code null})
|
||||
* @param targetClass the target class for this invocation (may be {@code null})
|
||||
* @return TransactionAttribute for this method, or {@code null} if the method
|
||||
* is not transactional
|
||||
*/
|
||||
public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) {
|
||||
@@ -115,9 +115,9 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
|
||||
* Determine a cache key for the given method and target class.
|
||||
* <p>Must not produce same key for overloaded methods.
|
||||
* Must produce same key for different instances of the same method.
|
||||
* @param method the method (never <code>null</code>)
|
||||
* @param targetClass the target class (may be <code>null</code>)
|
||||
* @return the cache key (never <code>null</code>)
|
||||
* @param method the method (never {@code null})
|
||||
* @param targetClass the target class (may be {@code null})
|
||||
* @return the cache key (never {@code null})
|
||||
*/
|
||||
protected Object getCacheKey(Method method, Class<?> targetClass) {
|
||||
return new DefaultCacheKey(method, targetClass);
|
||||
@@ -172,7 +172,7 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
|
||||
* for the given method, if any.
|
||||
* @param method the method to retrieve the attribute for
|
||||
* @return all transaction attribute associated with this method
|
||||
* (or <code>null</code> if none)
|
||||
* (or {@code null} if none)
|
||||
*/
|
||||
protected abstract TransactionAttribute findTransactionAttribute(Method method);
|
||||
|
||||
@@ -181,14 +181,14 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
|
||||
* for the given class, if any.
|
||||
* @param clazz the class to retrieve the attribute for
|
||||
* @return all transaction attribute associated with this class
|
||||
* (or <code>null</code> if none)
|
||||
* (or {@code null} if none)
|
||||
*/
|
||||
protected abstract TransactionAttribute findTransactionAttribute(Class<?> clazz);
|
||||
|
||||
|
||||
/**
|
||||
* Should only public methods be allowed to have transactional semantics?
|
||||
* <p>The default implementation returns <code>false</code>.
|
||||
* <p>The default implementation returns {@code false}.
|
||||
*/
|
||||
protected boolean allowPublicMethodsOnly() {
|
||||
return false;
|
||||
|
||||
@@ -97,7 +97,7 @@ public class DefaultTransactionAttribute extends DefaultTransactionDefinition im
|
||||
|
||||
/**
|
||||
* Return an identifying description for this transaction attribute.
|
||||
* <p>Available to subclasses, for inclusion in their <code>toString()</code> result.
|
||||
* <p>Available to subclasses, for inclusion in their {@code toString()} result.
|
||||
*/
|
||||
protected final StringBuilder getAttributeDescription() {
|
||||
StringBuilder result = getDefinitionDescription();
|
||||
|
||||
@@ -69,7 +69,7 @@ public class MethodMapTransactionAttributeSource
|
||||
* Set a name/attribute map, consisting of "FQCN.method" method names
|
||||
* (e.g. "com.mycompany.mycode.MyClass.myMethod") and
|
||||
* {@link TransactionAttribute} instances (or Strings to be converted
|
||||
* to <code>TransactionAttribute</code> instances).
|
||||
* to {@code TransactionAttribute} instances).
|
||||
* <p>Intended for configuration via setter injection, typically within
|
||||
* a Spring bean factory. Relies on {@link #afterPropertiesSet()}
|
||||
* being called afterwards.
|
||||
@@ -99,7 +99,7 @@ public class MethodMapTransactionAttributeSource
|
||||
|
||||
/**
|
||||
* Initialize the specified {@link #setMethodMap(java.util.Map) "methodMap"}, if any.
|
||||
* @param methodMap Map from method names to <code>TransactionAttribute</code> instances
|
||||
* @param methodMap Map from method names to {@code TransactionAttribute} instances
|
||||
* @see #setMethodMap
|
||||
*/
|
||||
protected void initMethodMap(Map<String, TransactionAttribute> methodMap) {
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.transaction.interceptor;
|
||||
|
||||
/**
|
||||
* Tag subclass of {@link RollbackRuleAttribute} that has the opposite behavior
|
||||
* to the <code>RollbackRuleAttribute</code> superclass.
|
||||
* to the {@code RollbackRuleAttribute} superclass.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @since 09.04.2003
|
||||
@@ -26,9 +26,9 @@ package org.springframework.transaction.interceptor;
|
||||
public class NoRollbackRuleAttribute extends RollbackRuleAttribute {
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>NoRollbackRuleAttribute</code> class
|
||||
* Create a new instance of the {@code NoRollbackRuleAttribute} class
|
||||
* for the supplied {@link Throwable} class.
|
||||
* @param clazz the <code>Throwable</code> class
|
||||
* @param clazz the {@code Throwable} class
|
||||
* @see RollbackRuleAttribute#RollbackRuleAttribute(Class)
|
||||
*/
|
||||
public NoRollbackRuleAttribute(Class clazz) {
|
||||
@@ -36,8 +36,8 @@ public class NoRollbackRuleAttribute extends RollbackRuleAttribute {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>NoRollbackRuleAttribute</code> class
|
||||
* for the supplied <code>exceptionName</code>.
|
||||
* Create a new instance of the {@code NoRollbackRuleAttribute} class
|
||||
* for the supplied {@code exceptionName}.
|
||||
* @param exceptionName the exception name pattern
|
||||
* @see RollbackRuleAttribute#RollbackRuleAttribute(String)
|
||||
*/
|
||||
|
||||
@@ -50,13 +50,13 @@ public class RollbackRuleAttribute implements Serializable{
|
||||
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>RollbackRuleAttribute</code> class.
|
||||
* Create a new instance of the {@code RollbackRuleAttribute} class.
|
||||
* <p>This is the preferred way to construct a rollback rule that matches
|
||||
* the supplied {@link Exception} class (and subclasses).
|
||||
* @param clazz throwable class; must be {@link Throwable} or a subclass
|
||||
* of <code>Throwable</code>
|
||||
* @throws IllegalArgumentException if the supplied <code>clazz</code> is
|
||||
* not a <code>Throwable</code> type or is <code>null</code>
|
||||
* of {@code Throwable}
|
||||
* @throws IllegalArgumentException if the supplied {@code clazz} is
|
||||
* not a {@code Throwable} type or is {@code null}
|
||||
*/
|
||||
public RollbackRuleAttribute(Class clazz) {
|
||||
Assert.notNull(clazz, "'clazz' cannot be null.");
|
||||
@@ -68,11 +68,11 @@ public class RollbackRuleAttribute implements Serializable{
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>RollbackRuleAttribute</code> class
|
||||
* for the given <code>exceptionName</code>.
|
||||
* Create a new instance of the {@code RollbackRuleAttribute} class
|
||||
* for the given {@code exceptionName}.
|
||||
* <p>This can be a substring, with no wildcard support at present. A value
|
||||
* of "ServletException" would match
|
||||
* <code>javax.servlet.ServletException</code> and subclasses, for example.
|
||||
* {@code javax.servlet.ServletException} and subclasses, for example.
|
||||
* <p><b>NB:</b> Consider carefully how specific the pattern is, and
|
||||
* whether to include package information (which is not mandatory). For
|
||||
* example, "Exception" will match nearly anything, and will probably hide
|
||||
@@ -83,7 +83,7 @@ public class RollbackRuleAttribute implements Serializable{
|
||||
* @param exceptionName the exception name pattern; can also be a fully
|
||||
* package-qualified class name
|
||||
* @throws IllegalArgumentException if the supplied
|
||||
* <code>exceptionName</code> is <code>null</code> or empty
|
||||
* {@code exceptionName} is {@code null} or empty
|
||||
*/
|
||||
public RollbackRuleAttribute(String exceptionName) {
|
||||
Assert.hasText(exceptionName, "'exceptionName' cannot be null or empty.");
|
||||
@@ -100,8 +100,8 @@ public class RollbackRuleAttribute implements Serializable{
|
||||
|
||||
/**
|
||||
* Return the depth of the superclass matching.
|
||||
* <p><code>0</code> means <code>ex</code> matches exactly. Returns
|
||||
* <code>-1</code> if there is no match. Otherwise, returns depth with the
|
||||
* <p>{@code 0} means {@code ex} matches exactly. Returns
|
||||
* {@code -1} if there is no match. Otherwise, returns depth with the
|
||||
* lowest depth winning.
|
||||
*/
|
||||
public int getDepth(Throwable ex) {
|
||||
|
||||
@@ -97,8 +97,8 @@ public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute i
|
||||
|
||||
|
||||
/**
|
||||
* Set the list of <code>RollbackRuleAttribute</code> objects
|
||||
* (and/or <code>NoRollbackRuleAttribute</code> objects) to apply.
|
||||
* Set the list of {@code RollbackRuleAttribute} objects
|
||||
* (and/or {@code NoRollbackRuleAttribute} objects) to apply.
|
||||
* @see RollbackRuleAttribute
|
||||
* @see NoRollbackRuleAttribute
|
||||
*/
|
||||
@@ -107,8 +107,8 @@ public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute i
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of <code>RollbackRuleAttribute</code> objects
|
||||
* (never <code>null</code>).
|
||||
* Return the list of {@code RollbackRuleAttribute} objects
|
||||
* (never {@code null}).
|
||||
*/
|
||||
public List<RollbackRuleAttribute> getRollbackRules() {
|
||||
if (this.rollbackRules == null) {
|
||||
|
||||
@@ -44,16 +44,16 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* <p>Subclasses are responsible for calling methods in this class in the correct order.
|
||||
*
|
||||
* <p>If no transaction name has been specified in the <code>TransactionAttribute</code>,
|
||||
* the exposed name will be the <code>fully-qualified class name + "." + method name</code>
|
||||
* <p>If no transaction name has been specified in the {@code TransactionAttribute},
|
||||
* the exposed name will be the {@code fully-qualified class name + "." + method name}
|
||||
* (by default).
|
||||
*
|
||||
* <p>Uses the <b>Strategy</b> design pattern. A <code>PlatformTransactionManager</code>
|
||||
* <p>Uses the <b>Strategy</b> design pattern. A {@code PlatformTransactionManager}
|
||||
* implementation will perform the actual transaction management, and a
|
||||
* <code>TransactionAttributeSource</code> is used for determining transaction definitions.
|
||||
* {@code TransactionAttributeSource} is used for determining transaction definitions.
|
||||
*
|
||||
* <p>A transaction aspect is serializable if its <code>PlatformTransactionManager</code>
|
||||
* and <code>TransactionAttributeSource</code> are serializable.
|
||||
* <p>A transaction aspect is serializable if its {@code PlatformTransactionManager}
|
||||
* and {@code TransactionAttributeSource} are serializable.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
@@ -68,7 +68,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
// class for AspectJ aspects (which are not allowed to implement Serializable)!
|
||||
|
||||
/**
|
||||
* Holder to support the <code>currentTransactionStatus()</code> method,
|
||||
* Holder to support the {@code currentTransactionStatus()} method,
|
||||
* and to support communication between different cooperating advices
|
||||
* (e.g. before and after advice) if the aspect involves more than a
|
||||
* single method (as will be the case for around advice).
|
||||
@@ -85,11 +85,11 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
* An around advice such as an AOP Alliance MethodInterceptor can hold a
|
||||
* reference to the TransactionInfo throughout the aspect method.
|
||||
* <p>A TransactionInfo will be returned even if no transaction was created.
|
||||
* The <code>TransactionInfo.hasTransaction()</code> method can be used to query this.
|
||||
* The {@code TransactionInfo.hasTransaction()} method can be used to query this.
|
||||
* <p>To find out about specific transaction characteristics, consider using
|
||||
* TransactionSynchronizationManager's <code>isSynchronizationActive()</code>
|
||||
* and/or <code>isActualTransactionActive()</code> methods.
|
||||
* @return TransactionInfo bound to this thread, or <code>null</code> if none
|
||||
* TransactionSynchronizationManager's {@code isSynchronizationActive()}
|
||||
* and/or {@code isActualTransactionActive()} methods.
|
||||
* @return TransactionInfo bound to this thread, or {@code null} if none
|
||||
* @see TransactionInfo#hasTransaction()
|
||||
* @see org.springframework.transaction.support.TransactionSynchronizationManager#isSynchronizationActive()
|
||||
* @see org.springframework.transaction.support.TransactionSynchronizationManager#isActualTransactionActive()
|
||||
@@ -262,7 +262,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
* @param method the method about to execute
|
||||
* @param targetClass the class that the method is being invoked on
|
||||
* @return a TransactionInfo object, whether or not a transaction was created.
|
||||
* The <code>hasTransaction()</code> method on TransactionInfo can be used to
|
||||
* The {@code hasTransaction()} method on TransactionInfo can be used to
|
||||
* tell if there was a transaction created.
|
||||
* @see #getTransactionAttributeSource()
|
||||
*/
|
||||
@@ -307,11 +307,11 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
* Create a transaction if necessary based on the given TransactionAttribute.
|
||||
* <p>Allows callers to perform custom TransactionAttribute lookups through
|
||||
* the TransactionAttributeSource.
|
||||
* @param txAttr the TransactionAttribute (may be <code>null</code>)
|
||||
* @param txAttr the TransactionAttribute (may be {@code null})
|
||||
* @param joinpointIdentification the fully qualified method name
|
||||
* (used for monitoring and logging purposes)
|
||||
* @return a TransactionInfo object, whether or not a transaction was created.
|
||||
* The <code>hasTransaction()</code> method on TransactionInfo can be used to
|
||||
* The {@code hasTransaction()} method on TransactionInfo can be used to
|
||||
* tell if there was a transaction created.
|
||||
* @see #getTransactionAttributeSource()
|
||||
*/
|
||||
@@ -345,7 +345,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
|
||||
/**
|
||||
* Prepare a TransactionInfo for the given attribute and status object.
|
||||
* @param txAttr the TransactionAttribute (may be <code>null</code>)
|
||||
* @param txAttr the TransactionAttribute (may be {@code null})
|
||||
* @param joinpointIdentification the fully qualified method name
|
||||
* (used for monitoring and logging purposes)
|
||||
* @param status the TransactionStatus for the current transaction
|
||||
@@ -449,7 +449,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
/**
|
||||
* Reset the TransactionInfo ThreadLocal.
|
||||
* <p>Call this in all cases: exception or normal return!
|
||||
* @param txInfo information about the current transaction (may be <code>null</code>)
|
||||
* @param txInfo information about the current transaction (may be {@code null})
|
||||
*/
|
||||
protected void cleanupTransactionInfo(TransactionInfo txInfo) {
|
||||
if (txInfo != null) {
|
||||
|
||||
@@ -19,8 +19,8 @@ package org.springframework.transaction.interceptor;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
|
||||
/**
|
||||
* This interface adds a <code>rollbackOn</code> specification to {@link TransactionDefinition}.
|
||||
* As custom <code>rollbackOn</code> is only possible with AOP, this class resides
|
||||
* This interface adds a {@code rollbackOn} specification to {@link TransactionDefinition}.
|
||||
* As custom {@code rollbackOn} is only possible with AOP, this class resides
|
||||
* in the AOP transaction package.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
|
||||
@@ -22,9 +22,9 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* PropertyEditor for {@link TransactionAttribute} objects. Accepts a String of form
|
||||
* <p><code>PROPAGATION_NAME,ISOLATION_NAME,readOnly,timeout_NNNN,+Exception1,-Exception2</code>
|
||||
* <p>{@code PROPAGATION_NAME, ISOLATION_NAME, readOnly, timeout_NNNN,+Exception1,-Exception2}
|
||||
* <p>where only propagation code is required. For example:
|
||||
* <p><code>PROPAGATION_MANDATORY,ISOLATION_DEFAULT</code>
|
||||
* <p>{@code PROPAGATION_MANDATORY, ISOLATION_DEFAULT}
|
||||
*
|
||||
* <p>The tokens can be in <strong>any</strong> order. Propagation and isolation codes
|
||||
* must use the names of the constants in the TransactionDefinition class. Timeout values
|
||||
|
||||
@@ -34,12 +34,12 @@ public interface TransactionAttributeSource {
|
||||
|
||||
/**
|
||||
* Return the transaction attribute for the given method,
|
||||
* or <code>null</code> if the method is non-transactional.
|
||||
* or {@code null} if the method is non-transactional.
|
||||
* @param method the method to introspect
|
||||
* @param targetClass the target class. May be <code>null</code>,
|
||||
* @param targetClass the target class. May be {@code null},
|
||||
* in which case the declaring class of the method must be used.
|
||||
* @return TransactionAttribute the matching transaction attribute,
|
||||
* or <code>null</code> if none found
|
||||
* or {@code null} if none found
|
||||
*/
|
||||
TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass);
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ import org.springframework.util.StringUtils;
|
||||
* {@link TransactionAttributeEditor} in this package.
|
||||
*
|
||||
* <p>Strings are in property syntax, with the form:<br>
|
||||
* <code>FQCN.methodName=<transaction attribute string></code>
|
||||
* {@code FQCN.methodName=<transaction attribute string>}
|
||||
*
|
||||
* <p>For example:<br>
|
||||
* <code>com.mycompany.mycode.MyClass.myMethod=PROPAGATION_MANDATORY,ISOLATION_DEFAULT</code>
|
||||
* {@code com.mycompany.mycode.MyClass.myMethod=PROPAGATION_MANDATORY,ISOLATION_DEFAULT}
|
||||
*
|
||||
* <p><b>NOTE:</b> The specified class must be the one where the methods are
|
||||
* defined; in case of implementing an interface, the interface class name.
|
||||
@@ -44,7 +44,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
* @since 26.04.2003
|
||||
* @see org.springframework.transaction.interceptor.TransactionAttributeEditor
|
||||
* @see TransactionAttributeEditor
|
||||
*/
|
||||
public class TransactionAttributeSourceEditor extends PropertyEditorSupport {
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ abstract class TransactionAttributeSourcePointcut extends StaticMethodMatcherPoi
|
||||
|
||||
|
||||
/**
|
||||
* Obtain the underlying TransactionAttributeSource (may be <code>null</code>).
|
||||
* Obtain the underlying TransactionAttributeSource (may be {@code null}).
|
||||
* To be implemented by subclasses.
|
||||
*/
|
||||
protected abstract TransactionAttributeSource getTransactionAttributeSource();
|
||||
|
||||
@@ -89,7 +89,7 @@ public class TransactionInterceptor extends TransactionAspectSupport implements
|
||||
|
||||
|
||||
public Object invoke(final MethodInvocation invocation) throws Throwable {
|
||||
// Work out the target class: may be <code>null</code>.
|
||||
// Work out the target class: may be {@code null}.
|
||||
// The TransactionAttributeSource should be passed the target class
|
||||
// as well as the method, which may be from an interface.
|
||||
Class<?> targetClass = (invocation.getThis() != null ? AopUtils.getTargetClass(invocation.getThis()) : null);
|
||||
|
||||
@@ -24,8 +24,8 @@ import org.springframework.transaction.support.TransactionSynchronization;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationUtils;
|
||||
|
||||
/**
|
||||
* Adapter for a JTA Synchronization, invoking the <code>afterCommit</code> /
|
||||
* <code>afterCompletion</code> callbacks of Spring {@link TransactionSynchronization}
|
||||
* Adapter for a JTA Synchronization, invoking the {@code afterCommit} /
|
||||
* {@code afterCompletion} callbacks of Spring {@link TransactionSynchronization}
|
||||
* objects callbacks after the outer JTA transaction has completed.
|
||||
* Applied when participating in an existing (non-Spring) JTA transaction.
|
||||
*
|
||||
|
||||
@@ -92,7 +92,7 @@ import org.springframework.util.StringUtils;
|
||||
* for specific Java EE transaction coordinators may also expose transaction names for
|
||||
* monitoring; with standard JTA, transaction names will simply be ignored.
|
||||
*
|
||||
* <p><b>Consider using Spring's <code>tx:jta-transaction-manager</code> configuration
|
||||
* <p><b>Consider using Spring's {@code tx:jta-transaction-manager} configuration
|
||||
* element for automatically picking the appropriate JTA platform transaction manager
|
||||
* (automatically detecting WebLogic, WebSphere and OC4J).</b>
|
||||
*
|
||||
@@ -190,7 +190,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
|
||||
/**
|
||||
* Create a new JtaTransactionManager instance, to be configured as bean.
|
||||
* Invoke <code>afterPropertiesSet</code> to activate the configuration.
|
||||
* Invoke {@code afterPropertiesSet} to activate the configuration.
|
||||
* @see #setUserTransactionName
|
||||
* @see #setUserTransaction
|
||||
* @see #setTransactionManagerName
|
||||
@@ -529,7 +529,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
|
||||
/**
|
||||
* Look up the JTA UserTransaction in JNDI via the configured name.
|
||||
* <p>Called by <code>afterPropertiesSet</code> if no direct UserTransaction reference was set.
|
||||
* <p>Called by {@code afterPropertiesSet} if no direct UserTransaction reference was set.
|
||||
* Can be overridden in subclasses to provide a different UserTransaction object.
|
||||
* @param userTransactionName the JNDI name of the UserTransaction
|
||||
* @return the UserTransaction object
|
||||
@@ -553,7 +553,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
|
||||
/**
|
||||
* Look up the JTA TransactionManager in JNDI via the configured name.
|
||||
* <p>Called by <code>afterPropertiesSet</code> if no direct TransactionManager reference was set.
|
||||
* <p>Called by {@code afterPropertiesSet} if no direct TransactionManager reference was set.
|
||||
* Can be overridden in subclasses to provide a different TransactionManager object.
|
||||
* @param transactionManagerName the JNDI name of the TransactionManager
|
||||
* @return the UserTransaction object
|
||||
@@ -605,8 +605,8 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
/**
|
||||
* Allows subclasses to retrieve the JTA UserTransaction in a vendor-specific manner.
|
||||
* Only called if no "userTransaction" or "userTransactionName" specified.
|
||||
* <p>The default implementation simply returns <code>null</code>.
|
||||
* @return the JTA UserTransaction handle to use, or <code>null</code> if none found
|
||||
* <p>The default implementation simply returns {@code null}.
|
||||
* @return the JTA UserTransaction handle to use, or {@code null} if none found
|
||||
* @throws TransactionSystemException in case of errors
|
||||
* @see #setUserTransaction
|
||||
* @see #setUserTransactionName
|
||||
@@ -618,8 +618,8 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
/**
|
||||
* Allows subclasses to retrieve the JTA TransactionManager in a vendor-specific manner.
|
||||
* Only called if no "transactionManager" or "transactionManagerName" specified.
|
||||
* <p>The default implementation simply returns <code>null</code>.
|
||||
* @return the JTA TransactionManager handle to use, or <code>null</code> if none found
|
||||
* <p>The default implementation simply returns {@code null}.
|
||||
* @return the JTA TransactionManager handle to use, or {@code null} if none found
|
||||
* @throws TransactionSystemException in case of errors
|
||||
* @see #setTransactionManager
|
||||
* @see #setTransactionManagerName
|
||||
@@ -631,9 +631,9 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
/**
|
||||
* Allows subclasses to retrieve the JTA 1.1 TransactionSynchronizationRegistry
|
||||
* in a vendor-specific manner.
|
||||
* <p>The default implementation simply returns <code>null</code>.
|
||||
* <p>The default implementation simply returns {@code null}.
|
||||
* @return the JTA TransactionSynchronizationRegistry handle to use,
|
||||
* or <code>null</code> if none found
|
||||
* or {@code null} if none found
|
||||
* @throws TransactionSystemException in case of errors
|
||||
*/
|
||||
protected Object retrieveTransactionSynchronizationRegistry() throws TransactionSystemException {
|
||||
@@ -643,7 +643,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
/**
|
||||
* Find the JTA UserTransaction through a default JNDI lookup:
|
||||
* "java:comp/UserTransaction".
|
||||
* @return the JTA UserTransaction reference, or <code>null</code> if not found
|
||||
* @return the JTA UserTransaction reference, or {@code null} if not found
|
||||
* @see #DEFAULT_USER_TRANSACTION_NAME
|
||||
*/
|
||||
protected UserTransaction findUserTransaction() {
|
||||
@@ -669,7 +669,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
* UserTransaction object implements the TransactionManager, and checking the
|
||||
* fallback JNDI locations.
|
||||
* @param ut the JTA UserTransaction object
|
||||
* @return the JTA TransactionManager reference, or <code>null</code> if not found
|
||||
* @return the JTA TransactionManager reference, or {@code null} if not found
|
||||
* @see #FALLBACK_TRANSACTION_MANAGER_NAMES
|
||||
*/
|
||||
protected TransactionManager findTransactionManager(UserTransaction ut) {
|
||||
@@ -704,11 +704,11 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
* Find the JTA 1.1 TransactionSynchronizationRegistry through autodetection:
|
||||
* checking whether the UserTransaction object or TransactionManager object
|
||||
* implements it, and checking Java EE 5's standard JNDI location.
|
||||
* <p>The default implementation simply returns <code>null</code>.
|
||||
* <p>The default implementation simply returns {@code null}.
|
||||
* @param ut the JTA UserTransaction object
|
||||
* @param tm the JTA TransactionManager object
|
||||
* @return the JTA TransactionSynchronizationRegistry handle to use,
|
||||
* or <code>null</code> if none found
|
||||
* or {@code null} if none found
|
||||
* @throws TransactionSystemException in case of errors
|
||||
*/
|
||||
protected Object findTransactionSynchronizationRegistry(UserTransaction ut, TransactionManager tm)
|
||||
@@ -804,7 +804,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
* This implementation returns false to cause a further invocation
|
||||
* of doBegin despite an already existing transaction.
|
||||
* <p>JTA implementations might support nested transactions via further
|
||||
* <code>UserTransaction.begin()</code> invocations, but never support savepoints.
|
||||
* {@code UserTransaction.begin()} invocations, but never support savepoints.
|
||||
* @see #doBegin
|
||||
* @see javax.transaction.UserTransaction#begin()
|
||||
*/
|
||||
@@ -840,8 +840,8 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
* <p>This implementation only supports standard JTA functionality:
|
||||
* that is, no per-transaction isolation levels and no transaction names.
|
||||
* Can be overridden in subclasses, for specific JTA implementations.
|
||||
* <p>Calls <code>applyIsolationLevel</code> and <code>applyTimeout</code>
|
||||
* before invoking the UserTransaction's <code>begin</code> method.
|
||||
* <p>Calls {@code applyIsolationLevel} and {@code applyTimeout}
|
||||
* before invoking the UserTransaction's {@code begin} method.
|
||||
* @param txObject the JtaTransactionObject containing the UserTransaction
|
||||
* @param definition TransactionDefinition instance, describing propagation
|
||||
* behavior, isolation level, read-only flag, timeout, and transaction name
|
||||
@@ -890,7 +890,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
|
||||
/**
|
||||
* Apply the given transaction timeout. The default implementation will call
|
||||
* <code>UserTransaction.setTransactionTimeout</code> for a non-default timeout value.
|
||||
* {@code UserTransaction.setTransactionTimeout} for a non-default timeout value.
|
||||
* @param txObject the JtaTransactionObject containing the UserTransaction
|
||||
* @param timeout timeout value taken from transaction definition
|
||||
* @throws SystemException if thrown by the JTA implementation
|
||||
@@ -1108,7 +1108,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
|
||||
/**
|
||||
* Register a JTA synchronization on the JTA TransactionManager, for calling
|
||||
* <code>afterCompletion</code> on the given Spring TransactionSynchronizations.
|
||||
* {@code afterCompletion} on the given Spring TransactionSynchronizations.
|
||||
* <p>The default implementation registers the synchronizations on the
|
||||
* JTA 1.1 TransactionSynchronizationRegistry, if available, or on the
|
||||
* JTA TransactionManager's current Transaction - again, if available.
|
||||
|
||||
@@ -33,13 +33,13 @@ import org.springframework.util.ClassUtils;
|
||||
* transaction coordinator, <i>beyond standard JTA</i>: transaction names
|
||||
* and per-transaction isolation levels.
|
||||
*
|
||||
* <p>Uses OC4J's special <code>begin(name)</code> method to start a JTA transaction,
|
||||
* <p>Uses OC4J's special {@code begin(name)} method to start a JTA transaction,
|
||||
* in orderto make <b>Spring-driven transactions visible in OC4J's transaction
|
||||
* monitor</b>. In case of Spring's declarative transactions, the exposed name will
|
||||
* (by default) be the fully-qualified class name + "." + method name.
|
||||
*
|
||||
* <p>Supports a <b>per-transaction isolation level</b> through OC4J's corresponding
|
||||
* <code>OC4JTransaction.setTransactionIsolation(int)</code> method. This will
|
||||
* {@code OC4JTransaction.setTransactionIsolation(int)} method. This will
|
||||
* apply the specified isolation level (e.g. ISOLATION_SERIALIZABLE) to all
|
||||
* JDBC Connections that participate in the given transaction.
|
||||
*
|
||||
@@ -48,7 +48,7 @@ import org.springframework.util.ClassUtils;
|
||||
* "oracle.j2ee.transaction" package in later OC4J versions.
|
||||
*
|
||||
* <p>By default, the JTA UserTransaction and TransactionManager handles are
|
||||
* fetched directly from OC4J's <code>TransactionUtility</code> in 10.1.3.2+.
|
||||
* fetched directly from OC4J's {@code TransactionUtility} in 10.1.3.2+.
|
||||
* This can be overridden by specifying "userTransaction"/"userTransactionName"
|
||||
* and "transactionManager"/"transactionManagerName", passing in existing handles
|
||||
* or specifying corresponding JNDI locations to look up.
|
||||
|
||||
@@ -68,11 +68,11 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
|
||||
* 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</code> exception. Hence,
|
||||
* 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</code>
|
||||
* 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).
|
||||
*/
|
||||
@@ -90,11 +90,11 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
|
||||
* 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</code> exception. Hence,
|
||||
* 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</code>
|
||||
* 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)
|
||||
*/
|
||||
@@ -109,7 +109,7 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
|
||||
|
||||
|
||||
/**
|
||||
* JTA <code>beforeCompletion</code> callback: just invoked before commit.
|
||||
* JTA {@code beforeCompletion} callback: just invoked before commit.
|
||||
* <p>In case of an exception, the JTA transaction will be marked as rollback-only.
|
||||
* @see org.springframework.transaction.support.TransactionSynchronization#beforeCommit
|
||||
*/
|
||||
@@ -161,8 +161,8 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
|
||||
}
|
||||
|
||||
/**
|
||||
* JTA <code>afterCompletion</code> callback: invoked after commit/rollback.
|
||||
* <p>Needs to invoke the Spring synchronization's <code>beforeCompletion</code>
|
||||
* JTA {@code afterCompletion} callback: invoked after commit/rollback.
|
||||
* <p>Needs to invoke the Spring synchronization's {@code beforeCompletion}
|
||||
* at this late stage in case of a rollback, since there is no corresponding
|
||||
* callback with JTA.
|
||||
* @see org.springframework.transaction.support.TransactionSynchronization#beforeCompletion
|
||||
|
||||
@@ -39,9 +39,9 @@ public interface TransactionFactory {
|
||||
|
||||
/**
|
||||
* Create an active Transaction object based on the given name and timeout.
|
||||
* @param name the transaction name (may be <code>null</code>)
|
||||
* @param name the transaction name (may be {@code null})
|
||||
* @param timeout the transaction timeout (may be -1 for the default timeout)
|
||||
* @return the active Transaction object (never <code>null</code>)
|
||||
* @return the active Transaction object (never {@code null})
|
||||
* @throws NotSupportedException if the transaction manager does not support
|
||||
* a transaction of the specified type
|
||||
* @throws SystemException if the transaction manager failed to create the
|
||||
@@ -52,7 +52,7 @@ public interface TransactionFactory {
|
||||
/**
|
||||
* Determine whether the underlying transaction manager supports XA transactions
|
||||
* managed by a resource adapter (i.e. without explicit XA resource enlistment).
|
||||
* <p>Typically <code>false</code>. Checked by
|
||||
* <p>Typically {@code false}. Checked by
|
||||
* {@link org.springframework.jca.endpoint.AbstractMessageEndpointFactory}
|
||||
* in order to differentiate between invalid configuration and valid
|
||||
* ResourceAdapter-managed transactions.
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.springframework.transaction.TransactionSystemException;
|
||||
* transaction coordinator, <i>beyond standard JTA</i>: transaction names,
|
||||
* per-transaction isolation levels, and proper resuming of transactions in all cases.
|
||||
*
|
||||
* <p>Uses WebLogic's special <code>begin(name)</code> method to start a JTA transaction,
|
||||
* <p>Uses WebLogic's special {@code begin(name)} method to start a JTA transaction,
|
||||
* in order to make <b>Spring-driven transactions visible in WebLogic's transaction
|
||||
* monitor</b>. In case of Spring's declarative transactions, the exposed name will
|
||||
* (by default) be the fully-qualified class name + "." + method name.
|
||||
@@ -45,13 +45,13 @@ import org.springframework.transaction.TransactionSystemException;
|
||||
* level (e.g. ISOLATION_SERIALIZABLE) to all JDBC Connections that participate in the
|
||||
* given transaction.
|
||||
*
|
||||
* <p>Invokes WebLogic's special <code>forceResume</code> method if standard JTA resume
|
||||
* <p>Invokes WebLogic's special {@code forceResume} method if standard JTA resume
|
||||
* failed, to <b>also resume if the target transaction was marked rollback-only</b>.
|
||||
* If you're not relying on this feature of transaction suspension in the first
|
||||
* place, Spring's standard JtaTransactionManager will behave properly too.
|
||||
*
|
||||
* <p>By default, the JTA UserTransaction and TransactionManager handles are
|
||||
* fetched directly from WebLogic's <code>TransactionHelper</code>. This can be
|
||||
* fetched directly from WebLogic's {@code TransactionHelper}. This can be
|
||||
* overridden by specifying "userTransaction"/"userTransactionName" and
|
||||
* "transactionManager"/"transactionManagerName", passing in existing handles
|
||||
* or specifying corresponding JNDI locations to look up.
|
||||
|
||||
@@ -52,15 +52,15 @@ import org.springframework.util.ReflectionUtils;
|
||||
* a {@link TransactionCallback} through the {@link #execute} method, which
|
||||
* will be handled through the callback-based WebSphere UOWManager API instead
|
||||
* of through standard JTA API (UserTransaction / TransactionManager). This avoids
|
||||
* the use of the non-public <code>javax.transaction.TransactionManager</code>
|
||||
* the use of the non-public {@code javax.transaction.TransactionManager}
|
||||
* API on WebSphere, staying within supported WebSphere API boundaries.
|
||||
*
|
||||
* <p>This transaction manager implementation derives from Spring's standard
|
||||
* {@link JtaTransactionManager}, inheriting the capability to support programmatic
|
||||
* transaction demarcation via <code>getTransaction</code> / <code>commit</code> /
|
||||
* <code>rollback</code> calls through a JTA UserTransaction handle, for callers
|
||||
* transaction demarcation via {@code getTransaction} / {@code commit} /
|
||||
* {@code rollback} calls through a JTA UserTransaction handle, for callers
|
||||
* that do not use the TransactionCallback-based {@link #execute} method. However,
|
||||
* transaction suspension is <i>not</i> supported in this <code>getTransaction</code>
|
||||
* transaction suspension is <i>not</i> supported in this {@code getTransaction}
|
||||
* style (unless you explicitly specify a {@link #setTransactionManager} reference,
|
||||
* despite the official WebSphere recommendations). Use the {@link #execute} style
|
||||
* for any code that might require transaction suspension.
|
||||
@@ -196,9 +196,9 @@ public class WebSphereUowTransactionManager extends JtaTransactionManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> since WebSphere ResourceAdapters (as exposed in JNDI)
|
||||
* Returns {@code true} since WebSphere ResourceAdapters (as exposed in JNDI)
|
||||
* implicitly perform transaction enlistment if the MessageEndpointFactory's
|
||||
* <code>isDeliveryTransacted</code> method returns <code>true</code>.
|
||||
* {@code isDeliveryTransacted} method returns {@code true}.
|
||||
* In that case we'll simply skip the {@link #createTransaction} call.
|
||||
* @see javax.resource.spi.endpoint.MessageEndpointFactory#isDeliveryTransacted
|
||||
* @see org.springframework.jca.endpoint.AbstractMessageEndpointFactory
|
||||
|
||||
@@ -68,8 +68,8 @@ import org.springframework.transaction.UnexpectedRollbackException;
|
||||
* <p>The state of this class is serializable, to allow for serializing the
|
||||
* transaction strategy along with proxies that carry a transaction interceptor.
|
||||
* It is up to subclasses if they wish to make their state to be serializable too.
|
||||
* They should implement the <code>java.io.Serializable</code> marker interface in
|
||||
* that case, and potentially a private <code>readObject()</code> method (according
|
||||
* They should implement the {@code java.io.Serializable} marker interface in
|
||||
* that case, and potentially a private {@code readObject()} method (according
|
||||
* to Java serialization rules) if they need to restore any transient state.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
@@ -165,7 +165,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* if there is no timeout specified at the transaction level, in seconds.
|
||||
* <p>Default is the underlying transaction infrastructure's default timeout,
|
||||
* e.g. typically 30 seconds in case of a JTA provider, indicated by the
|
||||
* <code>TransactionDefinition.TIMEOUT_DEFAULT</code> value.
|
||||
* {@code TransactionDefinition.TIMEOUT_DEFAULT} value.
|
||||
* @see org.springframework.transaction.TransactionDefinition#TIMEOUT_DEFAULT
|
||||
*/
|
||||
public final void setDefaultTimeout(int defaultTimeout) {
|
||||
@@ -178,7 +178,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
/**
|
||||
* Return the default timeout that this transaction manager should apply
|
||||
* if there is no timeout specified at the transaction level, in seconds.
|
||||
* <p>Returns <code>TransactionDefinition.TIMEOUT_DEFAULT</code> to indicate
|
||||
* <p>Returns {@code TransactionDefinition.TIMEOUT_DEFAULT} to indicate
|
||||
* the underlying transaction infrastructure's default timeout.
|
||||
*/
|
||||
public final int getDefaultTimeout() {
|
||||
@@ -243,11 +243,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* neither is it for a sequence of JDBC insert/update/delete operations.
|
||||
* <p><b>Note:</b>This flag only applies to an explicit rollback attempt for a
|
||||
* subtransaction, typically caused by an exception thrown by a data access operation
|
||||
* (where TransactionInterceptor will trigger a <code>PlatformTransactionManager.rollback()</code>
|
||||
* (where TransactionInterceptor will trigger a {@code PlatformTransactionManager.rollback()}
|
||||
* call according to a rollback rule). If the flag is off, the caller can handle the exception
|
||||
* and decide on a rollback, independent of the rollback rules of the subtransaction.
|
||||
* This flag does, however, <i>not</i> apply to explicit <code>setRollbackOnly</code>
|
||||
* calls on a <code>TransactionStatus</code>, which will always cause an eventual
|
||||
* This flag does, however, <i>not</i> apply to explicit {@code setRollbackOnly}
|
||||
* calls on a {@code TransactionStatus}, which will always cause an eventual
|
||||
* global rollback (as it might not throw an exception after the rollback-only call).
|
||||
* <p>The recommended solution for handling failure of a subtransaction
|
||||
* is a "nested transaction", where the global transaction can be rolled
|
||||
@@ -298,8 +298,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether <code>doRollback</code> should be performed on failure of the
|
||||
* <code>doCommit</code> call. Typically not necessary and thus to be avoided,
|
||||
* Set whether {@code doRollback} should be performed on failure of the
|
||||
* {@code doCommit} call. Typically not necessary and thus to be avoided,
|
||||
* as it can potentially override the commit exception with a subsequent
|
||||
* rollback exception.
|
||||
* <p>Default is "false".
|
||||
@@ -311,8 +311,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether <code>doRollback</code> should be performed on failure of the
|
||||
* <code>doCommit</code> call.
|
||||
* Return whether {@code doRollback} should be performed on failure of the
|
||||
* {@code doCommit} call.
|
||||
*/
|
||||
public final boolean isRollbackOnCommitFailure() {
|
||||
return this.rollbackOnCommitFailure;
|
||||
@@ -325,8 +325,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
|
||||
/**
|
||||
* This implementation handles propagation behavior. Delegates to
|
||||
* <code>doGetTransaction</code>, <code>isExistingTransaction</code>
|
||||
* and <code>doBegin</code>.
|
||||
* {@code doGetTransaction}, {@code isExistingTransaction}
|
||||
* and {@code doBegin}.
|
||||
* @see #doGetTransaction
|
||||
* @see #isExistingTransaction
|
||||
* @see #doBegin
|
||||
@@ -556,11 +556,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
|
||||
/**
|
||||
* Suspend the given transaction. Suspends transaction synchronization first,
|
||||
* then delegates to the <code>doSuspend</code> template method.
|
||||
* then delegates to the {@code doSuspend} template method.
|
||||
* @param transaction the current transaction object
|
||||
* (or <code>null</code> to just suspend active synchronizations, if any)
|
||||
* (or {@code null} to just suspend active synchronizations, if any)
|
||||
* @return an object that holds suspended resources
|
||||
* (or <code>null</code> if neither transaction nor synchronization active)
|
||||
* (or {@code null} if neither transaction nor synchronization active)
|
||||
* @see #doSuspend
|
||||
* @see #resume
|
||||
*/
|
||||
@@ -606,11 +606,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Resume the given transaction. Delegates to the <code>doResume</code>
|
||||
* Resume the given transaction. Delegates to the {@code doResume}
|
||||
* template method first, then resuming transaction synchronization.
|
||||
* @param transaction the current transaction object
|
||||
* @param resourcesHolder the object that holds suspended resources,
|
||||
* as returned by <code>suspend</code> (or <code>null</code> to just
|
||||
* as returned by {@code suspend} (or {@code null} to just
|
||||
* resume synchronizations, if any)
|
||||
* @see #doResume
|
||||
* @see #suspend
|
||||
@@ -686,8 +686,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
/**
|
||||
* This implementation of commit handles participating in existing
|
||||
* transactions and programmatic rollback requests.
|
||||
* Delegates to <code>isRollbackOnly</code>, <code>doCommit</code>
|
||||
* and <code>rollback</code>.
|
||||
* Delegates to {@code isRollbackOnly}, {@code doCommit}
|
||||
* and {@code rollback}.
|
||||
* @see org.springframework.transaction.TransactionStatus#isRollbackOnly()
|
||||
* @see #doCommit
|
||||
* @see #rollback
|
||||
@@ -807,8 +807,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
|
||||
/**
|
||||
* This implementation of rollback handles participating in existing
|
||||
* transactions. Delegates to <code>doRollback</code> and
|
||||
* <code>doSetRollbackOnly</code>.
|
||||
* transactions. Delegates to {@code doRollback} and
|
||||
* {@code doSetRollbackOnly}.
|
||||
* @see #doRollback
|
||||
* @see #doSetRollbackOnly
|
||||
*/
|
||||
@@ -877,7 +877,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoke <code>doRollback</code>, handling rollback exceptions properly.
|
||||
* Invoke {@code doRollback}, handling rollback exceptions properly.
|
||||
* @param status object representing the transaction
|
||||
* @param ex the thrown application exception or error
|
||||
* @throws TransactionException in case of rollback failure
|
||||
@@ -913,7 +913,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
|
||||
|
||||
/**
|
||||
* Trigger <code>beforeCommit</code> callbacks.
|
||||
* Trigger {@code beforeCommit} callbacks.
|
||||
* @param status object representing the transaction
|
||||
*/
|
||||
protected final void triggerBeforeCommit(DefaultTransactionStatus status) {
|
||||
@@ -926,7 +926,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger <code>beforeCompletion</code> callbacks.
|
||||
* Trigger {@code beforeCompletion} callbacks.
|
||||
* @param status object representing the transaction
|
||||
*/
|
||||
protected final void triggerBeforeCompletion(DefaultTransactionStatus status) {
|
||||
@@ -939,7 +939,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger <code>afterCommit</code> callbacks.
|
||||
* Trigger {@code afterCommit} callbacks.
|
||||
* @param status object representing the transaction
|
||||
*/
|
||||
private void triggerAfterCommit(DefaultTransactionStatus status) {
|
||||
@@ -952,7 +952,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger <code>afterCompletion</code> callbacks.
|
||||
* Trigger {@code afterCompletion} callbacks.
|
||||
* @param status object representing the transaction
|
||||
* @param completionStatus completion status according to TransactionSynchronization constants
|
||||
*/
|
||||
@@ -977,10 +977,10 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually invoke the <code>afterCompletion</code> methods of the
|
||||
* Actually invoke the {@code afterCompletion} methods of the
|
||||
* given Spring TransactionSynchronization objects.
|
||||
* <p>To be called by this abstract manager itself, or by special implementations
|
||||
* of the <code>registerAfterCompletionWithExistingTransaction</code> callback.
|
||||
* of the {@code registerAfterCompletionWithExistingTransaction} callback.
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @param completionStatus the completion status according to the
|
||||
* constants in the TransactionSynchronization interface
|
||||
@@ -1029,8 +1029,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* DefaultTransactionStatus instance.
|
||||
* <p>The returned object should contain information about any existing
|
||||
* transaction, that is, a transaction that has already started before the
|
||||
* current <code>getTransaction</code> call on the transaction manager.
|
||||
* Consequently, a <code>doGetTransaction</code> implementation will usually
|
||||
* current {@code getTransaction} call on the transaction manager.
|
||||
* Consequently, a {@code doGetTransaction} implementation will usually
|
||||
* look for an existing transaction and store corresponding state in the
|
||||
* returned transaction object.
|
||||
* @return the current transaction object
|
||||
@@ -1051,7 +1051,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* behavior for the new transaction. An existing transaction might get
|
||||
* suspended (in case of PROPAGATION_REQUIRES_NEW), or the new transaction
|
||||
* might participate in the existing one (in case of PROPAGATION_REQUIRED).
|
||||
* <p>The default implementation returns <code>false</code>, assuming that
|
||||
* <p>The default implementation returns {@code false}, assuming that
|
||||
* participating in existing transactions is generally not supported.
|
||||
* Subclasses are of course encouraged to provide such support.
|
||||
* @param transaction transaction object returned by doGetTransaction
|
||||
@@ -1065,14 +1065,14 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
|
||||
/**
|
||||
* Return whether to use a savepoint for a nested transaction.
|
||||
* <p>Default is <code>true</code>, which causes delegation to DefaultTransactionStatus
|
||||
* <p>Default is {@code true}, which causes delegation to DefaultTransactionStatus
|
||||
* for creating and holding a savepoint. If the transaction object does not implement
|
||||
* the SavepointManager interface, a NestedTransactionNotSupportedException will be
|
||||
* thrown. Else, the SavepointManager will be asked to create a new savepoint to
|
||||
* demarcate the start of the nested transaction.
|
||||
* <p>Subclasses can override this to return <code>false</code>, causing a further
|
||||
* call to <code>doBegin</code> - within the context of an already existing transaction.
|
||||
* The <code>doBegin</code> implementation needs to handle this accordingly in such
|
||||
* <p>Subclasses can override this to return {@code false}, causing a further
|
||||
* call to {@code doBegin} - within the context of an already existing transaction.
|
||||
* The {@code doBegin} implementation needs to handle this accordingly in such
|
||||
* a scenario. This is appropriate for JTA, for example.
|
||||
* @see DefaultTransactionStatus#createAndHoldSavepoint
|
||||
* @see DefaultTransactionStatus#rollbackToHeldSavepoint
|
||||
@@ -1091,11 +1091,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* start a new transaction. Either there wasn't any transaction before, or the
|
||||
* previous transaction has been suspended.
|
||||
* <p>A special scenario is a nested transaction without savepoint: If
|
||||
* <code>useSavepointForNestedTransaction()</code> returns "false", this method
|
||||
* {@code useSavepointForNestedTransaction()} returns "false", this method
|
||||
* will be called to start a nested transaction when necessary. In such a context,
|
||||
* there will be an active transaction: The implementation of this method has
|
||||
* to detect this and start an appropriate nested transaction.
|
||||
* @param transaction transaction object returned by <code>doGetTransaction</code>
|
||||
* @param transaction transaction object returned by {@code doGetTransaction}
|
||||
* @param definition TransactionDefinition instance, describing propagation
|
||||
* behavior, isolation level, read-only flag, timeout, and transaction name
|
||||
* @throws TransactionException in case of creation or system errors
|
||||
@@ -1108,7 +1108,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* Transaction synchronization will already have been suspended.
|
||||
* <p>The default implementation throws a TransactionSuspensionNotSupportedException,
|
||||
* assuming that transaction suspension is generally not supported.
|
||||
* @param transaction transaction object returned by <code>doGetTransaction</code>
|
||||
* @param transaction transaction object returned by {@code doGetTransaction}
|
||||
* @return an object that holds suspended resources
|
||||
* (will be kept unexamined for passing it into doResume)
|
||||
* @throws org.springframework.transaction.TransactionSuspensionNotSupportedException
|
||||
@@ -1126,7 +1126,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* Transaction synchronization will be resumed afterwards.
|
||||
* <p>The default implementation throws a TransactionSuspensionNotSupportedException,
|
||||
* assuming that transaction suspension is generally not supported.
|
||||
* @param transaction transaction object returned by <code>doGetTransaction</code>
|
||||
* @param transaction transaction object returned by {@code doGetTransaction}
|
||||
* @param suspendedResources the object that holds suspended resources,
|
||||
* as returned by doSuspend
|
||||
* @throws org.springframework.transaction.TransactionSuspensionNotSupportedException
|
||||
@@ -1140,7 +1140,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether to call <code>doCommit</code> on a transaction that has been
|
||||
* Return whether to call {@code doCommit} on a transaction that has been
|
||||
* marked as rollback-only in a global fashion.
|
||||
* <p>Does not apply if an application locally sets the transaction to rollback-only
|
||||
* via the TransactionStatus, but only to the transaction itself being marked as
|
||||
@@ -1150,12 +1150,12 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* as part of transaction commit. Hence, AbstractPlatformTransactionManager will trigger
|
||||
* a rollback in that case, throwing an UnexpectedRollbackException afterwards.
|
||||
* <p>Override this to return "true" if the concrete transaction manager expects a
|
||||
* <code>doCommit</code> call even for a rollback-only transaction, allowing for
|
||||
* {@code doCommit} call even for a rollback-only transaction, allowing for
|
||||
* special handling there. This will, for example, be the case for JTA, where
|
||||
* <code>UserTransaction.commit</code> will check the read-only flag itself and
|
||||
* {@code UserTransaction.commit} will check the read-only flag itself and
|
||||
* throw a corresponding RollbackException, which might include the specific reason
|
||||
* (such as a transaction timeout).
|
||||
* <p>If this method returns "true" but the <code>doCommit</code> implementation does not
|
||||
* <p>If this method returns "true" but the {@code doCommit} implementation does not
|
||||
* throw an exception, this transaction manager will throw an UnexpectedRollbackException
|
||||
* itself. This should not be the typical case; it is mainly checked to cover misbehaving
|
||||
* JTA providers that silently roll back even when the rollback has not been requested
|
||||
@@ -1174,7 +1174,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
|
||||
/**
|
||||
* Make preparations for commit, to be performed before the
|
||||
* <code>beforeCommit</code> synchronization callbacks occur.
|
||||
* {@code beforeCommit} synchronization callbacks occur.
|
||||
* <p>Note that exceptions will get propagated to the commit caller
|
||||
* and cause a rollback of the transaction.
|
||||
* @param status the status representation of the transaction
|
||||
@@ -1227,10 +1227,10 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* <p>Invoked when the control of the Spring transaction manager and thus all Spring
|
||||
* transaction synchronizations end, without the transaction being completed yet. This
|
||||
* is for example the case when participating in an existing JTA or EJB CMT transaction.
|
||||
* <p>The default implementation simply invokes the <code>afterCompletion</code> methods
|
||||
* <p>The default implementation simply invokes the {@code afterCompletion} methods
|
||||
* immediately, passing in "STATUS_UNKNOWN". This is the best we can do if there's no
|
||||
* chance to determine the actual outcome of the outer transaction.
|
||||
* @param transaction transaction object returned by <code>doGetTransaction</code>
|
||||
* @param transaction transaction object returned by {@code doGetTransaction}
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @throws TransactionException in case of system errors
|
||||
* @see #invokeAfterCompletion(java.util.List, int)
|
||||
@@ -1247,10 +1247,10 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
|
||||
/**
|
||||
* Cleanup resources after transaction completion.
|
||||
* <p>Called after <code>doCommit</code> and <code>doRollback</code> execution,
|
||||
* <p>Called after {@code doCommit} and {@code doRollback} execution,
|
||||
* on any outcome. The default implementation does nothing.
|
||||
* <p>Should not throw any exceptions but just issue warnings on errors.
|
||||
* @param transaction transaction object returned by <code>doGetTransaction</code>
|
||||
* @param transaction transaction object returned by {@code doGetTransaction}
|
||||
*/
|
||||
protected void doCleanupAfterCompletion(Object transaction) {
|
||||
}
|
||||
@@ -1270,7 +1270,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
|
||||
/**
|
||||
* Holder for suspended resources.
|
||||
* Used internally by <code>suspend</code> and <code>resume</code>.
|
||||
* Used internally by {@code suspend} and {@code resume}.
|
||||
*/
|
||||
protected static class SuspendedResourcesHolder {
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public abstract class AbstractTransactionStatus implements TransactionStatus {
|
||||
|
||||
/**
|
||||
* Determine the rollback-only flag via checking this TransactionStatus.
|
||||
* <p>Will only return "true" if the application called <code>setRollbackOnly</code>
|
||||
* <p>Will only return "true" if the application called {@code setRollbackOnly}
|
||||
* on this TransactionStatus object.
|
||||
*/
|
||||
public boolean isLocalRollbackOnly() {
|
||||
@@ -83,7 +83,7 @@ public abstract class AbstractTransactionStatus implements TransactionStatus {
|
||||
/**
|
||||
* Template method for determining the global rollback-only flag of the
|
||||
* underlying transaction, if any.
|
||||
* <p>This implementation always returns <code>false</code>.
|
||||
* <p>This implementation always returns {@code false}.
|
||||
*/
|
||||
public boolean isGlobalRollbackOnly() {
|
||||
return false;
|
||||
|
||||
@@ -25,8 +25,8 @@ import org.springframework.transaction.TransactionException;
|
||||
* interface, exposing a method for executing a given callback within a transaction.
|
||||
*
|
||||
* <p>Implementors of this interface automatically express a preference for
|
||||
* callbacks over programmatic <code>getTransaction</code>, <code>commit</code>
|
||||
* and <code>rollback</code> calls. Calling code may check whether a given
|
||||
* callbacks over programmatic {@code getTransaction}, {@code commit}
|
||||
* and {@code rollback} calls. Calling code may check whether a given
|
||||
* transaction manager implements this interface to choose to prepare a
|
||||
* callback instead of explicit transaction demarcation control.
|
||||
*
|
||||
@@ -36,7 +36,7 @@ import org.springframework.transaction.TransactionException;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
* @see org.springframework.transaction.support.TransactionTemplate
|
||||
* @see TransactionTemplate
|
||||
* @see org.springframework.transaction.interceptor.TransactionInterceptor
|
||||
*/
|
||||
public interface CallbackPreferringPlatformTransactionManager extends PlatformTransactionManager {
|
||||
@@ -49,7 +49,7 @@ public interface CallbackPreferringPlatformTransactionManager extends PlatformTr
|
||||
* Such an exception gets propagated to the caller of the template.
|
||||
* @param definition the definition for the transaction to wrap the callback in
|
||||
* @param callback the callback object that specifies the transactional action
|
||||
* @return a result object returned by the callback, or <code>null</code> if none
|
||||
* @return a result object returned by the callback, or {@code null} if none
|
||||
* @throws TransactionException in case of initialization, rollback, or system errors
|
||||
* @throws RuntimeException if thrown by the TransactionCallback
|
||||
*/
|
||||
|
||||
@@ -108,7 +108,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
* TransactionDefinition, e.g. "PROPAGATION_REQUIRED".
|
||||
* @param constantName name of the constant
|
||||
* @exception IllegalArgumentException if the supplied value is not resolvable
|
||||
* to one of the <code>PROPAGATION_</code> constants or is <code>null</code>
|
||||
* to one of the {@code PROPAGATION_} constants or is {@code null}
|
||||
* @see #setPropagationBehavior
|
||||
* @see #PROPAGATION_REQUIRED
|
||||
*/
|
||||
@@ -123,7 +123,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
* Set the propagation behavior. Must be one of the propagation constants
|
||||
* in the TransactionDefinition interface. Default is PROPAGATION_REQUIRED.
|
||||
* @exception IllegalArgumentException if the supplied value is not
|
||||
* one of the <code>PROPAGATION_</code> constants
|
||||
* one of the {@code PROPAGATION_} constants
|
||||
* @see #PROPAGATION_REQUIRED
|
||||
*/
|
||||
public final void setPropagationBehavior(int propagationBehavior) {
|
||||
@@ -142,7 +142,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
* TransactionDefinition, e.g. "ISOLATION_DEFAULT".
|
||||
* @param constantName name of the constant
|
||||
* @exception IllegalArgumentException if the supplied value is not resolvable
|
||||
* to one of the <code>ISOLATION_</code> constants or is <code>null</code>
|
||||
* to one of the {@code ISOLATION_} constants or is {@code null}
|
||||
* @see #setIsolationLevel
|
||||
* @see #ISOLATION_DEFAULT
|
||||
*/
|
||||
@@ -157,7 +157,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
* Set the isolation level. Must be one of the isolation constants
|
||||
* in the TransactionDefinition interface. Default is ISOLATION_DEFAULT.
|
||||
* @exception IllegalArgumentException if the supplied value is not
|
||||
* one of the <code>ISOLATION_</code> constants
|
||||
* one of the {@code ISOLATION_} constants
|
||||
* @see #ISOLATION_DEFAULT
|
||||
*/
|
||||
public final void setIsolationLevel(int isolationLevel) {
|
||||
@@ -214,7 +214,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
|
||||
|
||||
/**
|
||||
* This implementation compares the <code>toString()</code> results.
|
||||
* This implementation compares the {@code toString()} results.
|
||||
* @see #toString()
|
||||
*/
|
||||
@Override
|
||||
@@ -223,7 +223,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
}
|
||||
|
||||
/**
|
||||
* This implementation returns <code>toString()</code>'s hash code.
|
||||
* This implementation returns {@code toString()}'s hash code.
|
||||
* @see #toString()
|
||||
*/
|
||||
@Override
|
||||
@@ -235,10 +235,10 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
* Return an identifying description for this transaction definition.
|
||||
* <p>The format matches the one used by
|
||||
* {@link org.springframework.transaction.interceptor.TransactionAttributeEditor},
|
||||
* to be able to feed <code>toString</code> results into bean properties of type
|
||||
* to be able to feed {@code toString} results into bean properties of type
|
||||
* {@link org.springframework.transaction.interceptor.TransactionAttribute}.
|
||||
* <p>Has to be overridden in subclasses for correct <code>equals</code>
|
||||
* and <code>hashCode</code> behavior. Alternatively, {@link #equals}
|
||||
* <p>Has to be overridden in subclasses for correct {@code equals}
|
||||
* and {@code hashCode} behavior. Alternatively, {@link #equals}
|
||||
* and {@link #hashCode} can be overridden themselves.
|
||||
* @see #getDefinitionDescription()
|
||||
* @see org.springframework.transaction.interceptor.TransactionAttributeEditor
|
||||
@@ -250,7 +250,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
|
||||
/**
|
||||
* Return an identifying description for this transaction definition.
|
||||
* <p>Available to subclasses, for inclusion in their <code>toString()</code> result.
|
||||
* <p>Available to subclasses, for inclusion in their {@code toString()} result.
|
||||
*/
|
||||
protected final StringBuilder getDefinitionDescription() {
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
||||
@@ -109,7 +109,7 @@ public abstract class ResourceHolderSynchronization<H extends ResourceHolder, K>
|
||||
/**
|
||||
* Return whether this holder should be unbound at completion
|
||||
* (or should rather be left bound to the thread after the transaction).
|
||||
* <p>The default implementation returns <code>true</code>.
|
||||
* <p>The default implementation returns {@code true}.
|
||||
*/
|
||||
protected boolean shouldUnbindAtCompletion() {
|
||||
return true;
|
||||
@@ -117,11 +117,11 @@ public abstract class ResourceHolderSynchronization<H extends ResourceHolder, K>
|
||||
|
||||
/**
|
||||
* Return whether this holder's resource should be released before
|
||||
* transaction completion (<code>true</code>) or rather after
|
||||
* transaction completion (<code>false</code>).
|
||||
* transaction completion ({@code true}) or rather after
|
||||
* transaction completion ({@code false}).
|
||||
* <p>Note that resources will only be released when they are
|
||||
* unbound from the thread ({@link #shouldUnbindAtCompletion()}).
|
||||
* <p>The default implementation returns <code>true</code>.
|
||||
* <p>The default implementation returns {@code true}.
|
||||
* @see #releaseResource
|
||||
*/
|
||||
protected boolean shouldReleaseBeforeCompletion() {
|
||||
@@ -130,8 +130,8 @@ public abstract class ResourceHolderSynchronization<H extends ResourceHolder, K>
|
||||
|
||||
/**
|
||||
* Return whether this holder's resource should be released after
|
||||
* transaction completion (<code>true</code>).
|
||||
* <p>The default implementation returns <code>!shouldReleaseBeforeCompletion()</code>,
|
||||
* transaction completion ({@code true}).
|
||||
* <p>The default implementation returns {@code !shouldReleaseBeforeCompletion()},
|
||||
* releasing after completion if no attempt was made before completion.
|
||||
* @see #releaseResource
|
||||
*/
|
||||
@@ -167,8 +167,8 @@ public abstract class ResourceHolderSynchronization<H extends ResourceHolder, K>
|
||||
* Perform a cleanup on the given resource (which is left bound to the thread).
|
||||
* @param resourceHolder the resource holder to process
|
||||
* @param resourceKey the key that the ResourceHolder was bound for
|
||||
* @param committed whether the transaction has committed (<code>true</code>)
|
||||
* or rolled back (<code>false</code>)
|
||||
* @param committed whether the transaction has committed ({@code true})
|
||||
* or rolled back ({@code false})
|
||||
*/
|
||||
protected void cleanupResource(H resourceHolder, K resourceKey, boolean committed) {
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface ResourceTransactionManager extends PlatformTransactionManager {
|
||||
* e.g. a JDBC DataSource or a JMS ConnectionFactory.
|
||||
* <p>This target resource factory is usually used as resource key for
|
||||
* {@link TransactionSynchronizationManager}'s resource bindings per thread.
|
||||
* @return the target resource factory (never <code>null</code>)
|
||||
* @return the target resource factory (never {@code null})
|
||||
* @see TransactionSynchronizationManager#bindResource
|
||||
* @see TransactionSynchronizationManager#getResource
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ package org.springframework.transaction.support;
|
||||
* {@link org.springframework.transaction.PlatformTransactionManager}
|
||||
* implementations. It is mainly provided as a start for custom transaction
|
||||
* manager implementations and as a static mock for testing transactional
|
||||
* code (either as part of a mock <code>PlatformTransactionManager</code> or
|
||||
* code (either as part of a mock {@code PlatformTransactionManager} or
|
||||
* as argument passed into a {@link TransactionCallback} to be tested).
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.transaction.TransactionStatus;
|
||||
|
||||
/**
|
||||
* Callback interface for transactional code. Used with {@link TransactionTemplate}'s
|
||||
* <code>execute</code> method, often as anonymous class within a method implementation.
|
||||
* {@code execute} method, often as anonymous class within a method implementation.
|
||||
*
|
||||
* <p>Typically used to assemble various calls to transaction-unaware data access
|
||||
* services into a higher-level service method with transaction demarcation. As an
|
||||
@@ -48,7 +48,7 @@ public interface TransactionCallback<T> {
|
||||
* thrown.
|
||||
*
|
||||
* @param status associated transaction status
|
||||
* @return a result object, or <code>null</code>
|
||||
* @return a result object, or {@code null}
|
||||
* @see TransactionTemplate#execute
|
||||
* @see CallbackPreferringPlatformTransactionManager#execute
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ public abstract class TransactionCallbackWithoutResult implements TransactionCal
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets called by <code>TransactionTemplate.execute</code> within a transactional
|
||||
* Gets called by {@code TransactionTemplate.execute} within a transactional
|
||||
* context. Does not need to care about transactions itself, although it can retrieve
|
||||
* and influence the status of the current transaction via the given status object,
|
||||
* e.g. setting rollback-only.
|
||||
|
||||
@@ -36,7 +36,7 @@ public interface TransactionOperations {
|
||||
* by the callback is treated as a fatal exception that enforces a rollback.
|
||||
* Such an exception gets propagated to the caller of the template.
|
||||
* @param action the callback object that specifies the transactional action
|
||||
* @return a result object returned by the callback, or <code>null</code> if none
|
||||
* @return a result object returned by the callback, or {@code null} if none
|
||||
* @throws TransactionException in case of initialization, rollback, or system errors
|
||||
* @throws RuntimeException if thrown by the TransactionCallback
|
||||
*/
|
||||
|
||||
@@ -86,8 +86,8 @@ public interface TransactionSynchronization {
|
||||
/**
|
||||
* Invoked before transaction commit/rollback.
|
||||
* Can perform resource cleanup <i>before</i> transaction completion.
|
||||
* <p>This method will be invoked after <code>beforeCommit</code>, even when
|
||||
* <code>beforeCommit</code> threw an exception. This callback allows for
|
||||
* <p>This method will be invoked after {@code beforeCommit}, even when
|
||||
* {@code beforeCommit} threw an exception. This callback allows for
|
||||
* closing resources before transaction completion, for any outcome.
|
||||
* @throws RuntimeException in case of errors; will be <b>logged but not propagated</b>
|
||||
* (note: do not throw TransactionException subclasses here!)
|
||||
@@ -106,7 +106,7 @@ public interface TransactionSynchronization {
|
||||
* any data access code triggered at this point will still "participate" in the
|
||||
* original transaction, allowing to perform some cleanup (with no commit following
|
||||
* anymore!), unless it explicitly declares that it needs to run in a separate
|
||||
* transaction. Hence: <b>Use <code>PROPAGATION_REQUIRES_NEW</code> for any
|
||||
* transaction. Hence: <b>Use {@code PROPAGATION_REQUIRES_NEW} for any
|
||||
* transactional operation that is called from here.</b>
|
||||
* @throws RuntimeException in case of errors; will be <b>propagated to the caller</b>
|
||||
* (note: do not throw TransactionException subclasses here!)
|
||||
@@ -121,9 +121,9 @@ public interface TransactionSynchronization {
|
||||
* consequence, any data access code triggered at this point will still "participate"
|
||||
* in the original transaction, allowing to perform some cleanup (with no commit
|
||||
* following anymore!), unless it explicitly declares that it needs to run in a
|
||||
* separate transaction. Hence: <b>Use <code>PROPAGATION_REQUIRES_NEW</code>
|
||||
* separate transaction. Hence: <b>Use {@code PROPAGATION_REQUIRES_NEW}
|
||||
* for any transactional operation that is called from here.</b>
|
||||
* @param status completion status according to the <code>STATUS_*</code> constants
|
||||
* @param status completion status according to the {@code STATUS_*} constants
|
||||
* @throws RuntimeException in case of errors; will be <b>logged but not propagated</b>
|
||||
* (note: do not throw TransactionException subclasses here!)
|
||||
* @see #STATUS_COMMITTED
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.util.Assert;
|
||||
* Supports a list of transaction synchronizations if synchronization is active.
|
||||
*
|
||||
* <p>Resource management code should check for thread-bound resources, e.g. JDBC
|
||||
* Connections or Hibernate Sessions, via <code>getResource</code>. Such code is
|
||||
* Connections or Hibernate Sessions, via {@code getResource}. Such code is
|
||||
* normally not supposed to bind resources to threads, as this is the responsibility
|
||||
* of transaction managers. A further option is to lazily bind on first use if
|
||||
* transaction synchronization is active, for performing transactions that span
|
||||
@@ -103,7 +103,7 @@ public abstract class TransactionSynchronizationManager {
|
||||
/**
|
||||
* Return all resources that are bound to the current thread.
|
||||
* <p>Mainly for debugging purposes. Resource managers should always invoke
|
||||
* <code>hasResource</code> for a specific resource key that they are interested in.
|
||||
* {@code hasResource} for a specific resource key that they are interested in.
|
||||
* @return a Map with resource keys (usually the resource factory) and resource
|
||||
* values (usually the active resource object), or an empty Map if there are
|
||||
* currently no resources bound
|
||||
@@ -130,7 +130,7 @@ public abstract class TransactionSynchronizationManager {
|
||||
* Retrieve a resource for the given key that is bound to the current thread.
|
||||
* @param key the key to check (usually the resource factory)
|
||||
* @return a value bound to the current thread (usually the active
|
||||
* resource object), or <code>null</code> if none
|
||||
* resource object), or {@code null} if none
|
||||
* @see ResourceTransactionManager#getResourceFactory()
|
||||
*/
|
||||
public static Object getResource(Object key) {
|
||||
@@ -215,7 +215,7 @@ public abstract class TransactionSynchronizationManager {
|
||||
/**
|
||||
* Unbind a resource for the given key from the current thread.
|
||||
* @param key the key to unbind (usually the resource factory)
|
||||
* @return the previously bound value, or <code>null</code> if none bound
|
||||
* @return the previously bound value, or {@code null} if none bound
|
||||
*/
|
||||
public static Object unbindResourceIfPossible(Object key) {
|
||||
Object actualKey = TransactionSynchronizationUtils.unwrapResourceIfNecessary(key);
|
||||
@@ -340,7 +340,7 @@ public abstract class TransactionSynchronizationManager {
|
||||
/**
|
||||
* Expose the name of the current transaction, if any.
|
||||
* Called by the transaction manager on transaction begin and on cleanup.
|
||||
* @param name the name of the transaction, or <code>null</code> to reset it
|
||||
* @param name the name of the transaction, or {@code null} to reset it
|
||||
* @see org.springframework.transaction.TransactionDefinition#getName()
|
||||
*/
|
||||
public static void setCurrentTransactionName(String name) {
|
||||
@@ -348,7 +348,7 @@ public abstract class TransactionSynchronizationManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name of the current transaction, or <code>null</code> if none set.
|
||||
* Return the name of the current transaction, or {@code null} if none set.
|
||||
* To be called by resource management code for optimizations per use case,
|
||||
* for example to optimize fetch strategies for specific named transactions.
|
||||
* @see org.springframework.transaction.TransactionDefinition#getName()
|
||||
@@ -360,8 +360,8 @@ public abstract class TransactionSynchronizationManager {
|
||||
/**
|
||||
* Expose a read-only flag for the current transaction.
|
||||
* Called by the transaction manager on transaction begin and on cleanup.
|
||||
* @param readOnly <code>true</code> to mark the current transaction
|
||||
* as read-only; <code>false</code> to reset such a read-only marker
|
||||
* @param readOnly {@code true} to mark the current transaction
|
||||
* as read-only; {@code false} to reset such a read-only marker
|
||||
* @see org.springframework.transaction.TransactionDefinition#isReadOnly()
|
||||
*/
|
||||
public static void setCurrentTransactionReadOnly(boolean readOnly) {
|
||||
@@ -373,7 +373,7 @@ public abstract class TransactionSynchronizationManager {
|
||||
* To be called by resource management code when preparing a newly
|
||||
* created resource (for example, a Hibernate Session).
|
||||
* <p>Note that transaction synchronizations receive the read-only flag
|
||||
* as argument for the <code>beforeCommit</code> callback, to be able
|
||||
* as argument for the {@code beforeCommit} callback, to be able
|
||||
* to suppress change detection on commit. The present method is meant
|
||||
* to be used for earlier read-only checks, for example to set the
|
||||
* flush mode of a Hibernate Session to "FlushMode.NEVER" upfront.
|
||||
@@ -389,7 +389,7 @@ public abstract class TransactionSynchronizationManager {
|
||||
* Called by the transaction manager on transaction begin and on cleanup.
|
||||
* @param isolationLevel the isolation level to expose, according to the
|
||||
* JDBC Connection constants (equivalent to the corresponding Spring
|
||||
* TransactionDefinition constants), or <code>null</code> to reset it
|
||||
* TransactionDefinition constants), or {@code null} to reset it
|
||||
* @see java.sql.Connection#TRANSACTION_READ_UNCOMMITTED
|
||||
* @see java.sql.Connection#TRANSACTION_READ_COMMITTED
|
||||
* @see java.sql.Connection#TRANSACTION_REPEATABLE_READ
|
||||
@@ -410,7 +410,7 @@ public abstract class TransactionSynchronizationManager {
|
||||
* created resource (for example, a JDBC Connection).
|
||||
* @return the currently exposed isolation level, according to the
|
||||
* JDBC Connection constants (equivalent to the corresponding Spring
|
||||
* TransactionDefinition constants), or <code>null</code> if none
|
||||
* TransactionDefinition constants), or {@code null} if none
|
||||
* @see java.sql.Connection#TRANSACTION_READ_UNCOMMITTED
|
||||
* @see java.sql.Connection#TRANSACTION_READ_COMMITTED
|
||||
* @see java.sql.Connection#TRANSACTION_REPEATABLE_READ
|
||||
@@ -428,8 +428,8 @@ public abstract class TransactionSynchronizationManager {
|
||||
/**
|
||||
* Expose whether there currently is an actual transaction active.
|
||||
* Called by the transaction manager on transaction begin and on cleanup.
|
||||
* @param active <code>true</code> to mark the current thread as being associated
|
||||
* with an actual transaction; <code>false</code> to reset that marker
|
||||
* @param active {@code true} to mark the current thread as being associated
|
||||
* with an actual transaction; {@code false} to reset that marker
|
||||
*/
|
||||
public static void setActualTransactionActive(boolean active) {
|
||||
actualTransactionActive.set(active ? Boolean.TRUE : null);
|
||||
|
||||
@@ -74,8 +74,8 @@ public abstract class TransactionSynchronizationUtils {
|
||||
|
||||
|
||||
/**
|
||||
* Trigger <code>flush</code> callbacks on all currently registered synchronizations.
|
||||
* @throws RuntimeException if thrown by a <code>flush</code> callback
|
||||
* Trigger {@code flush} callbacks on all currently registered synchronizations.
|
||||
* @throws RuntimeException if thrown by a {@code flush} callback
|
||||
* @see TransactionSynchronization#flush()
|
||||
*/
|
||||
public static void triggerFlush() {
|
||||
@@ -85,9 +85,9 @@ public abstract class TransactionSynchronizationUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger <code>beforeCommit</code> callbacks on all currently registered synchronizations.
|
||||
* Trigger {@code beforeCommit} callbacks on all currently registered synchronizations.
|
||||
* @param readOnly whether the transaction is defined as read-only transaction
|
||||
* @throws RuntimeException if thrown by a <code>beforeCommit</code> callback
|
||||
* @throws RuntimeException if thrown by a {@code beforeCommit} callback
|
||||
* @see TransactionSynchronization#beforeCommit(boolean)
|
||||
*/
|
||||
public static void triggerBeforeCommit(boolean readOnly) {
|
||||
@@ -97,7 +97,7 @@ public abstract class TransactionSynchronizationUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger <code>beforeCompletion</code> callbacks on all currently registered synchronizations.
|
||||
* Trigger {@code beforeCompletion} callbacks on all currently registered synchronizations.
|
||||
* @see TransactionSynchronization#beforeCompletion()
|
||||
*/
|
||||
public static void triggerBeforeCompletion() {
|
||||
@@ -112,8 +112,8 @@ public abstract class TransactionSynchronizationUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger <code>afterCommit</code> callbacks on all currently registered synchronizations.
|
||||
* @throws RuntimeException if thrown by a <code>afterCommit</code> callback
|
||||
* Trigger {@code afterCommit} callbacks on all currently registered synchronizations.
|
||||
* @throws RuntimeException if thrown by a {@code afterCommit} callback
|
||||
* @see TransactionSynchronizationManager#getSynchronizations()
|
||||
* @see TransactionSynchronization#afterCommit()
|
||||
*/
|
||||
@@ -122,7 +122,7 @@ public abstract class TransactionSynchronizationUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually invoke the <code>afterCommit</code> methods of the
|
||||
* Actually invoke the {@code afterCommit} methods of the
|
||||
* given Spring TransactionSynchronization objects.
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @see TransactionSynchronization#afterCommit()
|
||||
@@ -136,7 +136,7 @@ public abstract class TransactionSynchronizationUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger <code>afterCompletion</code> callbacks on all currently registered synchronizations.
|
||||
* Trigger {@code afterCompletion} callbacks on all currently registered synchronizations.
|
||||
* @see TransactionSynchronizationManager#getSynchronizations()
|
||||
* @param completionStatus the completion status according to the
|
||||
* constants in the TransactionSynchronization interface
|
||||
@@ -151,7 +151,7 @@ public abstract class TransactionSynchronizationUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually invoke the <code>afterCompletion</code> methods of the
|
||||
* Actually invoke the {@code afterCompletion} methods of the
|
||||
* given Spring TransactionSynchronization objects.
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @param completionStatus the completion status according to the
|
||||
|
||||
@@ -71,7 +71,7 @@ public class TransactionTemplate extends DefaultTransactionDefinition
|
||||
/**
|
||||
* Construct a new TransactionTemplate for bean usage.
|
||||
* <p>Note: The PlatformTransactionManager needs to be set before
|
||||
* any <code>execute</code> calls.
|
||||
* any {@code execute} calls.
|
||||
* @see #setTransactionManager
|
||||
*/
|
||||
public TransactionTemplate() {
|
||||
|
||||
Reference in New Issue
Block a user