This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push: new 6ed9bc9 Use Javadoc tags instead of HTML. 6ed9bc9 is described below commit 6ed9bc91d4d31b1a12919853956ed8b7e727e231 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Sun Oct 17 10:57:33 2021 -0400 Use Javadoc tags instead of HTML. --- .../org/apache/commons/dbcp2/BasicDataSource.java | 38 +++---- .../commons/dbcp2/BasicDataSourceFactory.java | 22 ++-- .../apache/commons/dbcp2/DelegatingConnection.java | 12 +- .../dbcp2/DriverManagerConnectionFactory.java | 8 +- .../java/org/apache/commons/dbcp2/PStmtKey.java | 124 ++++++++++----------- .../apache/commons/dbcp2/PoolingConnection.java | 8 +- .../org/apache/commons/dbcp2/PoolingDriver.java | 4 +- .../commons/dbcp2/cpdsadapter/ConnectionImpl.java | 56 +++++----- .../dbcp2/cpdsadapter/DriverAdapterCPDS.java | 32 +++--- .../commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java | 22 ++-- .../dbcp2/cpdsadapter/PooledConnectionImpl.java | 96 ++++++++-------- .../commons/dbcp2/cpdsadapter/package-info.java | 4 +- .../dbcp2/datasources/InstanceKeyDataSource.java | 28 ++--- .../datasources/InstanceKeyDataSourceFactory.java | 2 +- .../dbcp2/datasources/PerUserPoolDataSource.java | 10 +- .../datasources/PerUserPoolDataSourceFactory.java | 2 +- .../dbcp2/datasources/SharedPoolDataSource.java | 8 +- .../datasources/SharedPoolDataSourceFactory.java | 2 +- .../commons/dbcp2/datasources/package-info.java | 18 +-- .../managed/PoolableManagedConnectionFactory.java | 2 +- 20 files changed, 249 insertions(+), 249 deletions(-) diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java index dc340e7..07615d2 100644 --- a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java +++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java @@ -56,7 +56,7 @@ import org.apache.commons.pool2.impl.GenericObjectPool; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; /** - * Basic implementation of <code>javax.sql.DataSource</code> that is configured via JavaBeans properties. + * Basic implementation of {@code javax.sql.DataSource} that is configured via JavaBeans properties. * * <p> * This is not the only way to combine the <em>commons-dbcp2</em> and <em>commons-pool2</em> packages, but provides a @@ -213,7 +213,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean private Duration maxWaitDuration = BaseObjectPoolConfig.DEFAULT_MAX_WAIT; /** - * Prepared statement pooling for this pool. When this property is set to <code>true</code> both PreparedStatements + * Prepared statement pooling for this pool. When this property is set to {@code true} both PreparedStatements * and CallableStatements are pooled. */ private boolean poolPreparedStatements; @@ -229,7 +229,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * <p> * Note: As of version 1.3, CallableStatements (those produced by {@link Connection#prepareCall}) are pooled along * with PreparedStatements (produced by {@link Connection#prepareStatement}) and - * <code>maxOpenPreparedStatements</code> limits the total number of prepared or callable statements that may be in + * {@code maxOpenPreparedStatements} limits the total number of prepared or callable statements that may be in * use at a given time. * </p> */ @@ -359,7 +359,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * The data source we will use to manage connections. This object should be acquired <strong>ONLY</strong> by calls - * to the <code>createDataSource()</code> method. + * to the {@code createDataSource()} method. */ private volatile DataSource dataSource; @@ -681,7 +681,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * connection pool record a stack trace every time a method is called on a pooled connection and retain the most * recent stack trace to aid debugging of abandoned connections? * - * @return <code>true</code> if usage tracking is enabled + * @return {@code true} if usage tracking is enabled */ @Override public boolean getAbandonedUsageTracking() { @@ -691,7 +691,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * Gets the value of the flag that controls whether or not connections being returned to the pool will be checked * and configured with {@link Connection#setAutoCommit(boolean) Connection.setAutoCommit(true)} if the auto commit - * setting is {@code false} when the connection is returned. It is <code>true</code> by default. + * setting is {@code false} when the connection is returned. It is {@code true} by default. * * @return Whether or not connections being returned to the pool will be checked and configured with auto-commit. */ @@ -816,7 +816,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * Gets the default query timeout that will be used for {@link java.sql.Statement Statement}s created from this - * connection. <code>null</code> means that the driver default will be used. + * connection. {@code null} means that the driver default will be used. * * @return The default query timeout in seconds. * @deprecated Use {@link #getDefaultQueryTimeoutDuration()}. @@ -828,7 +828,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * Gets the default query timeout that will be used for {@link java.sql.Statement Statement}s created from this - * connection. <code>null</code> means that the driver default will be used. + * connection. {@code null} means that the driver default will be used. * * @return The default query timeout Duration. * @since 2.10.0 @@ -905,7 +905,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** - * Gets the class loader specified for loading the JDBC driver. Returns <code>null</code> if no class loader has + * Gets the class loader specified for loading the JDBC driver. Returns {@code null} if no class loader has * been explicitly specified. * <p> * Note: This getter only returns the last value set by a call to {@link #setDriverClassLoader(ClassLoader)}. It @@ -935,7 +935,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * Gets the value of the flag that controls whether or not connections being returned to the pool will be checked * and configured with {@link Connection#setAutoCommit(boolean) Connection.setAutoCommit(true)} if the auto commit - * setting is {@code false} when the connection is returned. It is <code>true</code> by default. + * setting is {@code false} when the connection is returned. It is {@code true} by default. * * @return Whether or not connections being returned to the pool will be checked and configured with auto-commit. * @deprecated Use {@link #getAutoCommitOnReturn()}. @@ -1094,7 +1094,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** - * Gets the value of the <code>maxOpenPreparedStatements</code> property. + * Gets the value of the {@code maxOpenPreparedStatements} property. * * @return the maximum number of open statements */ @@ -1726,7 +1726,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * the connection pool should record a stack trace every time a method is called on a pooled connection and retain * the most recent stack trace to aid debugging of abandoned connections. * - * @param usageTracking A value of <code>true</code> will enable the recording of a stack trace on every use of a + * @param usageTracking A value of {@code true} will enable the recording of a stack trace on every use of a * pooled connection */ public void setAbandonedUsageTracking(final boolean usageTracking) { @@ -1758,7 +1758,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * Sets the value of the flag that controls whether or not connections being returned to the pool will be checked * and configured with {@link Connection#setAutoCommit(boolean) Connection.setAutoCommit(true)} if the auto commit - * setting is {@code false} when the connection is returned. It is <code>true</code> by default. + * setting is {@code false} when the connection is returned. It is {@code true} by default. * * @param autoCommitOnReturn Whether or not connections being returned to the pool will be checked and configured * with auto-commit. @@ -1887,7 +1887,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * Sets the default query timeout that will be used for {@link java.sql.Statement Statement}s created from this - * connection. <code>null</code> means that the driver default will be used. + * connection. {@code null} means that the driver default will be used. * * @param defaultQueryTimeoutDuration The default query timeout Duration. * @since 2.10.0 @@ -1898,7 +1898,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * Sets the default query timeout that will be used for {@link java.sql.Statement Statement}s created from this - * connection. <code>null</code> means that the driver default will be used. + * connection. {@code null} means that the driver default will be used. * * @param defaultQueryTimeoutSeconds The default query timeout in seconds. * @deprecated Use {@link #setDefaultQueryTimeout(Duration)}. @@ -2035,7 +2035,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * Sets the value of the flag that controls whether or not connections being returned to the pool will be checked * and configured with {@link Connection#setAutoCommit(boolean) Connection.setAutoCommit(true)} if the auto commit - * setting is {@code false} when the connection is returned. It is <code>true</code> by default. + * setting is {@code false} when the connection is returned. It is {@code true} by default. * * @param autoCommitOnReturn Whether or not connections being returned to the pool will be checked and configured * with auto-commit. @@ -2216,7 +2216,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** - * Sets the value of the <code>maxOpenPreparedStatements</code> property. + * Sets the value of the {@code maxOpenPreparedStatements} property. * <p> * Note: this method currently has no effect once the pool has been initialized. The pool is initialized the first * time one of the following methods is invoked: <code>getConnection, setLogwriter, @@ -2500,7 +2500,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** - * Sets the <code>testOnReturn</code> property. This property determines whether or not the pool will validate + * Sets the {@code testOnReturn} property. This property determines whether or not the pool will validate * objects before they are returned to the pool. * * @param testOnReturn new value for testOnReturn property @@ -2513,7 +2513,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** - * Sets the <code>testWhileIdle</code> property. This property determines whether or not the idle object evictor + * Sets the {@code testWhileIdle} property. This property determines whether or not the idle object evictor * will validate connections. * * @param testWhileIdle new value for testWhileIdle property diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java b/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java index a8ab50f..5298827 100644 --- a/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java +++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java @@ -49,12 +49,12 @@ import org.apache.commons.pool2.impl.BaseObjectPoolConfig; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; /** - * JNDI object factory that creates an instance of <code>BasicDataSource</code> that has been configured based on the - * <code>RefAddr</code> values of the specified <code>Reference</code>, which must match the names and data types of the - * <code>BasicDataSource</code> bean properties with the following exceptions: + * JNDI object factory that creates an instance of {@code BasicDataSource} that has been configured based on the + * {@code RefAddr} values of the specified {@code Reference}, which must match the names and data types of the + * {@code BasicDataSource} bean properties with the following exceptions: * <ul> - * <li><code>connectionInitSqls</code> must be passed to this factory as a single String using semicolon to delimit the - * statements whereas <code>BasicDataSource</code> requires a collection of Strings.</li> + * <li>{@code connectionInitSqls} must be passed to this factory as a single String using semicolon to delimit the + * statements whereas {@code BasicDataSource} requires a collection of Strings.</li> * </ul> * * @since 2.0 @@ -350,17 +350,17 @@ public class BasicDataSourceFactory implements ObjectFactory { } /** - * Creates and return a new <code>BasicDataSource</code> instance. If no instance can be created, return - * <code>null</code> instead. + * Creates and return a new {@code BasicDataSource} instance. If no instance can be created, return + * {@code null} instead. * * @param obj * The possibly null object containing location or reference information that can be used in creating an * object * @param name - * The name of this object relative to <code>nameCtx</code> + * The name of this object relative to {@code nameCtx} * @param nameCtx - * The context relative to which the <code>name</code> parameter is specified, or <code>null</code> if - * <code>name</code> is relative to the default initial context + * The context relative to which the {@code name} parameter is specified, or {@code null} if + * {@code name} is relative to the default initial context * @param environment * The possibly null environment that is used in creating this object * @@ -371,7 +371,7 @@ public class BasicDataSourceFactory implements ObjectFactory { public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx, final Hashtable<?, ?> environment) throws Exception { - // We only know how to deal with <code>javax.naming.Reference</code>s + // We only know how to deal with {@code javax.naming.Reference}s // that specify a class name of "javax.sql.DataSource" if (obj == null || !(obj instanceof Reference)) { return null; diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java index 5b41b0a..aa729e2 100644 --- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java +++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java @@ -147,7 +147,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i * <ol> * <li>Call passivate()</li> * <li>Call close (or the equivalent appropriate action) on the wrapped connection</li> - * <li>Set _closed to <code>false</code></li> + * <li>Set _closed to {@code false}</li> * </ol> */ @Override @@ -362,7 +362,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i /** * Gets the default query timeout that will be used for {@link Statement}s created from this connection. - * <code>null</code> means that the driver default will be used. + * {@code null} means that the driver default will be used. * * @return query timeout limit in seconds; zero means there is no limit. * @deprecated Use {@link #getDefaultQueryTimeoutDuration()}. @@ -374,7 +374,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i /** * Gets the default query timeout that will be used for {@link Statement}s created from this connection. - * <code>null</code> means that the driver default will be used. + * {@code null} means that the driver default will be used. * * @return query timeout limit; zero means there is no limit. * @since 2.10.0 @@ -560,7 +560,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i * * @param c * connection to compare innermost delegate with - * @return true if innermost delegate equals <code>c</code> + * @return true if innermost delegate equals {@code c} */ @SuppressWarnings("resource") public boolean innermostDelegateEquals(final Connection c) { @@ -893,7 +893,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i /** * Sets the default query timeout that will be used for {@link Statement}s created from this connection. - * <code>null</code> means that the driver default will be used. + * {@code null} means that the driver default will be used. * * @param defaultQueryTimeoutDuration * the new query timeout limit Duration; zero means there is no limit. @@ -905,7 +905,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i /** * Sets the default query timeout that will be used for {@link Statement}s created from this connection. - * <code>null</code> means that the driver default will be used. + * {@code null} means that the driver default will be used. * * @param defaultQueryTimeoutSeconds * the new query timeout limit in seconds; zero means there is no limit. diff --git a/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java index 1b2226a..9e6b86b 100644 --- a/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java +++ b/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java @@ -49,7 +49,7 @@ public class DriverManagerConnectionFactory implements ConnectionFactory { * Constructor for DriverManagerConnectionFactory. * * @param connectionUri - * a database url of the form <code> jdbc:<em>subprotocol</em>:<em>subname</em></code> + * a database url of the form {@code jdbc:<em>subprotocol</em>:<em>subname</em>} * @since 2.2 */ public DriverManagerConnectionFactory(final String connectionUri) { @@ -63,7 +63,7 @@ public class DriverManagerConnectionFactory implements ConnectionFactory { * Constructor for DriverManagerConnectionFactory. * * @param connectionUri - * a database url of the form <code> jdbc:<em>subprotocol</em>:<em>subname</em></code> + * a database url of the form {@code jdbc:<em>subprotocol</em>:<em>subname</em>} * @param properties * a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and * "password" property should be included. @@ -79,7 +79,7 @@ public class DriverManagerConnectionFactory implements ConnectionFactory { * Constructor for DriverManagerConnectionFactory. * * @param connectionUri - * a database url of the form <code>jdbc:<em>subprotocol</em>:<em>subname</em></code> + * a database url of the form {@code jdbc:<em>subprotocol</em>:<em>subname</em>} * @param userName * the database user * @param userPassword @@ -97,7 +97,7 @@ public class DriverManagerConnectionFactory implements ConnectionFactory { * Constructor for DriverManagerConnectionFactory. * * @param connectionUri - * a database url of the form <code>jdbc:<em>subprotocol</em>:<em>subname</em></code> + * a database url of the form {@code jdbc:<em>subprotocol</em>:<em>subname</em>} * @param userName * the database user * @param userPassword diff --git a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java index 34f786c..65858fc 100644 --- a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java +++ b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java @@ -134,20 +134,20 @@ public class PStmtKey { private final String sql; /** - * Result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, - * or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * Result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, + * or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. */ private final Integer resultSetType; /** - * Result set concurrency. A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * Result set concurrency. A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. */ private final Integer resultSetConcurrency; /** - * Result set holdability. One of the following <code>ResultSet</code> constants: - * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * Result set holdability. One of the following {@code ResultSet} constants: + * {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. */ private final Integer resultSetHoldability; @@ -159,7 +159,7 @@ public class PStmtKey { /** * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. */ private final Integer autoGeneratedKeys; @@ -199,11 +199,11 @@ public class PStmtKey { * @param sql * The SQL statement. * @param resultSetType - * A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @deprecated Use {@link #PStmtKey(String, String, String, int, int)}. */ @Deprecated @@ -234,7 +234,7 @@ public class PStmtKey { * The catalog. * @param autoGeneratedKeys * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * @deprecated Use {@link #PStmtKey(String, String, String, int)}. */ @Deprecated @@ -250,11 +250,11 @@ public class PStmtKey { * @param catalog * The catalog. * @param resultSetType - * A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @deprecated Use @link {@link #PStmtKey(String, String, String, int, int)}. */ @Deprecated @@ -270,14 +270,14 @@ public class PStmtKey { * @param catalog * The catalog. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code> + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE} * @param resultSetHoldability - * One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. * @deprecated Use {@link #PStmtKey(String, String, String, int, int, int)}. */ @Deprecated @@ -294,14 +294,14 @@ public class PStmtKey { * @param catalog * The catalog. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE} * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @param resultSetHoldability - * One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. * @param statementType * The SQL statement type, prepared or callable. * @deprecated Use {@link #PStmtKey(String, String, String, int, int, int, PoolingConnection.StatementType)} @@ -335,11 +335,11 @@ public class PStmtKey { * @param catalog * The catalog. * @param resultSetType - * A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @param statementType * The SQL statement type, prepared or callable. * @deprecated Use {@link #PStmtKey(String, String, String, int, int, PoolingConnection.StatementType)}. @@ -435,7 +435,7 @@ public class PStmtKey { * The SQL statement type, prepared or callable. * @param autoGeneratedKeys * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * @deprecated Use {@link #PStmtKey(String, String, String, PoolingConnection.StatementType, Integer)} */ @Deprecated @@ -485,7 +485,7 @@ public class PStmtKey { * The schema * @param autoGeneratedKeys * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * @since 2.5.0 */ public PStmtKey(final String sql, final String catalog, final String schema, final int autoGeneratedKeys) { @@ -502,11 +502,11 @@ public class PStmtKey { * @param schema * The schema * @param resultSetType - * A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. */ public PStmtKey(final String sql, final String catalog, final String schema, final int resultSetType, final int resultSetConcurrency) { this(sql, catalog, schema, resultSetType, resultSetConcurrency, StatementType.PREPARED_STATEMENT); @@ -522,14 +522,14 @@ public class PStmtKey { * @param schema * The schema * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code> + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE} * @param resultSetHoldability - * One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. * @since 2.5.0 */ public PStmtKey(final String sql, final String catalog, final String schema, final int resultSetType, final int resultSetConcurrency, @@ -547,14 +547,14 @@ public class PStmtKey { * @param schema * The schema. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE} * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @param resultSetHoldability - * One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. * @param statementType * The SQL statement type, prepared or callable. * @since 2.5.0 @@ -589,11 +589,11 @@ public class PStmtKey { * @param schema * The schema. * @param resultSetType - * A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @param statementType * The SQL statement type, prepared or callable. * @since 2.5.0 @@ -691,7 +691,7 @@ public class PStmtKey { * The SQL statement type, prepared or callable. * @param autoGeneratedKeys * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * @since 2.5.0 */ public PStmtKey(final String sql, final String catalog, final String schema, final StatementType statementType, @@ -829,7 +829,7 @@ public class PStmtKey { /** * Gets a flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * * @return a flag indicating whether auto-generated keys should be returned. */ @@ -865,8 +865,8 @@ public class PStmtKey { } /** - * Gets the result set concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * Gets the result set concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * * @return The result set concurrency type. */ @@ -875,8 +875,8 @@ public class PStmtKey { } /** - * Gets the result set holdability, one of the following <code>ResultSet</code> constants: - * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * Gets the result set holdability, one of the following {@code ResultSet} constants: + * {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. * * @return The result set holdability. */ @@ -885,8 +885,8 @@ public class PStmtKey { } /** - * Gets the result set type, one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * Gets the result set type, one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * * @return the result set type. */ diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java index b46892c..3dd9650 100644 --- a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java +++ b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java @@ -120,7 +120,7 @@ public class PoolingConnection extends DelegatingConnection<Connection> /** * Notification from {@link PoolableConnection} that we returned to the pool. * - * @throws SQLException when <code>clearStatementPoolOnReturn</code> is true and the statement pool could not be + * @throws SQLException when {@code clearStatementPoolOnReturn} is true and the statement pool could not be * cleared * @since 2.8.0 */ @@ -153,7 +153,7 @@ public class PoolingConnection extends DelegatingConnection<Connection> * the SQL string used to define the statement * @param autoGeneratedKeys * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * * @return the PStmtKey created for the given arguments. */ @@ -328,7 +328,7 @@ public class PoolingConnection extends DelegatingConnection<Connection> /** * {@link KeyedPooledObjectFactory} method for creating {@link PoolablePreparedStatement}s or - * {@link PoolableCallableStatement}s. The <code>stmtType</code> field in the key determines whether a + * {@link PoolableCallableStatement}s. The {@code stmtType} field in the key determines whether a * PoolablePreparedStatement or PoolableCallableStatement is created. * * @param key @@ -494,7 +494,7 @@ public class PoolingConnection extends DelegatingConnection<Connection> * the SQL string used to define the PreparedStatement * @param autoGeneratedKeys * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * @return a {@link PoolablePreparedStatement} * @throws SQLException * Wraps an underlying exception. diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java index 5b7e24d..234490c 100644 --- a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java +++ b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java @@ -101,7 +101,7 @@ public class PoolingDriver implements Driver { private final boolean accessToUnderlyingConnectionAllowed; /** - * Constructs a new driver with <code>accessToUnderlyingConnectionAllowed</code> enabled. + * Constructs a new driver with {@code accessToUnderlyingConnectionAllowed} enabled. */ public PoolingDriver() { this(true); @@ -216,7 +216,7 @@ public class PoolingDriver implements Driver { * @param conn * connection to invalidate * @throws SQLException - * if the connection is not a <code>PoolGuardConnectionWrapper</code> or an error occurs invalidating + * if the connection is not a {@code PoolGuardConnectionWrapper} or an error occurs invalidating * the connection */ public void invalidateConnection(final Connection conn) throws SQLException { diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java index a5178e5..ee5be1b 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java @@ -26,9 +26,9 @@ import org.apache.commons.dbcp2.DelegatingConnection; import org.apache.commons.dbcp2.DelegatingPreparedStatement; /** - * This class is the <code>Connection</code> that will be returned from - * <code>PooledConnectionImpl.getConnection()</code>. Most methods are wrappers around the JDBC 1.x - * <code>Connection</code>. A few exceptions include preparedStatement and close. In accordance with the JDBC + * This class is the {@code Connection} that will be returned from + * {@code PooledConnectionImpl.getConnection()}. Most methods are wrappers around the JDBC 1.x + * {@code Connection}. A few exceptions include preparedStatement and close. In accordance with the JDBC * specification this Connection cannot be used after closed() is called. Any further usage will result in an * SQLException. * <p> @@ -45,7 +45,7 @@ class ConnectionImpl extends DelegatingConnection<Connection> { private final PooledConnectionImpl pooledConnection; /** - * Creates a <code>ConnectionImpl</code>. + * Creates a {@code ConnectionImpl}. * * @param pooledConnection * The PooledConnection that is calling the ctor. @@ -122,13 +122,13 @@ class ConnectionImpl extends DelegatingConnection<Connection> { } /** - * If pooling of <code>CallableStatement</code>s is turned on in the {@link DriverAdapterCPDS}, a pooled object may + * If pooling of {@code CallableStatement}s is turned on in the {@link DriverAdapterCPDS}, a pooled object may * be returned, otherwise delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. * * @param sql * an SQL statement that may contain one or more '?' parameter placeholders. Typically this statement is * specified using JDBC call escape syntax. - * @return a default <code>CallableStatement</code> object containing the pre-compiled SQL statement. + * @return a default {@code CallableStatement} object containing the pre-compiled SQL statement. * @throws SQLException * Thrown if a database access error occurs or this method is called on a closed connection. * @since 2.4.0 @@ -145,23 +145,23 @@ class ConnectionImpl extends DelegatingConnection<Connection> { } /** - * If pooling of <code>CallableStatement</code>s is turned on in the {@link DriverAdapterCPDS}, a pooled object may + * If pooling of {@code CallableStatement}s is turned on in the {@link DriverAdapterCPDS}, a pooled object may * be returned, otherwise delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. * * @param sql - * a <code>String</code> object that is the SQL statement to be sent to the database; may contain on or + * a {@code String} object that is the SQL statement to be sent to the database; may contain on or * more '?' parameters. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * a concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. - * @return a <code>CallableStatement</code> object containing the pre-compiled SQL statement that will produce - * <code>ResultSet</code> objects with the given type and concurrency. + * a concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. + * @return a {@code CallableStatement} object containing the pre-compiled SQL statement that will produce + * {@code ResultSet} objects with the given type and concurrency. * @throws SQLException * Thrown if a database access error occurs, this method is called on a closed connection or the given - * parameters are not <code>ResultSet</code> constants indicating type and concurrency. + * parameters are not {@code ResultSet} constants indicating type and concurrency. * @since 2.4.0 */ @Override @@ -178,26 +178,26 @@ class ConnectionImpl extends DelegatingConnection<Connection> { } /** - * If pooling of <code>CallableStatement</code>s is turned on in the {@link DriverAdapterCPDS}, a pooled object may + * If pooling of {@code CallableStatement}s is turned on in the {@link DriverAdapterCPDS}, a pooled object may * be returned, otherwise delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. * * @param sql - * a <code>String</code> object that is the SQL statement to be sent to the database; may contain on or + * a {@code String} object that is the SQL statement to be sent to the database; may contain on or * more '?' parameters. * @param resultSetType - * one of the following <code>ResultSet</code> constants: <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * one of the following {@code ResultSet} constants: {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * one of the following <code>ResultSet</code> constants: <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * one of the following {@code ResultSet} constants: {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @param resultSetHoldability - * one of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. - * @return a new <code>CallableStatement</code> object, containing the pre-compiled SQL statement, that will - * generate <code>ResultSet</code> objects with the given type, concurrency, and holdability. + * one of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. + * @return a new {@code CallableStatement} object, containing the pre-compiled SQL statement, that will + * generate {@code ResultSet} objects with the given type, concurrency, and holdability. * @throws SQLException * Thrown if a database access error occurs, this method is called on a closed connection or the given - * parameters are not <code>ResultSet</code> constants indicating type, concurrency, and holdability. + * parameters are not {@code ResultSet} constants indicating type, concurrency, and holdability. * @since 2.4.0 */ @Override @@ -214,7 +214,7 @@ class ConnectionImpl extends DelegatingConnection<Connection> { } /** - * If pooling of <code>PreparedStatement</code>s is turned on in the {@link DriverAdapterCPDS}, a pooled object may + * If pooling of {@code PreparedStatement}s is turned on in the {@link DriverAdapterCPDS}, a pooled object may * be returned, otherwise delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. * * @param sql @@ -246,7 +246,7 @@ class ConnectionImpl extends DelegatingConnection<Connection> { } /** - * If pooling of <code>PreparedStatement</code>s is turned on in the {@link DriverAdapterCPDS}, a pooled object may + * If pooling of {@code PreparedStatement}s is turned on in the {@link DriverAdapterCPDS}, a pooled object may * be returned, otherwise delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. * * @throws SQLException diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java index a08041a..b5a141f 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java @@ -50,29 +50,29 @@ import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig; /** * <p> * An adapter for JDBC drivers that do not include an implementation of {@link javax.sql.ConnectionPoolDataSource}, but - * still include a {@link java.sql.DriverManager} implementation. <code>ConnectionPoolDataSource</code>s are not used - * within general applications. They are used by <code>DataSource</code> implementations that pool - * <code>Connection</code>s, such as {@link org.apache.commons.dbcp2.datasources.SharedPoolDataSource}. A J2EE container - * will normally provide some method of initializing the <code>ConnectionPoolDataSource</code> whose attributes are + * still include a {@link java.sql.DriverManager} implementation. {@code ConnectionPoolDataSource}s are not used + * within general applications. They are used by {@code DataSource} implementations that pool + * {@code Connection}s, such as {@link org.apache.commons.dbcp2.datasources.SharedPoolDataSource}. A J2EE container + * will normally provide some method of initializing the {@code ConnectionPoolDataSource} whose attributes are * presented as bean getters/setters and then deploying it via JNDI. It is then available as a source of physical - * connections to the database, when the pooling <code>DataSource</code> needs to create a new physical connection. + * connections to the database, when the pooling {@code DataSource} needs to create a new physical connection. * </p> * <p> * Although normally used within a JNDI environment, the DriverAdapterCPDS can be instantiated and initialized as any - * bean and then attached directly to a pooling <code>DataSource</code>. <code>Jdbc2PoolDataSource</code> can use the - * <code>ConnectionPoolDataSource</code> with or without the use of JNDI. + * bean and then attached directly to a pooling {@code DataSource}. {@code Jdbc2PoolDataSource} can use the + * {@code ConnectionPoolDataSource} with or without the use of JNDI. * </p> * <p> - * The DriverAdapterCPDS also provides <code>PreparedStatement</code> pooling which is not generally available in jdbc2 - * <code>ConnectionPoolDataSource</code> implementation, but is addressed within the jdbc3 specification. The - * <code>PreparedStatement</code> pool in DriverAdapterCPDS has been in the dbcp package for some time, but it has not + * The DriverAdapterCPDS also provides {@code PreparedStatement} pooling which is not generally available in jdbc2 + * {@code ConnectionPoolDataSource} implementation, but is addressed within the jdbc3 specification. The + * {@code PreparedStatement} pool in DriverAdapterCPDS has been in the dbcp package for some time, but it has not * undergone extensive testing in the configuration used here. It should be considered experimental and can be toggled * with the poolPreparedStatements attribute. * </p> * <p> * The <a href="package-summary.html">package documentation</a> contains an example using catalina and JNDI. The * <a href="../datasources/package-summary.html">datasources package documentation</a> shows how to use - * <code>DriverAdapterCPDS</code> as a source for <code>Jdbc2PoolDataSource</code> without the use of JNDI. + * {@code DriverAdapterCPDS} as a source for {@code Jdbc2PoolDataSource} without the use of JNDI. * </p> * * @since 2.0 @@ -517,7 +517,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl } /** - * Whether to toggle the pooling of <code>PreparedStatement</code>s + * Whether to toggle the pooling of {@code PreparedStatement}s * * @return value of poolPreparedStatements. */ @@ -538,11 +538,11 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl /** * Sets the connection properties passed to the JDBC driver. * <p> - * If <code>props</code> contains "user" and/or "password" properties, the corresponding instance properties are + * If {@code props} contains "user" and/or "password" properties, the corresponding instance properties are * set. If these properties are not present, they are filled in using {@link #getUser()}, {@link #getPassword()} * when {@link #getPooledConnection()} is called, or using the actual parameters to the method call when * {@link #getPooledConnection(String, String)} is called. Calls to {@link #setUser(String)} or - * {@link #setPassword(String)} overwrite the values of these properties if <code>connectionProperties</code> is not + * {@link #setPassword(String)} overwrite the values of these properties if {@code connectionProperties} is not * null. * </p> * @@ -675,7 +675,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl * Sets the number of statements to examine during each run of the idle object evictor thread (if any). * <p> * When a negative value is supplied, - * <code>ceil({@link BasicDataSource#getNumIdle})/abs({@link #getNumTestsPerEvictionRun})</code> tests will be run. + * {@code ceil({@link BasicDataSource#getNumIdle})/abs({@link #getNumTestsPerEvictionRun})} tests will be run. * I.e., when the value is <i>-n</i>, roughly one <i>n</i>th of the idle objects will be tested per run. * </p> * @@ -714,7 +714,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl } /** - * Whether to toggle the pooling of <code>PreparedStatement</code>s + * Whether to toggle the pooling of {@code PreparedStatement}s * * @param poolPreparedStatements true to pool statements. * @throws IllegalStateException if {@link #getPooledConnection()} has been called diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java index 8cbf966..2fc938e 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java @@ -44,7 +44,7 @@ public class PStmtKeyCPDS extends PStmtKey { * The SQL statement. * @param autoGeneratedKeys * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. */ public PStmtKeyCPDS(final String sql, final int autoGeneratedKeys) { super(sql, null, autoGeneratedKeys); @@ -56,11 +56,11 @@ public class PStmtKeyCPDS extends PStmtKey { * @param sql * The SQL statement. * @param resultSetType - * A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. */ public PStmtKeyCPDS(final String sql, final int resultSetType, final int resultSetConcurrency) { super(sql, resultSetType, resultSetConcurrency); @@ -72,14 +72,14 @@ public class PStmtKeyCPDS extends PStmtKey { * @param sql * The SQL statement. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code> + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE} * @param resultSetHoldability - * One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. */ public PStmtKeyCPDS(final String sql, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability) { diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java index d2cde7e..7510090 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java @@ -145,8 +145,8 @@ class PooledConnectionImpl } /** - * Closes the physical connection and marks this <code>PooledConnection</code> so that it may not be used to - * generate any more logical <code>Connection</code>s. + * Closes the physical connection and marks this {@code PooledConnection} so that it may not be used to + * generate any more logical {@code Connection}s. * * @throws SQLException * Thrown when an error occurs or the connection is already closed. @@ -194,7 +194,7 @@ class PooledConnectionImpl * The SQL statement. * @param autoGeneratedKeys * A flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * @return a key to uniquely identify a prepared statement. */ protected PStmtKey createKey(final String sql, final int autoGeneratedKeys) { @@ -207,11 +207,11 @@ class PooledConnectionImpl * @param sql * The SQL statement. * @param resultSetType - * A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @return a key to uniquely identify a prepared statement. */ protected PStmtKey createKey(final String sql, final int resultSetType, final int resultSetConcurrency) { @@ -225,14 +225,14 @@ class PooledConnectionImpl * @param sql * The SQL statement. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code> + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE} * @param resultSetHoldability - * One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. * @return a key to uniquely identify a prepared statement. */ protected PStmtKey createKey(final String sql, final int resultSetType, final int resultSetConcurrency, @@ -247,14 +247,14 @@ class PooledConnectionImpl * @param sql * The SQL statement. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE} * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @param resultSetHoldability - * One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. + * One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. * @param statementType * The SQL statement type, prepared or callable. * @return a key to uniquely identify a prepared statement. @@ -272,11 +272,11 @@ class PooledConnectionImpl * @param sql * The SQL statement. * @param resultSetType - * A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @param statementType * The SQL statement type, prepared or callable. * @return a key to uniquely identify a prepared statement. @@ -479,7 +479,7 @@ class PooledConnectionImpl * @param sql * an SQL statement that may contain one or more '?' parameter placeholders. Typically this statement is * specified using JDBC call escape syntax. - * @return a default <code>CallableStatement</code> object containing the pre-compiled SQL statement. + * @return a default {@code CallableStatement} object containing the pre-compiled SQL statement. * @throws SQLException * Thrown if a database access error occurs or this method is called on a closed connection. * @since 2.4.0 @@ -501,19 +501,19 @@ class PooledConnectionImpl * Creates or obtains a {@link CallableStatement} from my pool. * * @param sql - * a <code>String</code> object that is the SQL statement to be sent to the database; may contain on or + * a {@code String} object that is the SQL statement to be sent to the database; may contain on or * more '?' parameters. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * a concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. - * @return a <code>CallableStatement</code> object containing the pre-compiled SQL statement that will produce - * <code>ResultSet</code> objects with the given type and concurrency. + * a concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. + * @return a {@code CallableStatement} object containing the pre-compiled SQL statement that will produce + * {@code ResultSet} objects with the given type and concurrency. * @throws SQLException * Thrown if a database access error occurs, this method is called on a closed connection or the given - * parameters are not <code>ResultSet</code> constants indicating type and concurrency. + * parameters are not {@code ResultSet} constants indicating type and concurrency. * @since 2.4.0 */ CallableStatement prepareCall(final String sql, final int resultSetType, final int resultSetConcurrency) @@ -535,22 +535,22 @@ class PooledConnectionImpl * Creates or obtains a {@link CallableStatement} from my pool. * * @param sql - * a <code>String</code> object that is the SQL statement to be sent to the database; may contain on or + * a {@code String} object that is the SQL statement to be sent to the database; may contain on or * more '?' parameters. * @param resultSetType - * one of the following <code>ResultSet</code> constants: <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * one of the following {@code ResultSet} constants: {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * one of the following <code>ResultSet</code> constants: <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * one of the following {@code ResultSet} constants: {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * @param resultSetHoldability - * one of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> - * or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>. - * @return a new <code>CallableStatement</code> object, containing the pre-compiled SQL statement, that will - * generate <code>ResultSet</code> objects with the given type, concurrency, and holdability. + * one of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} + * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. + * @return a new {@code CallableStatement} object, containing the pre-compiled SQL statement, that will + * generate {@code ResultSet} objects with the given type, concurrency, and holdability. * @throws SQLException * Thrown if a database access error occurs, this method is called on a closed connection or the given - * parameters are not <code>ResultSet</code> constants indicating type, concurrency, and holdability. + * parameters are not {@code ResultSet} constants indicating type, concurrency, and holdability. * @since 2.4.0 */ CallableStatement prepareCall(final String sql, final int resultSetType, final int resultSetConcurrency, @@ -596,7 +596,7 @@ class PooledConnectionImpl * an SQL statement that may contain one or more '?' IN parameter placeholders. * @param autoGeneratedKeys * a flag indicating whether auto-generated keys should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>. + * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. * @return a {@link PoolablePreparedStatement} * @throws SQLException Thrown if a database access error occurs, this method is called on a closed connection, or * the borrow failed. @@ -619,14 +619,14 @@ class PooledConnectionImpl * Creates or obtains a {@link PreparedStatement} from my pool. * * @param sql - * a <code>String</code> object that is the SQL statement to be sent to the database; may contain one or + * a {@code String} object that is the SQL statement to be sent to the database; may contain one or * more '?' IN parameters. * @param resultSetType - * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>. + * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, + * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. * @param resultSetConcurrency - * a concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code>. + * a concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or + * {@code ResultSet.CONCUR_UPDATABLE}. * * @return a {@link PoolablePreparedStatement}. * @throws SQLException Thrown if a database access error occurs, this method is called on a closed connection, or diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java index 3918a06..6bce559 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/package-info.java @@ -18,8 +18,8 @@ /** * <p> * This package contains one public class which is a - * <code>ConnectionPoolDataSource</code> (CPDS) implementation that can be used to - * adapt older <code>Driver</code> based JDBC implementations. Below is an + * {@code ConnectionPoolDataSource} (CPDS) implementation that can be used to + * adapt older {@code Driver} based JDBC implementations. Below is an * example of setting up the CPDS to be available via JNDI in the * catalina servlet container. * </p> diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java index 7e22622..64ad0a0 100644 --- a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java +++ b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java @@ -40,30 +40,30 @@ import org.apache.commons.pool2.impl.GenericObjectPool; /** * <p> - * The base class for <code>SharedPoolDataSource</code> and <code>PerUserPoolDataSource</code>. Many of the + * The base class for {@code SharedPoolDataSource} and {@code PerUserPoolDataSource}. Many of the * configuration properties are shared and defined here. This class is declared public in order to allow particular * usage with commons-beanutils; do not make direct use of it outside of <em>commons-dbcp2</em>. * </p> * * <p> - * A J2EE container will normally provide some method of initializing the <code>DataSource</code> whose attributes are + * A J2EE container will normally provide some method of initializing the {@code DataSource} whose attributes are * presented as bean getters/setters and then deploying it via JNDI. It is then available to an application as a source * of pooled logical connections to the database. The pool needs a source of physical connections. This source is in the - * form of a <code>ConnectionPoolDataSource</code> that can be specified via the {@link #setDataSourceName(String)} used + * form of a {@code ConnectionPoolDataSource} that can be specified via the {@link #setDataSourceName(String)} used * to lookup the source via JNDI. * </p> * * <p> * Although normally used within a JNDI environment, A DataSource can be instantiated and initialized as any bean. In - * this case the <code>ConnectionPoolDataSource</code> will likely be instantiated in a similar manner. This class + * this case the {@code ConnectionPoolDataSource} will likely be instantiated in a similar manner. This class * allows the physical source of connections to be attached directly to this pool using the * {@link #setConnectionPoolDataSource(ConnectionPoolDataSource)} method. * </p> * * <p> * The dbcp package contains an adapter, {@link org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS}, that can be - * used to allow the use of <code>DataSource</code>'s based on this class with JDBC driver implementations that do not - * supply a <code>ConnectionPoolDataSource</code>, but still provide a {@link java.sql.Driver} implementation. + * used to allow the use of {@code DataSource}'s based on this class with JDBC driver implementations that do not + * supply a {@code ConnectionPoolDataSource}, but still provide a {@link java.sql.Driver} implementation. * </p> * * <p> @@ -185,13 +185,13 @@ public abstract class InstanceKeyDataSource implements DataSource, Referenceable /** * Attempts to retrieve a database connection using {@link #getPooledConnectionAndInfo(String, String)} with the * provided user name and password. The password on the {@code PooledConnectionAndInfo} instance returned by - * <code>getPooledConnectionAndInfo</code> is compared to the <code>password</code> parameter. If the comparison + * {@code getPooledConnectionAndInfo} is compared to the {@code password} parameter. If the comparison * fails, a database connection using the supplied user name and password is attempted. If the connection attempt * fails, an SQLException is thrown, indicating that the given password did not match the password used to create * the pooled connection. If the connection attempt succeeds, this means that the database password has been - * changed. In this case, the <code>PooledConnectionAndInfo</code> instance retrieved with the old password is - * destroyed and the <code>getPooledConnectionAndInfo</code> is repeatedly invoked until a - * <code>PooledConnectionAndInfo</code> instance with the new password is returned. + * changed. In this case, the {@code PooledConnectionAndInfo} instance retrieved with the old password is + * destroyed and the {@code getPooledConnectionAndInfo} is repeatedly invoked until a + * {@code PooledConnectionAndInfo} instance with the new password is returned. */ @Override public Connection getConnection(final String userName, final String userPassword) throws SQLException { @@ -668,7 +668,7 @@ public abstract class InstanceKeyDataSource implements DataSource, Referenceable /** * Gets the value of defaultAutoCommit, which defines the state of connections handed out from this pool. The value - * can be changed on the Connection using Connection.setAutoCommit(boolean). The default is <code>null</code> which + * can be changed on the Connection using Connection.setAutoCommit(boolean). The default is {@code null} which * will use the default value for the drive. * * @return value of defaultAutoCommit. @@ -679,7 +679,7 @@ public abstract class InstanceKeyDataSource implements DataSource, Referenceable /** * Gets the value of defaultReadOnly, which defines the state of connections handed out from this pool. The value - * can be changed on the Connection using Connection.setReadOnly(boolean). The default is <code>null</code> which + * can be changed on the Connection using Connection.setReadOnly(boolean). The default is {@code null} which * will use the default value for the drive. * * @return value of defaultReadOnly. @@ -744,7 +744,7 @@ public abstract class InstanceKeyDataSource implements DataSource, Referenceable /** * Sets the value of defaultAutoCommit, which defines the state of connections handed out from this pool. The value - * can be changed on the Connection using Connection.setAutoCommit(boolean). The default is <code>null</code> which + * can be changed on the Connection using Connection.setAutoCommit(boolean). The default is {@code null} which * will use the default value for the drive. * * @param defaultAutoCommit @@ -904,7 +904,7 @@ public abstract class InstanceKeyDataSource implements DataSource, Referenceable /** * Sets the value of defaultReadOnly, which defines the state of connections handed out from this pool. The value - * can be changed on the Connection using Connection.setReadOnly(boolean). The default is <code>null</code> which + * can be changed on the Connection using Connection.setReadOnly(boolean). The default is {@code null} which * will use the default value for the drive. * * @param defaultReadOnly diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSourceFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSourceFactory.java index a937972..5f2cbbc 100644 --- a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSourceFactory.java +++ b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSourceFactory.java @@ -38,7 +38,7 @@ import org.apache.commons.dbcp2.ListException; import org.apache.commons.dbcp2.Utils; /** - * A JNDI ObjectFactory which creates <code>SharedPoolDataSource</code>s or <code>PerUserPoolDataSource</code>s + * A JNDI ObjectFactory which creates {@code SharedPoolDataSource}s or {@code PerUserPoolDataSource}s * * @since 2.0 */ diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java b/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java index ba3f3de..fe5891f 100644 --- a/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java +++ b/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java @@ -39,7 +39,7 @@ import org.apache.commons.pool2.impl.GenericObjectPool; /** * <p> - * A pooling <code>DataSource</code> appropriate for deployment within J2EE environment. There are many configuration + * A pooling {@code DataSource} appropriate for deployment within J2EE environment. There are many configuration * options, most of which are defined in the parent class. This datasource uses individual pools per user, and some * properties can be set specifically for a given user, if the deployment environment can support initialization of * mapped properties. So for example, a pool of admin or write-access Connections can be guaranteed a certain number of @@ -48,8 +48,8 @@ import org.apache.commons.pool2.impl.GenericObjectPool; * * <p> * User passwords can be changed without re-initializing the datasource. When a - * <code>getConnection(userName, password)</code> request is processed with a password that is different from those used - * to create connections in the pool associated with <code>userName</code>, an attempt is made to create a new + * {@code getConnection(userName, password)} request is processed with a password that is different from those used + * to create connections in the pool associated with {@code userName}, an attempt is made to create a new * connection using the supplied password and if this succeeds, the existing pool is cleared and a new pool is created * for connections using the new password. * </p> @@ -672,7 +672,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource { } /** - * Returns a <code>PerUserPoolDataSource</code> {@link Reference}. + * Returns a {@code PerUserPoolDataSource} {@link Reference}. */ @Override public Reference getReference() throws NamingException { @@ -695,7 +695,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource { * Supports Serialization interface. * * @param in - * a <code>java.io.ObjectInputStream</code> value + * a {@code java.io.ObjectInputStream} value * @throws IOException * if an error occurs * @throws ClassNotFoundException diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSourceFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSourceFactory.java index 6a6274b..7639e4c 100644 --- a/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSourceFactory.java +++ b/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSourceFactory.java @@ -24,7 +24,7 @@ import javax.naming.RefAddr; import javax.naming.Reference; /** - * A JNDI ObjectFactory which creates <code>SharedPoolDataSource</code>s + * A JNDI ObjectFactory which creates {@code SharedPoolDataSource}s * * @since 2.0 */ diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java b/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java index 4293535..cbee6cd 100644 --- a/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java +++ b/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java @@ -32,15 +32,15 @@ import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig; /** * <p> - * A pooling <code>DataSource</code> appropriate for deployment within J2EE environment. There are many configuration + * A pooling {@code DataSource} appropriate for deployment within J2EE environment. There are many configuration * options, most of which are defined in the parent class. All users (based on user name) share a single maximum number * of Connections in this data source. * </p> * * <p> * User passwords can be changed without re-initializing the data source. When a - * <code>getConnection(user name, password)</code> request is processed with a password that is different from those - * used to create connections in the pool associated with <code>user name</code>, an attempt is made to create a new + * {@code getConnection(user name, password)} request is processed with a password that is different from those + * used to create connections in the pool associated with {@code user name}, an attempt is made to create a new * connection using the supplied password and if this succeeds, idle connections created using the old password are * destroyed and new connections are created using the new password. * </p> @@ -145,7 +145,7 @@ public class SharedPoolDataSource extends InstanceKeyDataSource { * Supports Serialization interface. * * @param in - * a <code>java.io.ObjectInputStream</code> value + * a {@code java.io.ObjectInputStream} value * @throws IOException * if an error occurs * @throws ClassNotFoundException diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java index b11e253..937ccd1 100644 --- a/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java +++ b/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java @@ -20,7 +20,7 @@ import javax.naming.RefAddr; import javax.naming.Reference; /** - * A JNDI ObjectFactory which creates <code>SharedPoolDataSource</code>s + * A JNDI ObjectFactory which creates {@code SharedPoolDataSource}s * * @since 2.0 */ diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/package-info.java b/src/main/java/org/apache/commons/dbcp2/datasources/package-info.java index 87da482..b228ed9 100644 --- a/src/main/java/org/apache/commons/dbcp2/datasources/package-info.java +++ b/src/main/java/org/apache/commons/dbcp2/datasources/package-info.java @@ -17,8 +17,8 @@ /** * <p> - * This package contains two DataSources: <code>PerUserPoolDataSource</code> and - * <code>SharedPoolDataSource</code> which provide a database connection pool. + * This package contains two DataSources: {@code PerUserPoolDataSource} and + * {@code SharedPoolDataSource} which provide a database connection pool. * Below are a couple of usage examples. One shows deployment into a JNDI system. * The other is a simple example initializing the pool using standard java code. * </p> @@ -81,12 +81,12 @@ * Apache Tomcat deploys all objects configured similarly to above within the * <strong>java:comp/env</strong> namespace. So the JNDI path given for * the dataSourceName parameter is valid for a - * <code>ConnectionPoolDataSource</code> that is deployed as given in the + * {@code ConnectionPoolDataSource} that is deployed as given in the * <a href="../cpdsadapter/package-summary.html">cpdsadapter example</a> * </p> * * <p> - * The <code>DataSource</code> is now available to the application as shown + * The {@code DataSource} is now available to the application as shown * below: * </p> * @@ -112,11 +112,11 @@ * </code> * * <p> - * The reference to the <code>DataSource</code> could be maintained, for - * multiple getConnection() requests. Or the <code>DataSource</code> can be + * The reference to the {@code DataSource} could be maintained, for + * multiple getConnection() requests. Or the {@code DataSource} can be * looked up in different parts of the application code. - * <code>PerUserPoolDataSourceFactory</code> and - * <code>SharedPoolDataSourceFactory</code> will maintain the state of the pool + * {@code PerUserPoolDataSourceFactory} and + * {@code SharedPoolDataSourceFactory} will maintain the state of the pool * between different lookups. This behavior may be different in other * implementations. * </p> @@ -125,7 +125,7 @@ * * <p> * Connection pooling is useful in applications regardless of whether they run - * in a J2EE environment and a <code>DataSource</code> can be used within a + * in a J2EE environment and a {@code DataSource} can be used within a * simpler environment. The example below shows SharedPoolDataSource using * DriverAdapterCPDS as the back end source, though any CPDS is applicable. * </p> diff --git a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java index 9f979cd..e8791c0 100644 --- a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java +++ b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java @@ -66,7 +66,7 @@ public class PoolableManagedConnectionFactory extends PoolableConnectionFactory /** * Uses the configured XAConnectionFactory to create a {@link PoolableManagedConnection}. Throws - * <code>IllegalStateException</code> if the connection factory returns null. Also initializes the connection using + * {@code IllegalStateException} if the connection factory returns null. Also initializes the connection using * configured initialization SQL (if provided) and sets up a prepared statement pool associated with the * PoolableManagedConnection if statement pooling is enabled. */