Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
This commit is contained in:
committed by
Sam Brannen
parent
e55fe9077f
commit
8941e2876e
@@ -27,7 +27,7 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* <p>This exception hierarchy aims to let user code find and handle the
|
||||
* kind of error encountered without knowing the details of the particular
|
||||
* data access API in use (e.g. JDBC). Thus, it is possible to react to an
|
||||
* data access API in use (for example, JDBC). Thus, it is possible to react to an
|
||||
* optimistic locking failure without knowing that JDBC is being used.
|
||||
*
|
||||
* <p>As this class is a runtime exception, there is no need for user code
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.lang.Nullable;
|
||||
* is not purely a relational concept; integrity constraints such
|
||||
* as unique primary keys are required by most database types.
|
||||
*
|
||||
* <p>Serves as a superclass for more specific exceptions, e.g.
|
||||
* <p>Serves as a superclass for more specific exceptions, for example,
|
||||
* {@link DuplicateKeyException}. However, it is generally
|
||||
* recommended to handle {@code DataIntegrityViolationException}
|
||||
* itself instead of relying on specific exception subclasses.
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.dao;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Exception thrown if certain expected data could not be retrieved, e.g.
|
||||
* Exception thrown if certain expected data could not be retrieved, for example,
|
||||
* when looking up specific data via a known identifier. This exception
|
||||
* will be thrown either by O/R mapping tools or by DAO implementations.
|
||||
*
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.lang.Nullable;
|
||||
* Thrown by Spring's SQLException translation mechanism
|
||||
* if a corresponding database error is encountered.
|
||||
*
|
||||
* <p>Serves as a superclass for more specific exceptions, e.g.
|
||||
* <p>Serves as a superclass for more specific exceptions, for example,
|
||||
* {@link CannotAcquireLockException}. However, it is generally
|
||||
* recommended to handle {@code PessimisticLockingFailureException}
|
||||
* itself instead of relying on specific exception subclasses.
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
|
||||
* PersistenceExceptionTranslator} interface, which are subsequently asked to translate
|
||||
* candidate exceptions.
|
||||
*
|
||||
* <p>All of Spring's applicable resource factories (e.g.
|
||||
* <p>All of Spring's applicable resource factories (for example,
|
||||
* {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean})
|
||||
* implement the {@code PersistenceExceptionTranslator} interface out of the box.
|
||||
* As a consequence, all that is usually needed to enable automatic exception
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
* Generic implementation of the JCA 1.7
|
||||
* {@link jakarta.resource.spi.endpoint.MessageEndpointFactory} interface,
|
||||
* providing transaction management capabilities for any kind of message
|
||||
* listener object (e.g. {@link jakarta.jms.MessageListener} objects or
|
||||
* listener object (for example, {@link jakarta.jms.MessageListener} objects or
|
||||
* {@link jakarta.resource.cci.MessageListener} objects).
|
||||
*
|
||||
* <p>Uses AOP proxies for concrete endpoint instances, simply wrapping
|
||||
@@ -60,7 +60,7 @@ public class GenericMessageEndpointFactory extends AbstractMessageEndpointFactor
|
||||
|
||||
/**
|
||||
* Specify the message listener object that the endpoint should expose
|
||||
* (e.g. a {@link jakarta.jms.MessageListener} objects or
|
||||
* (for example, a {@link jakarta.jms.MessageListener} objects or
|
||||
* {@link jakarta.resource.cci.MessageListener} implementation).
|
||||
*/
|
||||
public void setMessageListener(Object messageListener) {
|
||||
|
||||
@@ -87,7 +87,7 @@ import org.springframework.util.Assert;
|
||||
* <p>For a different target resource, the configuration would simply point to a
|
||||
* different ResourceAdapter and a different ActivationSpec object (which are
|
||||
* both specific to the resource provider), and possibly a different message
|
||||
* listener (e.g. a CCI {@link jakarta.resource.cci.MessageListener} for a
|
||||
* listener (for example, a CCI {@link jakarta.resource.cci.MessageListener} for a
|
||||
* resource adapter which is based on the JCA Common Client Interface).
|
||||
*
|
||||
* <p>The asynchronous execution strategy can be customized through the
|
||||
@@ -123,7 +123,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* <p>Alternatively, check out your resource provider's ActivationSpec object,
|
||||
* which should support local transactions through a provider-specific config flag,
|
||||
* e.g. ActiveMQActivationSpec's "useRAManagedTransaction" bean property.
|
||||
* for example, ActiveMQActivationSpec's "useRAManagedTransaction" bean property.
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean class="org.springframework.jca.endpoint.GenericMessageEndpointManager">
|
||||
|
||||
@@ -56,7 +56,7 @@ import org.springframework.lang.Nullable;
|
||||
* of XA enlistment. You need to specify an XA-capable ConnectionManager in
|
||||
* order to make the connector interact with an XA transaction coordinator.
|
||||
* Alternatively, simply use the native local transaction facilities of the
|
||||
* exposed API (e.g. CCI local transactions), or use a corresponding
|
||||
* exposed API (for example, CCI local transactions), or use a corresponding
|
||||
* implementation of Spring's PlatformTransactionManager SPI to drive local
|
||||
* transactions.
|
||||
*
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.lang.Nullable;
|
||||
* <p>A classic implementation of this strategy interface is
|
||||
* {@link org.springframework.transaction.jta.JtaTransactionManager}. However,
|
||||
* in common single-resource scenarios, Spring's specific transaction managers
|
||||
* for e.g. JDBC, JPA, JMS are preferred choices.
|
||||
* for example, JDBC, JPA, JMS are preferred choices.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -60,7 +60,7 @@ public interface TransactionExecution {
|
||||
* <p>This is primarily here for transaction manager state handling.
|
||||
* Prefer the use of {@link #hasTransaction()} for application purposes
|
||||
* since this is usually semantically appropriate.
|
||||
* <p>The "new" status can be transaction manager specific, e.g. returning
|
||||
* <p>The "new" status can be transaction manager specific, for example, returning
|
||||
* {@code true} for an actual nested transaction but potentially {@code false}
|
||||
* for a savepoint-based nested transaction scope if the savepoint management
|
||||
* is explicitly exposed (such as on {@link TransactionStatus}). A combined
|
||||
|
||||
@@ -149,7 +149,7 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
|
||||
* but not on checked exceptions. A default rule may override this
|
||||
* while still respecting any custom rules in the transaction attribute.
|
||||
* @param rollbackRule a rollback rule overriding the default behavior,
|
||||
* e.g. {@link RollbackRuleAttribute#ROLLBACK_ON_ALL_EXCEPTIONS}
|
||||
* for example, {@link RollbackRuleAttribute#ROLLBACK_ON_ALL_EXCEPTIONS}
|
||||
* @since 6.2
|
||||
* @see RuleBasedTransactionAttribute#getRollbackRules()
|
||||
* @see EnableTransactionManagement#rollbackOn()
|
||||
|
||||
@@ -172,7 +172,7 @@ public @interface EnableTransactionManagement {
|
||||
* {@code @Transactional}. For example, other beans marked with Spring's
|
||||
* {@code @Async} annotation will be upgraded to subclass proxying at the same
|
||||
* time. This approach has no negative impact in practice unless one is explicitly
|
||||
* expecting one type of proxy vs another, e.g. in tests.
|
||||
* expecting one type of proxy vs another, for example, in tests.
|
||||
*/
|
||||
boolean proxyTargetClass() default false;
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ import org.springframework.transaction.TransactionDefinition;
|
||||
* <p><b>Note: When configured with a {@code ReactiveTransactionManager}, all
|
||||
* transaction-demarcated methods are expected to return a reactive pipeline.</b>
|
||||
* Void methods or regular return types need to be associated with a regular
|
||||
* {@code PlatformTransactionManager}, e.g. through {@link #transactionManager()}.
|
||||
* {@code PlatformTransactionManager}, for example, through {@link #transactionManager()}.
|
||||
*
|
||||
* @author Colin Sampaleanu
|
||||
* @author Juergen Hoeller
|
||||
@@ -205,7 +205,7 @@ public @interface Transactional {
|
||||
* <p>Exclusively designed for use with {@link Propagation#REQUIRED} or
|
||||
* {@link Propagation#REQUIRES_NEW} since it only applies to newly started
|
||||
* transactions.
|
||||
* @return the timeout in seconds as a String value, e.g. a placeholder
|
||||
* @return the timeout in seconds as a String value, for example, a placeholder
|
||||
* @since 5.3
|
||||
* @see org.springframework.transaction.interceptor.TransactionAttribute#getTimeout()
|
||||
*/
|
||||
|
||||
@@ -111,7 +111,7 @@ public @interface TransactionalEventListener {
|
||||
|
||||
/**
|
||||
* An optional identifier for the listener, defaulting to the fully-qualified
|
||||
* signature of the declaring method (e.g. "mypackage.MyClass.myMethod()").
|
||||
* signature of the declaring method (for example, "mypackage.MyClass.myMethod()").
|
||||
* @since 5.3
|
||||
* @see EventListener#id
|
||||
* @see TransactionalApplicationListener#getListenerId()
|
||||
|
||||
@@ -90,7 +90,7 @@ public class DefaultTransactionAttribute extends DefaultTransactionDefinition im
|
||||
|
||||
/**
|
||||
* Set a descriptor for this transaction attribute,
|
||||
* e.g. indicating where the attribute is applying.
|
||||
* for example, indicating where the attribute is applying.
|
||||
* @since 4.3.4
|
||||
*/
|
||||
public void setDescriptor(@Nullable String descriptor) {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class MethodMapTransactionAttributeSource
|
||||
|
||||
/**
|
||||
* Set a name/attribute map, consisting of "{@code <fully-qualified class name>.<method-name>}"
|
||||
* method names (e.g. "com.mycompany.mycode.MyClass.myMethod") and
|
||||
* method names (for example, "com.mycompany.mycode.MyClass.myMethod") and
|
||||
* {@link TransactionAttribute} instances (or Strings to be converted
|
||||
* to {@code TransactionAttribute} instances).
|
||||
* <p>Intended for configuration via setter injection, typically within
|
||||
|
||||
@@ -62,7 +62,7 @@ public class NameMatchTransactionAttributeSource
|
||||
|
||||
/**
|
||||
* Set a name/attribute map, consisting of method names
|
||||
* (e.g. "myMethod") and {@link TransactionAttribute} instances.
|
||||
* (for example, "myMethod") and {@link TransactionAttribute} instances.
|
||||
* @see #setProperties
|
||||
* @see TransactionAttribute
|
||||
*/
|
||||
|
||||
@@ -68,7 +68,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* <p>Uses the <b>Strategy</b> design pattern. A {@link PlatformTransactionManager} or
|
||||
* {@link ReactiveTransactionManager} implementation will perform the actual transaction
|
||||
* management, and a {@link TransactionAttributeSource} (e.g. annotation-based) is used
|
||||
* management, and a {@link TransactionAttributeSource} (for example, annotation-based) is used
|
||||
* for determining transaction definitions for a particular class or method.
|
||||
*
|
||||
* <p>A transaction aspect is serializable if its {@code TransactionManager} and
|
||||
@@ -116,7 +116,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
/**
|
||||
* 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
|
||||
* (for example, before and after advice) if the aspect involves more than a
|
||||
* single method (as will be the case for around advice).
|
||||
*/
|
||||
private static final ThreadLocal<TransactionInfo> transactionInfoHolder =
|
||||
@@ -245,7 +245,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
/**
|
||||
* Set properties with method names as keys and transaction attribute
|
||||
* descriptors (parsed via TransactionAttributeEditor) as values:
|
||||
* e.g. key = "myMethod", value = "PROPAGATION_REQUIRED,readOnly".
|
||||
* for example, key = "myMethod", value = "PROPAGATION_REQUIRED,readOnly".
|
||||
* <p>Note: Method names are always applied to the target class,
|
||||
* no matter if defined in an interface or the class itself.
|
||||
* <p>Internally, a NameMatchTransactionAttributeSource will be
|
||||
|
||||
@@ -133,7 +133,7 @@ public class TransactionProxyFactoryBean extends AbstractSingletonProxyFactoryBe
|
||||
/**
|
||||
* Set properties with method names as keys and transaction attribute
|
||||
* descriptors (parsed via TransactionAttributeEditor) as values:
|
||||
* e.g. key = "myMethod", value = "PROPAGATION_REQUIRED,readOnly".
|
||||
* for example, key = "myMethod", value = "PROPAGATION_REQUIRED,readOnly".
|
||||
* <p>Note: Method names are always applied to the target class,
|
||||
* no matter if defined in an interface or the class itself.
|
||||
* <p>Internally, a NameMatchTransactionAttributeSource will be
|
||||
|
||||
@@ -62,7 +62,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* <p>This transaction manager is appropriate for handling distributed transactions,
|
||||
* i.e. transactions that span multiple resources, and for controlling transactions on
|
||||
* application server resources (e.g. JDBC DataSources available in JNDI) in general.
|
||||
* application server resources (for example, JDBC DataSources available in JNDI) in general.
|
||||
* For a single JDBC DataSource, DataSourceTransactionManager is perfectly sufficient,
|
||||
* and for accessing a single resource with Hibernate (including transactional cache),
|
||||
* HibernateTransactionManager is appropriate, for example.
|
||||
@@ -92,7 +92,7 @@ import org.springframework.util.StringUtils;
|
||||
* API in addition to the standard JTA UserTransaction handle. As of Spring 2.5, this
|
||||
* JtaTransactionManager autodetects the TransactionSynchronizationRegistry and uses
|
||||
* it for registering Spring-managed synchronizations when participating in an existing
|
||||
* JTA transaction (e.g. controlled by EJB CMT). If no TransactionSynchronizationRegistry
|
||||
* JTA transaction (for example, controlled by EJB CMT). If no TransactionSynchronizationRegistry
|
||||
* is available, then such synchronizations will be registered via the (non-EE) JTA
|
||||
* TransactionManager handle.
|
||||
*
|
||||
@@ -420,7 +420,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
* <p>Default is "false", throwing an exception if a non-default isolation level
|
||||
* is specified for a transaction. Turn this flag on if affected resource adapters
|
||||
* check the thread-bound transaction context and apply the specified isolation
|
||||
* levels individually (e.g. through an IsolationLevelDataSourceAdapter).
|
||||
* levels individually (for example, through an IsolationLevelDataSourceAdapter).
|
||||
* @see org.springframework.jdbc.datasource.IsolationLevelDataSourceAdapter
|
||||
* @see org.springframework.jdbc.datasource.lookup.IsolationLevelDataSourceRouter
|
||||
*/
|
||||
|
||||
@@ -122,7 +122,7 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
|
||||
finally {
|
||||
// Process Spring's beforeCompletion early, in order to avoid issues
|
||||
// with strict JTA implementations that issue warnings when doing JDBC
|
||||
// operations after transaction completion (e.g. Connection.getWarnings).
|
||||
// operations after transaction completion (for example, Connection.getWarnings).
|
||||
this.beforeCompletionCalled = true;
|
||||
this.springSynchronization.beforeCompletion();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ import org.springframework.transaction.UnexpectedRollbackException;
|
||||
* </ul>
|
||||
*
|
||||
* <p>Subclasses have to implement specific template methods for specific
|
||||
* states of a transaction, e.g.: begin, suspend, resume, commit, rollback.
|
||||
* states of a transaction, for example: begin, suspend, resume, commit, rollback.
|
||||
* The most important of them are abstract and must be provided by a concrete
|
||||
* implementation; for the rest, defaults are provided, so overriding is optional.
|
||||
*
|
||||
@@ -763,7 +763,7 @@ public abstract class AbstractReactiveTransactionManager
|
||||
* <p>The returned object will usually be specific to the concrete transaction
|
||||
* manager implementation, carrying corresponding transaction state in a
|
||||
* modifiable fashion. This object will be passed into the other template
|
||||
* methods (e.g. doBegin and doCommit), either directly or as part of a
|
||||
* methods (for example, doBegin and doCommit), either directly or as part of a
|
||||
* DefaultReactiveTransactionStatus instance.
|
||||
* <p>The returned object should contain information about any existing
|
||||
* transaction, that is, a transaction that has already started before the
|
||||
@@ -816,7 +816,7 @@ public abstract class AbstractReactiveTransactionManager
|
||||
* @param definition a TransactionDefinition instance, describing propagation
|
||||
* behavior, isolation level, read-only flag, timeout, and transaction name
|
||||
* @throws org.springframework.transaction.NestedTransactionNotSupportedException
|
||||
* if the underlying transaction does not support nesting (e.g. through savepoints)
|
||||
* if the underlying transaction does not support nesting (for example, through savepoints)
|
||||
*/
|
||||
protected abstract Mono<Void> doBegin(TransactionSynchronizationManager synchronizationManager,
|
||||
Object transaction, TransactionDefinition definition);
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.transaction.ReactiveTransaction;
|
||||
*
|
||||
* <p>Typically used to assemble various calls to transaction-unaware data access
|
||||
* services into a higher-level service method with transaction demarcation. As an
|
||||
* alternative, consider the use of declarative transaction demarcation (e.g. through
|
||||
* alternative, consider the use of declarative transaction demarcation (for example, through
|
||||
* Spring's {@link org.springframework.transaction.annotation.Transactional} annotation).
|
||||
*
|
||||
* @author Mark Paluch
|
||||
@@ -42,7 +42,7 @@ public interface TransactionCallback<T> {
|
||||
* Gets called by {@link TransactionalOperator} 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.
|
||||
* for example, setting rollback-only.
|
||||
* @param status associated transaction status
|
||||
* @return a result publisher
|
||||
* @see TransactionalOperator#transactional
|
||||
|
||||
@@ -101,7 +101,7 @@ public interface TransactionSynchronization {
|
||||
/**
|
||||
* Invoked after transaction commit. Can perform further operations right
|
||||
* <i>after</i> the main transaction has <i>successfully</i> committed.
|
||||
* <p>Can e.g. commit further operations that are supposed to follow on a successful
|
||||
* <p>Can, for example, commit further operations that are supposed to follow on a successful
|
||||
* commit of the main transaction, like confirmation messages or emails.
|
||||
* <p><b>NOTE:</b> The transaction will have been committed already, but the
|
||||
* transactional resources might still be active and accessible. As a consequence,
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
|
||||
* to be removed before a new one can be set for the same key.
|
||||
* Supports a list of transaction synchronizations if synchronization is active.
|
||||
*
|
||||
* <p>Resource management code should check for context-bound resources, e.g.
|
||||
* <p>Resource management code should check for context-bound resources, for example,
|
||||
* database connections, via {@code getResource}. Such code is normally not
|
||||
* supposed to bind resources to units of work, as this is the responsibility
|
||||
* of transaction managers. A further option is to lazily bind on first use if
|
||||
@@ -58,7 +58,7 @@ import org.springframework.util.Assert;
|
||||
* doesn't support transaction synchronization.
|
||||
*
|
||||
* <p>Synchronization is for example used to always return the same resources within
|
||||
* a transaction, e.g. a database connection for any given connection factory.
|
||||
* a transaction, for example, a database connection for any given connection factory.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -65,7 +65,7 @@ public class TransactionalEventPublisher {
|
||||
* Publish an event created through the given function which maps the transaction
|
||||
* source object (the {@link TransactionContext}) to the event instance.
|
||||
* @param eventCreationFunction a function mapping the source object to the event instance,
|
||||
* e.g. {@code source -> new PayloadApplicationEvent<>(source, "myPayload")}
|
||||
* for example, {@code source -> new PayloadApplicationEvent<>(source, "myPayload")}
|
||||
* @return the Reactor {@link Mono} for the transactional event publication
|
||||
*/
|
||||
public Mono<Void> publishEvent(Function<TransactionContext, ApplicationEvent> eventCreationFunction) {
|
||||
|
||||
@@ -59,7 +59,7 @@ import org.springframework.util.Assert;
|
||||
* </ul>
|
||||
*
|
||||
* <p>Subclasses have to implement specific template methods for specific
|
||||
* states of a transaction, e.g.: begin, suspend, resume, commit, rollback.
|
||||
* states of a transaction, for example: begin, suspend, resume, commit, rollback.
|
||||
* The most important of them are abstract and must be provided by a concrete
|
||||
* implementation; for the rest, defaults are provided, so overriding is optional.
|
||||
*
|
||||
@@ -67,7 +67,7 @@ import org.springframework.util.Assert;
|
||||
* that get invoked at transaction completion time. This is mainly used internally
|
||||
* by the data access support classes for JDBC, Hibernate, JPA, etc when running
|
||||
* within a JTA transaction: They register resources that are opened within the
|
||||
* transaction for closing at transaction completion time, allowing e.g. for reuse
|
||||
* transaction for closing at transaction completion time, allowing, for example, for reuse
|
||||
* of the same Hibernate Session within the transaction. The same mechanism can
|
||||
* also be leveraged for custom synchronization needs in an application.
|
||||
*
|
||||
@@ -188,7 +188,7 @@ public abstract class AbstractPlatformTransactionManager
|
||||
* Specify the default timeout that this transaction manager should apply
|
||||
* 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
|
||||
* for example, typically 30 seconds in case of a JTA provider, indicated by the
|
||||
* {@code TransactionDefinition.TIMEOUT_DEFAULT} value.
|
||||
* @see org.springframework.transaction.TransactionDefinition#TIMEOUT_DEFAULT
|
||||
*/
|
||||
@@ -228,7 +228,7 @@ public abstract class AbstractPlatformTransactionManager
|
||||
/**
|
||||
* Set whether existing transactions should be validated before participating
|
||||
* in them.
|
||||
* <p>When participating in an existing transaction (e.g. with
|
||||
* <p>When participating in an existing transaction (for example, with
|
||||
* PROPAGATION_REQUIRED or PROPAGATION_SUPPORTS encountering an existing
|
||||
* transaction), this outer transaction's characteristics will apply even
|
||||
* to the inner transaction scope. Validation will detect incompatible
|
||||
@@ -255,7 +255,7 @@ public abstract class AbstractPlatformTransactionManager
|
||||
/**
|
||||
* Set whether to globally mark an existing transaction as rollback-only
|
||||
* after a participating transaction failed.
|
||||
* <p>Default is "true": If a participating transaction (e.g. with
|
||||
* <p>Default is "true": If a participating transaction (for example, with
|
||||
* PROPAGATION_REQUIRED or PROPAGATION_SUPPORTS encountering an existing
|
||||
* transaction) fails, the transaction will be globally marked as rollback-only.
|
||||
* The only possible outcome of such a transaction is a rollback: The
|
||||
@@ -1080,7 +1080,7 @@ public abstract class AbstractPlatformTransactionManager
|
||||
* <p>The returned object will usually be specific to the concrete transaction
|
||||
* manager implementation, carrying corresponding transaction state in a
|
||||
* modifiable fashion. This object will be passed into the other template
|
||||
* methods (e.g. doBegin and doCommit), either directly or as part of a
|
||||
* methods (for example, doBegin and doCommit), either directly or as part of a
|
||||
* DefaultTransactionStatus instance.
|
||||
* <p>The returned object should contain information about any existing
|
||||
* transaction, that is, a transaction that has already started before the
|
||||
|
||||
@@ -71,7 +71,7 @@ public abstract class ResourceHolderSupport implements ResourceHolder {
|
||||
/**
|
||||
* Reset the rollback-only status for this resource transaction.
|
||||
* <p>Only really intended to be called after custom rollback steps which
|
||||
* keep the original resource in action, e.g. in case of a savepoint.
|
||||
* keep the original resource in action, for example, in case of a savepoint.
|
||||
* @since 5.0
|
||||
* @see org.springframework.transaction.SavepointManager#rollbackToSavepoint
|
||||
*/
|
||||
@@ -120,7 +120,7 @@ public abstract class ResourceHolderSupport implements ResourceHolder {
|
||||
|
||||
/**
|
||||
* Return the time to live for this object in seconds.
|
||||
* Rounds up eagerly, e.g. 9.00001 still to 10.
|
||||
* Rounds up eagerly, for example, 9.00001 still to 10.
|
||||
* @return number of seconds until expiration
|
||||
* @throws TransactionTimedOutException if the deadline has already been reached
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ public interface ResourceTransactionManager extends PlatformTransactionManager {
|
||||
|
||||
/**
|
||||
* Return the resource factory that this transaction manager operates on,
|
||||
* e.g. a JDBC DataSource or a JMS ConnectionFactory.
|
||||
* for example, 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})
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.transaction.TransactionStatus;
|
||||
*
|
||||
* <p>Typically used to assemble various calls to transaction-unaware data access
|
||||
* services into a higher-level service method with transaction demarcation. As an
|
||||
* alternative, consider the use of declarative transaction demarcation (e.g. through
|
||||
* alternative, consider the use of declarative transaction demarcation (for example, through
|
||||
* Spring's {@link org.springframework.transaction.annotation.Transactional} annotation).
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
@@ -41,7 +41,7 @@ public interface TransactionCallback<T> {
|
||||
* Gets called by {@link 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.
|
||||
* for example, setting rollback-only.
|
||||
* <p>Allows for returning a result object created within the transaction, i.e. a
|
||||
* domain object or a collection of domain objects. A RuntimeException thrown by the
|
||||
* callback is treated as application exception that enforces a rollback. Any such
|
||||
|
||||
@@ -41,7 +41,7 @@ public abstract class TransactionCallbackWithoutResult implements TransactionCal
|
||||
* 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.
|
||||
* for example, setting rollback-only.
|
||||
* <p>A RuntimeException thrown by the callback is treated as application
|
||||
* exception that enforces a rollback. An exception gets propagated to the
|
||||
* caller of the template.
|
||||
|
||||
@@ -118,7 +118,7 @@ public interface TransactionSynchronization extends Ordered, Flushable {
|
||||
|
||||
/**
|
||||
* Invoked before transaction commit (before "beforeCompletion").
|
||||
* Can e.g. flush transactional O/R Mapping sessions to the database.
|
||||
* Can, for example, flush transactional O/R Mapping sessions to the database.
|
||||
* <p>This callback does <i>not</i> mean that the transaction will actually be committed.
|
||||
* A rollback decision can still occur after this method has been called. This callback
|
||||
* is rather meant to perform work that's only relevant if a commit still has a chance
|
||||
@@ -150,7 +150,7 @@ public interface TransactionSynchronization extends Ordered, Flushable {
|
||||
/**
|
||||
* Invoked after transaction commit. Can perform further operations right
|
||||
* <i>after</i> the main transaction has <i>successfully</i> committed.
|
||||
* <p>Can e.g. commit further operations that are supposed to follow on a successful
|
||||
* <p>Can, for example, commit further operations that are supposed to follow on a successful
|
||||
* commit of the main transaction, like confirmation messages or emails.
|
||||
* <p><b>NOTE:</b> The transaction will have been committed already, but the
|
||||
* transactional resources might still be active and accessible. As a consequence,
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.util.Assert;
|
||||
* to be removed before a new one can be set for the same key.
|
||||
* Supports a list of transaction synchronizations if synchronization is active.
|
||||
*
|
||||
* <p>Resource management code should check for thread-bound resources, e.g. JDBC
|
||||
* <p>Resource management code should check for thread-bound resources, for example, JDBC
|
||||
* 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
|
||||
@@ -58,7 +58,7 @@ import org.springframework.util.Assert;
|
||||
* doesn't support transaction synchronization.
|
||||
*
|
||||
* <p>Synchronization is for example used to always return the same resources
|
||||
* within a JTA transaction, e.g. a JDBC Connection or a Hibernate Session for
|
||||
* within a JTA transaction, for example, a JDBC Connection or a Hibernate Session for
|
||||
* any given DataSource or SessionFactory, respectively.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
||||
Reference in New Issue
Block a user