Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
032096d699
commit
e0480f75ac
@@ -34,7 +34,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class ChainedPersistenceExceptionTranslator implements PersistenceExceptionTranslator {
|
||||
|
||||
/** List of PersistenceExceptionTranslators */
|
||||
/** List of PersistenceExceptionTranslators. */
|
||||
private final List<PersistenceExceptionTranslator> delegates = new ArrayList<>(4);
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,7 @@ import org.springframework.beans.factory.InitializingBean;
|
||||
*/
|
||||
public abstract class DaoSupport implements InitializingBean {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -231,7 +231,7 @@ public abstract class DataAccessUtils {
|
||||
* Return a translated exception if this is appropriate,
|
||||
* otherwise return the given exception as-is.
|
||||
* @param rawException an exception that we may wish to translate
|
||||
* @param pet PersistenceExceptionTranslator to use to perform the translation
|
||||
* @param pet the PersistenceExceptionTranslator to use to perform the translation
|
||||
* @return a translated persistence exception if translation is possible,
|
||||
* or the raw exception if it is not
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ public class CannotCreateRecordException extends DataAccessResourceFailureExcept
|
||||
/**
|
||||
* Constructor for CannotCreateRecordException.
|
||||
* @param msg message
|
||||
* @param ex ResourceException root cause
|
||||
* @param ex the root ResourceException cause
|
||||
*/
|
||||
public CannotCreateRecordException(String msg, ResourceException ex) {
|
||||
super(msg, ex);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ public class CannotGetCciConnectionException extends DataAccessResourceFailureEx
|
||||
/**
|
||||
* Constructor for CannotGetCciConnectionException.
|
||||
* @param msg message
|
||||
* @param ex ResourceException root cause
|
||||
* @param ex the root ResourceException cause
|
||||
*/
|
||||
public CannotGetCciConnectionException(String msg, ResourceException ex) {
|
||||
super(msg, ex);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,7 @@ public class CciOperationNotSupportedException extends InvalidDataAccessResource
|
||||
/**
|
||||
* Constructor for CciOperationNotSupportedException.
|
||||
* @param msg message
|
||||
* @param ex ResourceException root cause
|
||||
* @param ex the root ResourceException cause
|
||||
*/
|
||||
public CciOperationNotSupportedException(String msg, ResourceException ex) {
|
||||
super(msg, ex);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ public class RecordTypeNotSupportedException extends InvalidDataAccessResourceUs
|
||||
/**
|
||||
* Constructor for RecordTypeNotSupportedException.
|
||||
* @param msg message
|
||||
* @param ex ResourceException root cause
|
||||
* @param ex the root ResourceException cause
|
||||
*/
|
||||
public RecordTypeNotSupportedException(String msg, ResourceException ex) {
|
||||
super(msg, ex);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -80,7 +80,7 @@ public class CciLocalTransactionManager extends AbstractPlatformTransactionManag
|
||||
|
||||
/**
|
||||
* Create a new CciLocalTransactionManager instance.
|
||||
* @param connectionFactory CCI ConnectionFactory to manage local transactions for
|
||||
* @param connectionFactory the CCI ConnectionFactory to manage local transactions for
|
||||
*/
|
||||
public CciLocalTransactionManager(ConnectionFactory connectionFactory) {
|
||||
setConnectionFactory(connectionFactory);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -56,15 +56,15 @@ public class SingleConnectionFactory extends DelegatingConnectionFactory impleme
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
/** Wrapped Connection */
|
||||
/** Wrapped Connection. */
|
||||
@Nullable
|
||||
private Connection target;
|
||||
|
||||
/** Proxy Connection */
|
||||
/** Proxy Connection. */
|
||||
@Nullable
|
||||
private Connection connection;
|
||||
|
||||
/** Synchronization monitor for the shared Connection */
|
||||
/** Synchronization monitor for the shared Connection. */
|
||||
private final Object connectionMonitor = new Object();
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -102,7 +102,7 @@ public class TransactionAwareConnectionFactoryProxy extends DelegatingConnection
|
||||
* Wrap the given Connection with a proxy that delegates every method call to it
|
||||
* but delegates {@code close} calls to ConnectionFactoryUtils.
|
||||
* @param target the original Connection to wrap
|
||||
* @param cf ConnectionFactory that the Connection came from
|
||||
* @param cf the ConnectionFactory that the Connection came from
|
||||
* @return the wrapped Connection
|
||||
* @see javax.resource.cci.Connection#close()
|
||||
* @see ConnectionFactoryUtils#doReleaseConnection
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -93,7 +93,7 @@ public class CciTemplate implements CciOperations {
|
||||
/**
|
||||
* Construct a new CciTemplate, given a ConnectionFactory to obtain Connections from.
|
||||
* Note: This will trigger eager initialization of the exception translator.
|
||||
* @param connectionFactory JCA ConnectionFactory to obtain Connections from
|
||||
* @param connectionFactory the JCA ConnectionFactory to obtain Connections from
|
||||
*/
|
||||
public CciTemplate(ConnectionFactory connectionFactory) {
|
||||
setConnectionFactory(connectionFactory);
|
||||
@@ -103,7 +103,7 @@ public class CciTemplate implements CciOperations {
|
||||
/**
|
||||
* Construct a new CciTemplate, given a ConnectionFactory to obtain Connections from.
|
||||
* Note: This will trigger eager initialization of the exception translator.
|
||||
* @param connectionFactory JCA ConnectionFactory to obtain Connections from
|
||||
* @param connectionFactory the JCA ConnectionFactory to obtain Connections from
|
||||
* @param connectionSpec the CCI ConnectionSpec to obtain Connections for
|
||||
* (may be {@code null})
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,6 +38,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Thierry Templier
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @param <T> the result type
|
||||
* @see CciTemplate#execute(ConnectionCallback)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,6 +39,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Thierry Templier
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @param <T> the result type
|
||||
* @see CciTemplate#execute(InteractionCallback)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,6 +40,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Thierry Templier
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @param <T> the result type
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, Record, RecordExtractor)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
|
||||
* @see javax.resource.cci.ResultSet
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -137,7 +137,7 @@ public abstract class CciDaoSupport extends DaoSupport {
|
||||
/**
|
||||
* Close the given CCI Connection, created via this bean's ConnectionFactory,
|
||||
* if it isn't bound to the thread.
|
||||
* @param con Connection to close
|
||||
* @param con the Connection to close
|
||||
* @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#releaseConnection
|
||||
*/
|
||||
protected final void releaseConnection(Connection con) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,7 +45,7 @@ public abstract class MappingCommAreaOperation extends MappingRecordOperation {
|
||||
|
||||
/**
|
||||
* Create a new MappingCommAreaQuery.
|
||||
* @param connectionFactory ConnectionFactory to use to obtain connections
|
||||
* @param connectionFactory the ConnectionFactory to use to obtain connections
|
||||
* @param interactionSpec specification to configure the interaction
|
||||
*/
|
||||
public MappingCommAreaOperation(ConnectionFactory connectionFactory, InteractionSpec interactionSpec) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -56,7 +56,7 @@ public abstract class MappingRecordOperation extends EisOperation {
|
||||
/**
|
||||
* Convenient constructor with ConnectionFactory and specifications
|
||||
* (connection and interaction).
|
||||
* @param connectionFactory ConnectionFactory to use to obtain connections
|
||||
* @param connectionFactory the ConnectionFactory to use to obtain connections
|
||||
*/
|
||||
public MappingRecordOperation(ConnectionFactory connectionFactory, InteractionSpec interactionSpec) {
|
||||
getCciTemplate().setConnectionFactory(connectionFactory);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,7 +42,7 @@ public class SimpleRecordOperation extends EisOperation {
|
||||
/**
|
||||
* Convenient constructor with ConnectionFactory and specifications
|
||||
* (connection and interaction).
|
||||
* @param connectionFactory ConnectionFactory to use to obtain connections
|
||||
* @param connectionFactory the ConnectionFactory to use to obtain connections
|
||||
*/
|
||||
public SimpleRecordOperation(ConnectionFactory connectionFactory, InteractionSpec interactionSpec) {
|
||||
getCciTemplate().setConnectionFactory(connectionFactory);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,7 +38,7 @@ public interface BootstrapContextAware extends Aware {
|
||||
* callback like InitializingBean's {@code afterPropertiesSet} or a
|
||||
* custom init-method. Invoked after ApplicationContextAware's
|
||||
* {@code setApplicationContext}.
|
||||
* @param bootstrapContext BootstrapContext object to be used by this object
|
||||
* @param bootstrapContext the BootstrapContext object to be used by this object
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -115,6 +115,9 @@ public class SpringContextResourceAdapter implements ResourceAdapter {
|
||||
*/
|
||||
public static final String CONFIG_LOCATION_DELIMITERS = ConfigurableApplicationContext.CONFIG_LOCATION_DELIMITERS;
|
||||
|
||||
/**
|
||||
* The default {@code applicationContext.xml} location.
|
||||
*/
|
||||
public static final String DEFAULT_CONTEXT_CONFIG_LOCATION = "META-INF/applicationContext.xml";
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public abstract class AbstractMessageEndpointFactory implements MessageEndpointFactory, BeanNameAware {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,11 +28,23 @@ package org.springframework.transaction;
|
||||
public class HeuristicCompletionException extends TransactionException {
|
||||
|
||||
/**
|
||||
* Values for the outcome state of a heuristically completed transaction.
|
||||
* Unknown outcome state.
|
||||
*/
|
||||
public static final int STATE_UNKNOWN = 0;
|
||||
|
||||
/**
|
||||
* Committed outcome state.
|
||||
*/
|
||||
public static final int STATE_COMMITTED = 1;
|
||||
|
||||
/**
|
||||
* Rolledback outcome state.
|
||||
*/
|
||||
public static final int STATE_ROLLED_BACK = 2;
|
||||
|
||||
/**
|
||||
* Mixed outcome state.
|
||||
*/
|
||||
public static final int STATE_MIXED = 3;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -56,7 +56,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} for defaults),
|
||||
* @param definition the 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -149,7 +149,7 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
|
||||
* 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,
|
||||
* @return the configured transaction attribute,
|
||||
* or {@code null} if none was found
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,23 +58,22 @@ import org.springframework.core.Ordered;
|
||||
* configuration:
|
||||
*
|
||||
* <pre class="code">
|
||||
* {@code
|
||||
* <beans>
|
||||
* <beans>
|
||||
*
|
||||
* <tx:annotation-driven/>
|
||||
* <tx:annotation-driven/>
|
||||
*
|
||||
* <bean id="fooRepository" class="com.foo.JdbcFooRepository">
|
||||
* <constructor-arg ref="dataSource"/>
|
||||
* </bean>
|
||||
* <bean id="fooRepository" class="com.foo.JdbcFooRepository">
|
||||
* <constructor-arg ref="dataSource"/>
|
||||
* </bean>
|
||||
*
|
||||
* <bean id="dataSource" class="com.vendor.VendorDataSource"/>
|
||||
* <bean id="dataSource" class="com.vendor.VendorDataSource"/>
|
||||
*
|
||||
* <bean id="transactionManager" class="org.sfwk...DataSourceTransactionManager">
|
||||
* <constructor-arg ref="dataSource"/>
|
||||
* </bean>
|
||||
* <bean id="transactionManager" class="org.sfwk...DataSourceTransactionManager">
|
||||
* <constructor-arg ref="dataSource"/>
|
||||
* </bean>
|
||||
*
|
||||
* </beans>
|
||||
* }</pre>
|
||||
* </beans>
|
||||
* </pre>
|
||||
*
|
||||
* In both of the scenarios above, {@code @EnableTransactionManagement} and {@code
|
||||
* <tx:annotation-driven/>} are responsible for registering the necessary Spring
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,7 +44,7 @@ public interface TransactionAnnotationParser {
|
||||
* 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,
|
||||
* @return the configured transaction attribute,
|
||||
* or {@code null} if none was found
|
||||
* @see AnnotationTransactionAttributeSource#determineTransactionAttribute
|
||||
*/
|
||||
|
||||
@@ -78,7 +78,7 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
|
||||
* <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})
|
||||
* @param targetClass the target class for this invocation (may be {@code null})
|
||||
* @return TransactionAttribute for this method, or {@code null} if the method
|
||||
* @return a TransactionAttribute for this method, or {@code null} if the method
|
||||
* is not transactional
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,7 +44,7 @@ public class MatchAlwaysTransactionAttributeSource implements TransactionAttribu
|
||||
/**
|
||||
* Allows a transaction attribute to be specified, using the String form, for
|
||||
* example, "PROPAGATION_REQUIRED".
|
||||
* @param transactionAttribute The String form of the transactionAttribute to use.
|
||||
* @param transactionAttribute the String form of the transactionAttribute to use.
|
||||
* @see org.springframework.transaction.interceptor.TransactionAttributeEditor
|
||||
*/
|
||||
public void setTransactionAttribute(TransactionAttribute transactionAttribute) {
|
||||
|
||||
@@ -46,10 +46,10 @@ import org.springframework.util.PatternMatchUtils;
|
||||
public class MethodMapTransactionAttributeSource
|
||||
implements TransactionAttributeSource, BeanClassLoaderAware, InitializingBean {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
/** Map from method name to attribute value */
|
||||
/** Map from method name to attribute value. */
|
||||
@Nullable
|
||||
private Map<String, TransactionAttribute> methodMap;
|
||||
|
||||
@@ -60,10 +60,10 @@ public class MethodMapTransactionAttributeSource
|
||||
|
||||
private boolean initialized = false;
|
||||
|
||||
/** Map from Method to TransactionAttribute */
|
||||
/** Map from Method to TransactionAttribute. */
|
||||
private final Map<Method, TransactionAttribute> transactionAttributeMap = new HashMap<>();
|
||||
|
||||
/** Map from Method to name pattern used for registration */
|
||||
/** Map from Method to name pattern used for registration. */
|
||||
private final Map<Method, String> methodNameMap = new HashMap<>();
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class MethodMapTransactionAttributeSource
|
||||
|
||||
/**
|
||||
* Initialize the specified {@link #setMethodMap(java.util.Map) "methodMap"}, if any.
|
||||
* @param methodMap Map from method names to {@code TransactionAttribute} instances
|
||||
* @param methodMap a Map from method names to {@code TransactionAttribute} instances
|
||||
* @see #setMethodMap
|
||||
*/
|
||||
protected void initMethodMap(@Nullable Map<String, TransactionAttribute> methodMap) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@ public class NameMatchTransactionAttributeSource implements TransactionAttribute
|
||||
*/
|
||||
protected static final Log logger = LogFactory.getLog(NameMatchTransactionAttributeSource.class);
|
||||
|
||||
/** Keys are method names; values are TransactionAttributes */
|
||||
/** Keys are method names; values are TransactionAttributes. */
|
||||
private Map<String, TransactionAttribute> nameMap = new HashMap<>();
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,14 +42,14 @@ import org.springframework.lang.Nullable;
|
||||
@SuppressWarnings("serial")
|
||||
public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute implements Serializable {
|
||||
|
||||
/** Prefix for rollback-on-exception rules in description strings */
|
||||
/** Prefix for rollback-on-exception rules in description strings. */
|
||||
public static final String PREFIX_ROLLBACK_RULE = "-";
|
||||
|
||||
/** Prefix for commit-on-exception rules in description strings */
|
||||
/** Prefix for commit-on-exception rules in description strings. */
|
||||
public static final String PREFIX_COMMIT_RULE = "+";
|
||||
|
||||
|
||||
/** Static for optimal serializability */
|
||||
/** Static for optimal serializability. */
|
||||
private static final Log logger = LogFactory.getLog(RuleBasedTransactionAttribute.class);
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -101,7 +101,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
* <p>To find out about specific transaction characteristics, consider using
|
||||
* TransactionSynchronizationManager's {@code isSynchronizationActive()}
|
||||
* and/or {@code isActualTransactionActive()} methods.
|
||||
* @return TransactionInfo bound to this thread, or {@code null} if none
|
||||
* @return the 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()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,7 +40,7 @@ public interface TransactionAttributeSource {
|
||||
* @param method the method to introspect
|
||||
* @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,
|
||||
* @return the TransactionAttribute the matching transaction attribute,
|
||||
* or {@code null} if none found
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -80,26 +80,25 @@ import org.springframework.transaction.PlatformTransactionManager;
|
||||
* This reduces the per-bean definition effort to a minimum.
|
||||
*
|
||||
* <pre code="class">
|
||||
* {@code
|
||||
* <bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
|
||||
* abstract="true">
|
||||
* <property name="transactionManager" ref="transactionManager"/>
|
||||
* <property name="transactionAttributes">
|
||||
* <props>
|
||||
* <prop key="insert*">PROPAGATION_REQUIRED</prop>
|
||||
* <prop key="update*">PROPAGATION_REQUIRED</prop>
|
||||
* <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
|
||||
* </props>
|
||||
* </property>
|
||||
* </bean>
|
||||
* <bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
|
||||
* abstract="true">
|
||||
* <property name="transactionManager" ref="transactionManager"/>
|
||||
* <property name="transactionAttributes">
|
||||
* <props>
|
||||
* <prop key="insert*">PROPAGATION_REQUIRED</prop>
|
||||
* <prop key="update*">PROPAGATION_REQUIRED</prop>
|
||||
* <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
|
||||
* </props>
|
||||
* </property>
|
||||
* </bean>
|
||||
*
|
||||
* <bean id="myProxy" parent="baseTransactionProxy">
|
||||
* <property name="target" ref="myTarget"/>
|
||||
* </bean>
|
||||
* <bean id="myProxy" parent="baseTransactionProxy">
|
||||
* <property name="target" ref="myTarget"/>
|
||||
* </bean>
|
||||
*
|
||||
* <bean id="yourProxy" parent="baseTransactionProxy">
|
||||
* <property name="target" ref="yourTarget"/>
|
||||
* </bean>}</pre>
|
||||
* <bean id="yourProxy" parent="baseTransactionProxy">
|
||||
* <property name="target" ref="yourTarget"/>
|
||||
* </bean></pre>
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Dmitriy Kopylenko
|
||||
|
||||
@@ -864,7 +864,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
* <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
|
||||
* @param definition the TransactionDefinition instance, describing propagation
|
||||
* behavior, isolation level, read-only flag, timeout, and transaction name
|
||||
* @throws NotSupportedException if thrown by JTA methods
|
||||
* @throws SystemException if thrown by JTA methods
|
||||
@@ -1139,7 +1139,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
|
||||
* If none of the two is available, a warning will be logged.
|
||||
* <p>Can be overridden in subclasses, for specific JTA implementations.
|
||||
* @param txObject the current transaction object
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @param synchronizations a List of TransactionSynchronization objects
|
||||
* @throws RollbackException if thrown by JTA methods
|
||||
* @throws SystemException if thrown by JTA methods
|
||||
* @see #getTransactionManager()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,7 +42,7 @@ public class SimpleTransactionFactory implements TransactionFactory {
|
||||
|
||||
|
||||
/**
|
||||
* Create a new SimpleTransactionFactory for the given TransactionManager
|
||||
* Create a new SimpleTransactionFactory for the given TransactionManager.
|
||||
* @param transactionManager the JTA TransactionManager to wrap
|
||||
*/
|
||||
public SimpleTransactionFactory(TransactionManager transactionManager) {
|
||||
|
||||
@@ -107,7 +107,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
public static final int SYNCHRONIZATION_NEVER = 2;
|
||||
|
||||
|
||||
/** Constants instance for AbstractPlatformTransactionManager */
|
||||
/** Constants instance for AbstractPlatformTransactionManager. */
|
||||
private static final Constants constants = new Constants(AbstractPlatformTransactionManager.class);
|
||||
|
||||
|
||||
@@ -667,7 +667,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
/**
|
||||
* Reactivate transaction synchronization for the current thread
|
||||
* and resume all given synchronizations.
|
||||
* @param suspendedSynchronizations List of TransactionSynchronization objects
|
||||
* @param suspendedSynchronizations a List of TransactionSynchronization objects
|
||||
*/
|
||||
private void doResumeSynchronization(List<TransactionSynchronization> suspendedSynchronizations) {
|
||||
TransactionSynchronizationManager.initSynchronization();
|
||||
@@ -980,7 +980,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* given Spring TransactionSynchronization objects.
|
||||
* <p>To be called by this abstract manager itself, or by special implementations
|
||||
* of the {@code registerAfterCompletionWithExistingTransaction} callback.
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @param synchronizations a List of TransactionSynchronization objects
|
||||
* @param completionStatus the completion status according to the
|
||||
* constants in the TransactionSynchronization interface
|
||||
* @see #registerAfterCompletionWithExistingTransaction(Object, java.util.List)
|
||||
@@ -1096,7 +1096,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* 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}
|
||||
* @param definition TransactionDefinition instance, describing propagation
|
||||
* @param definition a TransactionDefinition instance, describing propagation
|
||||
* behavior, isolation level, read-only flag, timeout, and transaction name
|
||||
* @throws TransactionException in case of creation or system errors
|
||||
*/
|
||||
@@ -1231,7 +1231,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* 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}
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @param synchronizations a List of TransactionSynchronization objects
|
||||
* @throws TransactionException in case of system errors
|
||||
* @see #invokeAfterCompletion(java.util.List, int)
|
||||
* @see TransactionSynchronization#afterCompletion(int)
|
||||
|
||||
@@ -36,20 +36,20 @@ import org.springframework.transaction.TransactionDefinition;
|
||||
@SuppressWarnings("serial")
|
||||
public class DefaultTransactionDefinition implements TransactionDefinition, Serializable {
|
||||
|
||||
/** Prefix for the propagation constants defined in TransactionDefinition */
|
||||
/** Prefix for the propagation constants defined in TransactionDefinition. */
|
||||
public static final String PREFIX_PROPAGATION = "PROPAGATION_";
|
||||
|
||||
/** Prefix for the isolation constants defined in TransactionDefinition */
|
||||
/** Prefix for the isolation constants defined in TransactionDefinition. */
|
||||
public static final String PREFIX_ISOLATION = "ISOLATION_";
|
||||
|
||||
/** Prefix for transaction timeout values in description strings */
|
||||
/** Prefix for transaction timeout values in description strings. */
|
||||
public static final String PREFIX_TIMEOUT = "timeout_";
|
||||
|
||||
/** Marker for read-only transactions in description strings */
|
||||
/** Marker for read-only transactions in description strings. */
|
||||
public static final String READ_ONLY_MARKER = "readOnly";
|
||||
|
||||
|
||||
/** Constants instance for TransactionDefinition */
|
||||
/** Constants instance for TransactionDefinition. */
|
||||
static final Constants constants = new Constants(TransactionDefinition.class);
|
||||
|
||||
private int propagationBehavior = PROPAGATION_REQUIRED;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,6 +22,8 @@ package org.springframework.transaction.support;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.5.5
|
||||
* @param <H> the resource holder type
|
||||
* @param <K> the resource key type
|
||||
*/
|
||||
public abstract class ResourceHolderSynchronization<H extends ResourceHolder, K>
|
||||
implements TransactionSynchronization {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -92,6 +92,9 @@ public class SimpleTransactionScope implements Scope {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Holder for scoped objects.
|
||||
*/
|
||||
static class ScopedObjectsHolder {
|
||||
|
||||
final Map<String, Object> scopedInstances = new HashMap<>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,6 +32,7 @@ import org.springframework.transaction.TransactionStatus;
|
||||
* @since 17.03.2003
|
||||
* @see TransactionTemplate
|
||||
* @see CallbackPreferringPlatformTransactionManager
|
||||
* @param <T> the result type
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface TransactionCallback<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,13 +37,13 @@ import java.io.Flushable;
|
||||
*/
|
||||
public interface TransactionSynchronization extends Flushable {
|
||||
|
||||
/** Completion status in case of proper commit */
|
||||
/** Completion status in case of proper commit. */
|
||||
int STATUS_COMMITTED = 0;
|
||||
|
||||
/** Completion status in case of proper rollback */
|
||||
/** Completion status in case of proper rollback. */
|
||||
int STATUS_ROLLED_BACK = 1;
|
||||
|
||||
/** Completion status in case of heuristic mixed completion or system errors */
|
||||
/** Completion status in case of heuristic mixed completion or system errors. */
|
||||
int STATUS_UNKNOWN = 2;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -125,7 +125,7 @@ public abstract class TransactionSynchronizationUtils {
|
||||
/**
|
||||
* Actually invoke the {@code afterCommit} methods of the
|
||||
* given Spring TransactionSynchronization objects.
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @param synchronizations a List of TransactionSynchronization objects
|
||||
* @see TransactionSynchronization#afterCommit()
|
||||
*/
|
||||
public static void invokeAfterCommit(@Nullable List<TransactionSynchronization> synchronizations) {
|
||||
@@ -138,9 +138,9 @@ public abstract class TransactionSynchronizationUtils {
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @see TransactionSynchronizationManager#getSynchronizations()
|
||||
* @see TransactionSynchronization#afterCompletion(int)
|
||||
* @see TransactionSynchronization#STATUS_COMMITTED
|
||||
* @see TransactionSynchronization#STATUS_ROLLED_BACK
|
||||
@@ -154,7 +154,7 @@ public abstract class TransactionSynchronizationUtils {
|
||||
/**
|
||||
* Actually invoke the {@code afterCompletion} methods of the
|
||||
* given Spring TransactionSynchronization objects.
|
||||
* @param synchronizations List of TransactionSynchronization objects
|
||||
* @param synchronizations a List of TransactionSynchronization objects
|
||||
* @param completionStatus the completion status according to the
|
||||
* constants in the TransactionSynchronization interface
|
||||
* @see TransactionSynchronization#afterCompletion(int)
|
||||
|
||||
@@ -65,7 +65,7 @@ import org.springframework.util.Assert;
|
||||
public class TransactionTemplate extends DefaultTransactionDefinition
|
||||
implements TransactionOperations, InitializingBean {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user