Author: remm Date: Fri Jan 15 16:00:25 2016 New Revision: 1724845 URL: http://svn.apache.org/viewvc?rev=1724845&view=rev Log: Javadoc fixes.
Modified: tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java tomcat/trunk/java/org/apache/naming/NamingContext.java tomcat/trunk/java/org/apache/naming/SelectorContext.java tomcat/trunk/java/org/apache/naming/ServiceRef.java tomcat/trunk/java/org/apache/naming/factory/FactoryBase.java tomcat/trunk/java/org/apache/naming/factory/SendMailFactory.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingConnection.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingDatabaseMetaData.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingResultSet.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingStatement.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolableConnectionFactory.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDataSource.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDriver.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/Utils.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.java tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/SharedPoolDataSource.java Modified: tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java (original) +++ tomcat/trunk/java/org/apache/juli/ClassLoaderLogManager.java Fri Jan 15 16:00:25 2016 @@ -386,6 +386,7 @@ public class ClassLoaderLogManager exten * * @param classLoader The classloader for which we will retrieve or build the * configuration + * @return the log configuration */ protected synchronized ClassLoaderLogInfo getClassLoaderInfo(ClassLoader classLoader) { @@ -415,8 +416,8 @@ public class ClassLoaderLogManager exten /** * Read configuration for the specified classloader. * - * @param classLoader - * @throws IOException Error + * @param classLoader The classloader + * @throws IOException Error reading configuration */ protected synchronized void readConfiguration(ClassLoader classLoader) throws IOException { @@ -584,8 +585,8 @@ public class ClassLoaderLogManager exten /** * Set parent child relationship between the two specified loggers. * - * @param logger - * @param parent + * @param logger The logger + * @param parent The parent logger */ protected static void doSetParentLogger(final Logger logger, final Logger parent) { Modified: tomcat/trunk/java/org/apache/naming/NamingContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/NamingContext.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/NamingContext.java (original) +++ tomcat/trunk/java/org/apache/naming/NamingContext.java Fri Jan 15 16:00:25 2016 @@ -941,7 +941,7 @@ public class NamingContext implements Co /** - * Returns true if writing is allowed on this context. + * @return <code>true</code> if writing is allowed on this context. */ protected boolean isWritable() { return ContextAccessController.isWritable(name); @@ -950,6 +950,9 @@ public class NamingContext implements Co /** * Throws a naming exception is Context is not writable. + * @return <code>true</code> if the Context is writable + * @throws NamingException if the Context is not writable and + * <code>exceptionOnFailedWrite</code> is <code>true</code> */ protected boolean checkWritable() throws NamingException { if (isWritable()) { Modified: tomcat/trunk/java/org/apache/naming/SelectorContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/SelectorContext.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/SelectorContext.java (original) +++ tomcat/trunk/java/org/apache/naming/SelectorContext.java Fri Jan 15 16:00:25 2016 @@ -67,6 +67,7 @@ public class SelectorContext implements /** * Builds a Catalina selector context using the given environment. + * @param env The environment */ public SelectorContext(Hashtable<String,Object> env) { this.env = env; @@ -76,6 +77,9 @@ public class SelectorContext implements /** * Builds a Catalina selector context using the given environment. + * @param env The environment + * @param initialContext <code>true</code> if this is the main + * initial context */ public SelectorContext(Hashtable<String,Object> env, boolean initialContext) { @@ -703,6 +707,9 @@ public class SelectorContext implements /** * Get the bound context. + * @return the Context bound with either the current thread or + * the current classloader + * @throws NamingException Bindings exception */ protected Context getBoundContext() throws NamingException { @@ -735,7 +742,7 @@ public class SelectorContext implements /** * Strips the URL header. - * + * @param name The name * @return the parsed name * @throws NamingException if there is no "java:" header or if no * naming context has been bound to this thread @@ -759,7 +766,7 @@ public class SelectorContext implements /** * Strips the URL header. - * + * @param name The name * @return the parsed name * @throws NamingException if there is no "java:" header or if no * naming context has been bound to this thread Modified: tomcat/trunk/java/org/apache/naming/ServiceRef.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/ServiceRef.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/ServiceRef.java (original) +++ tomcat/trunk/java/org/apache/naming/ServiceRef.java Fri Jan 15 16:00:25 2016 @@ -134,6 +134,7 @@ public class ServiceRef extends Referenc /** * Add and Get Handlers classes. + * @return the handler */ public HandlerRef getHandler() { return handlers.remove(0); @@ -153,6 +154,7 @@ public class ServiceRef extends Referenc /** * Retrieves the class name of the factory of the object to which this * reference refers. + * @return the factory */ @Override public String getFactoryClassName() { Modified: tomcat/trunk/java/org/apache/naming/factory/FactoryBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/factory/FactoryBase.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/factory/FactoryBase.java (original) +++ tomcat/trunk/java/org/apache/naming/factory/FactoryBase.java Fri Jan 15 16:00:25 2016 @@ -133,6 +133,7 @@ public abstract class FactoryBase implem * * @return The linked object or <code>null</code> if linked objects are * not supported by or not configured for this reference object + * @throws NamingException Error accessing linked object */ protected abstract Object getLinked(Reference ref) throws NamingException; } Modified: tomcat/trunk/java/org/apache/naming/factory/SendMailFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/factory/SendMailFactory.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/factory/SendMailFactory.java (original) +++ tomcat/trunk/java/org/apache/naming/factory/SendMailFactory.java Fri Jan 15 16:00:25 2016 @@ -41,7 +41,6 @@ import javax.naming.spi.ObjectFactory; * of your server.xml configuration file. * <p> * Example: - * <p> * <pre> * <Resource name="mail/send" auth="CONTAINER" * type="javax.mail.internet.MimePartDataSource"/> Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java Fri Jan 15 16:00:25 2016 @@ -204,6 +204,7 @@ public class BasicDataSource implements * Obtain 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. + * @return the timoeut */ public Integer getDefaultQueryTimeout() { return defaultQueryTimeout; @@ -214,6 +215,7 @@ public class BasicDataSource implements * Set 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. + * @param defaultQueryTimeout The new default timeout */ public void setDefaultQueryTimeout(Integer defaultQueryTimeout) { this.defaultQueryTimeout = defaultQueryTimeout; @@ -306,7 +308,7 @@ public class BasicDataSource implements * following methods is invoked: <code>getConnection, setLogwriter, * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> * - * @param driver + * @param driver The driver to use */ public synchronized void setDriver(Driver driver) { this.driver = driver; @@ -366,6 +368,7 @@ public class BasicDataSource implements * {@link #setDriverClassLoader(ClassLoader)}. It does not return the class * loader of any driver that may have been set via * {@link #setDriver(Driver)}. + * @return the classloader */ public synchronized ClassLoader getDriverClassLoader() { return this.driverClassLoader; @@ -398,7 +401,7 @@ public class BasicDataSource implements /** * Returns the LIFO property. * - * @return true if connection pool behaves as a LIFO queue. + * @return <code>true</code> if connection pool behaves as a LIFO queue. */ @Override public synchronized boolean getLifo() { @@ -410,7 +413,6 @@ public class BasicDataSource implements * false means FIFO. * * @param lifo the new value for the LIFO property - * */ public synchronized void setLifo(boolean lifo) { this.lifo = lifo; @@ -604,7 +606,7 @@ public class BasicDataSource implements /** * Returns true if we are pooling statements. * - * @return true if prepared and callable statements are pooled + * @return <code>true</code> if prepared and callable statements are pooled */ @Override public synchronized boolean isPoolPreparedStatements() { @@ -674,8 +676,8 @@ public class BasicDataSource implements /** * Returns the {@link #testOnCreate} property. * - * @return true if objects are validated immediately after they are created - * by the pool + * @return <code>true</code> if objects are validated immediately + * after they are created by the pool * * @see #testOnCreate */ @@ -708,8 +710,8 @@ public class BasicDataSource implements /** * Returns the {@link #testOnBorrow} property. * - * @return true if objects are validated before being borrowed from the - * pool + * @return <code>true</code> if objects are validated before being + * borrowed from the pool * * @see #testOnBorrow */ @@ -741,8 +743,8 @@ public class BasicDataSource implements /** * Returns the value of the {@link #testOnReturn} property. * - * @return true if objects are validated before being returned to the - * pool + * @return <code>true</code> if objects are validated before being + * returned to the pool * @see #testOnReturn */ public synchronized boolean getTestOnReturn() { @@ -917,6 +919,7 @@ public class BasicDataSource implements /** * Gets the EvictionPolicy implementation in use with this connection pool. + * @return the eviction policy */ public synchronized String getEvictionPolicyClassName() { return evictionPolicyClassName; @@ -946,8 +949,8 @@ public class BasicDataSource implements /** * Returns the value of the {@link #testWhileIdle} property. * - * @return true if objects examined by the idle object evictor are - * validated + * @return <code>true</code> if objects examined by + * the idle object evictor are validated * @see #testWhileIdle */ @Override @@ -1295,6 +1298,7 @@ public class BasicDataSource implements * initialized. The pool is initialized the first time one of the * following methods is invoked: <code>getConnection, setLogwriter, * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> + * @param maxConnLifetimeMillis The maximum connection lifetime */ public void setMaxConnLifetimeMillis(long maxConnLifetimeMillis) { this.maxConnLifetimeMillis = maxConnLifetimeMillis; @@ -1305,6 +1309,7 @@ public class BasicDataSource implements * this property determines whether or not log messages are generated when the * pool closes connections due to maximum lifetime exceeded. Set this property * to false to suppress log messages when connections expire. + * @param logExpiredConnections <code>true</code> to log expired connections */ public void setLogExpiredConnections(boolean logExpiredConnections) { this.logExpiredConnections = logExpiredConnections; @@ -1313,7 +1318,7 @@ public class BasicDataSource implements private String jmxName = null; /** - * Returns the JMX name that has been requested for this DataSource. If the + * @return the JMX name that has been requested for this DataSource. If the * requested name is not valid, an alternative may be chosen. */ public String getJmxName() { @@ -1326,6 +1331,7 @@ public class BasicDataSource implements * DataSource will attempt to register itself using this name. If another * component registers this DataSource with JMX and this name is valid this * name will be used in preference to any specified by the other component. + * @param jmxName The JMX name */ public void setJmxName(String jmxName) { this.jmxName = jmxName; @@ -1340,6 +1346,7 @@ public class BasicDataSource implements * {@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. + * @return <code>true</code> to commit automatically */ public boolean getEnableAutoCommitOnReturn() { return enableAutoCommitOnReturn; @@ -1351,6 +1358,7 @@ public class BasicDataSource implements * {@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. + * @param enableAutoCommitOnReturn The new value */ public void setEnableAutoCommitOnReturn(boolean enableAutoCommitOnReturn) { this.enableAutoCommitOnReturn = enableAutoCommitOnReturn; @@ -1362,6 +1370,7 @@ public class BasicDataSource implements * Gets the current value of the flag that controls if a connection will be * rolled back when it is returned to the pool if auto commit is not enabled * and the connection is not read only. + * @return <code>true</code> to rollback non committed connections */ public boolean getRollbackOnReturn() { return rollbackOnReturn; @@ -1371,6 +1380,7 @@ public class BasicDataSource implements * Sets the flag that controls if a connection will be rolled back when it * is returned to the pool if auto commit is not enabled and the connection * is not read only. + * @param rollbackOnReturn The new value */ public void setRollbackOnReturn(boolean rollbackOnReturn) { this.rollbackOnReturn = rollbackOnReturn; @@ -1395,6 +1405,7 @@ public class BasicDataSource implements /** * Provides the same data as {@link #getDisconnectionSqlCodes} but in an * array so it is accessible via JMX. + * @return fatal disconnection state codes * @since 2.1 */ @Override @@ -1540,7 +1551,7 @@ public class BasicDataSource implements * is being made * @param pass The database user's password * - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException This is not supported * @throws SQLException if a database access error occurs * @return nothing - always throws UnsupportedOperationException */ @@ -1776,6 +1787,7 @@ public class BasicDataSource implements /** * Gets the log writer to be used by this configuration to log * information on abandoned objects. + * @return the log writer */ public PrintWriter getAbandonedLogWriter() { if (abandonedConfig != null) { @@ -1962,7 +1974,7 @@ public class BasicDataSource implements /** * Manually invalidates a connection, effectively requesting the pool to try * to close it, remove it from the pool and reclaim pool capacity. - * + * @param connection The connection to close * @throws IllegalStateException * if invalidating the connection failed. * @since 2.1 @@ -2006,7 +2018,7 @@ public class BasicDataSource implements /** * <p>Create (if necessary) and return the internal data source we are * using to manage our connections.</p> - * + * @return the data source * @throws SQLException if the object pool cannot be created. */ protected DataSource createDataSource() @@ -2109,6 +2121,8 @@ public class BasicDataSource implements * {@link DriverManager} using the specified {@link #url}. * </ol> * This method exists so subclasses can replace the implementation class. + * @return the connection factory + * @throws SQLException Error creating connection factory */ protected ConnectionFactory createConnectionFactory() throws SQLException { // Load the JDBC driver class @@ -2190,6 +2204,7 @@ public class BasicDataSource implements * {@link #startPoolMaintenance()}, since setting timeBetweenEvictionRunsMillis * to a positive value causes {@link GenericObjectPool}'s eviction timer * to be started. + * @param factory The connection factory */ protected void createConnectionPool(PoolableConnectionFactory factory) { // Create an object pool to contain our active connections @@ -2249,7 +2264,7 @@ public class BasicDataSource implements /** * Creates the actual data source instance. This method only exists so * that subclasses can replace the implementation class. - * + * @return the data source * @throws SQLException if unable to create a datasource instance */ protected DataSource createDataSourceInstance() throws SQLException { @@ -2263,6 +2278,7 @@ public class BasicDataSource implements * so subclasses can replace the default implementation. * * @param driverConnectionFactory JDBC connection factory + * @return the connection factory * @throws SQLException if an error occurs creating the PoolableConnectionFactory */ protected PoolableConnectionFactory createPoolableConnectionFactory( Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java Fri Jan 15 16:00:25 2016 @@ -331,6 +331,7 @@ public class BasicDataSourceFactory impl * given properties. * * @param properties the datasource configuration properties + * @return the data source instance * @throws Exception if an error occurs creating the data source */ public static BasicDataSource createDataSource(Properties properties) throws Exception { Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingConnection.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingConnection.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingConnection.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingConnection.java Fri Jan 15 16:00:25 2016 @@ -174,6 +174,7 @@ public class DelegatingConnection<C exte * This method is useful when you may have nested * {@code DelegatingConnection}s, and you want to make * sure to obtain a "genuine" {@link Connection}. + * @return the connection */ public Connection getInnermostDelegate() { return getInnermostDelegateInternal(); @@ -184,6 +185,7 @@ public class DelegatingConnection<C exte * Although this method is public, it is part of the internal API and should * not be used by clients. The signature of this method may change at any * time including in ways that break backwards compatibility. + * @return the connection */ public final Connection getInnermostDelegateInternal() { Connection c = _conn; @@ -196,7 +198,10 @@ public class DelegatingConnection<C exte return c; } - /** Sets my delegate. */ + /** + * Sets my delegate. + * @param c The connection + */ public void setDelegate(C c) { _conn = c; } @@ -210,6 +215,7 @@ public class DelegatingConnection<C exte * connection</li> * <li>Set _closed to <code>false</code></li> * </ol> + * @throws SQLException Error closing connection */ @Override public void close() throws SQLException { @@ -499,6 +505,7 @@ public class DelegatingConnection<C exte * Obtain 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. + * @return the timeout */ public Integer getDefaultQueryTimeout() { return defaultQueryTimeout; @@ -509,6 +516,7 @@ public class DelegatingConnection<C exte * Set 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. + * @param defaultQueryTimeout The timeout value */ public void setDefaultQueryTimeout(Integer defaultQueryTimeout) { this.defaultQueryTimeout = defaultQueryTimeout; Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingDatabaseMetaData.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingDatabaseMetaData.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingDatabaseMetaData.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingDatabaseMetaData.java Fri Jan 15 16:00:25 2016 @@ -64,6 +64,7 @@ public class DelegatingDatabaseMetaData * This method is useful when you may have nested * {@code DelegatingResultSet}s, and you want to make * sure to obtain a "genuine" {@link ResultSet}. + * @return the database meta data */ public DatabaseMetaData getInnermostDelegate() { DatabaseMetaData m = _meta; Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingResultSet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingResultSet.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingResultSet.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingResultSet.java Fri Jan 15 16:00:25 2016 @@ -133,6 +133,7 @@ public final class DelegatingResultSet e * This method is useful when you may have nested * {@code DelegatingResultSet}s, and you want to make * sure to obtain a "genuine" {@link ResultSet}. + * @return the result set */ public ResultSet getInnermostDelegate() { ResultSet r = _res; Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingStatement.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingStatement.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingStatement.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/DelegatingStatement.java Fri Jan 15 16:00:25 2016 @@ -87,6 +87,7 @@ public class DelegatingStatement extends * {@code DelegatingStatement}s, and you want to make * sure to obtain a "genuine" {@link Statement}. * @see #getDelegate + * @return the statement */ public Statement getInnermostDelegate() { Statement s = _stmt; @@ -99,7 +100,10 @@ public class DelegatingStatement extends return s; } - /** Sets my delegate. */ + /** + * Sets my delegate. + * @param s The statement + */ public void setDelegate(Statement s) { _stmt = s; } Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolableConnectionFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolableConnectionFactory.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolableConnectionFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolableConnectionFactory.java Fri Jan 15 16:00:25 2016 @@ -54,6 +54,7 @@ public class PoolableConnectionFactory /** * Create a new {@code PoolableConnectionFactory}. * @param connFactory the {@link ConnectionFactory} from which to obtain + * @param dataSourceJmxName The JMX name * base {@link Connection}s */ public PoolableConnectionFactory(ConnectionFactory connFactory, @@ -166,6 +167,7 @@ public class PoolableConnectionFactory * connection will always fail activation, passivation and validation. A * value of zero or less indicates an infinite lifetime. The default value * is -1. + * @param maxConnLifetimeMillis The maximum connection lifetime */ public void setMaxConnLifetimeMillis(long maxConnLifetimeMillis) { this.maxConnLifetimeMillis = maxConnLifetimeMillis; @@ -220,7 +222,7 @@ public class PoolableConnectionFactory /** * @see #getDisconnectionSqlCodes() - * @param disconnectionSqlCodes + * @param disconnectionSqlCodes The disconnection codes * @since 2.1 */ public void setDisconnectionSqlCodes(Collection<String> disconnectionSqlCodes) { Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingConnection.java Fri Jan 15 16:00:25 2016 @@ -47,7 +47,9 @@ import org.apache.tomcat.dbcp.pool2.impl public class PoolingConnection extends DelegatingConnection<Connection> implements KeyedPooledObjectFactory<PStmtKey,DelegatingPreparedStatement> { - /** Pool of {@link PreparedStatement}s. and {@link CallableStatement}s */ + /** + * Pool of {@link PreparedStatement}s. and {@link CallableStatement}s + */ private KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> _pstmtPool = null; /** @@ -141,6 +143,7 @@ public class PoolingConnection extends D * @param resultSetType result set type * @param resultSetConcurrency result set concurrency * @return a {@link PoolablePreparedStatement} + * @throws SQLException An error occurred */ @Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { @@ -163,7 +166,7 @@ public class PoolingConnection extends D * Create or obtain a {@link CallableStatement} from the pool. * @param sql the sql string used to define the CallableStatement * @return a {@link PoolableCallableStatement} - * @throws SQLException + * @throws SQLException An error occurred */ @Override public CallableStatement prepareCall(String sql) throws SQLException { @@ -184,7 +187,7 @@ public class PoolingConnection extends D * @param resultSetType result set type * @param resultSetConcurrency result set concurrency * @return a {@link PoolableCallableStatement} - * @throws SQLException + * @throws SQLException An error occurred */ @Override public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { @@ -236,6 +239,7 @@ public class PoolingConnection extends D * @param sql the sql string used to define the statement * @param resultSetType result set type * @param resultSetConcurrency result set concurrency + * @return the key */ protected PStmtKey createKey(String sql, int resultSetType, int resultSetConcurrency) { String catalog = null; @@ -253,6 +257,7 @@ public class PoolingConnection extends D * @param resultSetType result set type * @param resultSetConcurrency result set concurrency * @param stmtType statement type + * @return the key */ protected PStmtKey createKey(String sql, int resultSetType, int resultSetConcurrency, StatementType stmtType) { String catalog = null; @@ -267,6 +272,7 @@ public class PoolingConnection extends D /** * Create a PStmtKey for the given arguments. * @param sql the sql string used to define the statement + * @return the key */ protected PStmtKey createKey(String sql) { String catalog = null; @@ -282,6 +288,7 @@ public class PoolingConnection extends D * Create a PStmtKey for the given arguments. * @param sql the SQL string used to define the statement * @param stmtType statement type + * @return the key */ protected PStmtKey createKey(String sql, StatementType stmtType) { String catalog = null; @@ -296,6 +303,8 @@ public class PoolingConnection extends D /** * Normalize the given SQL statement, producing a * canonical form that is semantically equivalent to the original. + * @param sql The SQL statement + * @return the trimmed SQL statement */ protected String normalizeSQL(String sql) { return sql.trim(); @@ -308,6 +317,8 @@ public class PoolingConnection extends D * a PoolablePreparedStatement or PoolableCallableStatement is created. * * @param key the key for the {@link PreparedStatement} to be created + * @return the object + * @throws Exception An error occurred * @see #createKey(String, int, int, StatementType) */ @Override @@ -350,6 +361,7 @@ public class PoolingConnection extends D * * @param key ignored * @param p the wrapped pooled statement to be destroyed. + * @throws Exception An error occurred */ @Override public void destroyObject(PStmtKey key, @@ -378,6 +390,7 @@ public class PoolingConnection extends D * * @param key ignored * @param p wrapped pooled statement to be activated + * @throws Exception An error occurred */ @Override public void activateObject(PStmtKey key, @@ -392,6 +405,7 @@ public class PoolingConnection extends D * * @param key ignored * @param p a wrapped {@link PreparedStatement} + * @throws Exception An error occurred */ @Override public void passivateObject(PStmtKey key, Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDataSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDataSource.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDataSource.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDataSource.java Fri Jan 15 16:00:25 2016 @@ -148,7 +148,7 @@ public class PoolingDataSource<C extends /** * Throws {@link UnsupportedOperationException} - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException This is unsupported */ @Override public Connection getConnection(String uname, String passwd) throws SQLException { Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDriver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDriver.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDriver.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/PoolingDriver.java Fri Jan 15 16:00:25 2016 @@ -41,7 +41,9 @@ import org.apache.tomcat.dbcp.pool2.Obje * @since 2.0 */ public class PoolingDriver implements Driver { - /** Register myself with the {@link DriverManager}. */ + /** + * Register myself with the {@link DriverManager}. + */ static { try { DriverManager.registerDriver(new PoolingDriver()); @@ -49,11 +51,15 @@ public class PoolingDriver implements Dr } } - /** The map of registered pools. */ + /** + * The map of registered pools. + */ protected static final HashMap<String,ObjectPool<? extends Connection>> pools = new HashMap<>(); - /** Controls access to the underlying connection */ + /** + * Controls access to the underlying connection + */ private final boolean accessToUnderlyingConnectionAllowed; public PoolingDriver() { @@ -62,6 +68,7 @@ public class PoolingDriver implements Dr /** * For unit testing purposes. + * @param accessToUnderlyingConnectionAllowed The new flag */ protected PoolingDriver(boolean accessToUnderlyingConnectionAllowed) { this.accessToUnderlyingConnectionAllowed = accessToUnderlyingConnectionAllowed; @@ -71,7 +78,8 @@ public class PoolingDriver implements Dr /** * Returns the value of the accessToUnderlyingConnectionAllowed property. * - * @return true if access to the underlying is allowed, false otherwise. + * @return <code>true</code> if access to the underlying is allowed, + * <code>false</code> otherwise. */ protected boolean isAccessToUnderlyingConnectionAllowed() { return accessToUnderlyingConnectionAllowed; Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/Utils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/Utils.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/Utils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/Utils.java Fri Jan 15 16:00:25 2016 @@ -116,6 +116,8 @@ public final class Utils { /** * Obtain the correct i18n message for the given key. + * @param key The message key + * @return the message */ public static String getMessage(String key) { return getMessage(key, (Object[]) null); @@ -125,6 +127,9 @@ public final class Utils { /** * Obtain the correct i18n message for the given key with placeholders * replaced by the supplied arguments. + * @param key The message key + * @param args The arguments + * @return the message */ public static String getMessage(String key, Object... args) { String msg = messages.getString(key); Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java Fri Jan 15 16:00:25 2016 @@ -492,6 +492,7 @@ public class DriverAdapterCPDS * Set the driver classname. Setting the driver classname cause the * driver to be registered with the DriverManager. * @param v Value to assign to driver. + * @throws ClassNotFoundException Driver class was not found * @throws IllegalStateException if {@link #getPooledConnection()} has been called */ public void setDriver(String v) throws ClassNotFoundException { @@ -596,7 +597,7 @@ public class DriverAdapterCPDS * idle object evictor thread. * When non-positive, no idle object evictor thread will be * run. - * @param timeBetweenEvictionRunsMillis + * @param timeBetweenEvictionRunsMillis The time between runs * @see #getTimeBetweenEvictionRunsMillis() * @throws IllegalStateException if {@link #getPooledConnection()} has been called */ @@ -610,8 +611,9 @@ public class DriverAdapterCPDS * Returns the number of statements to examine during each run of the * idle object evictor thread (if any). * - * *see #setNumTestsPerEvictionRun - * *see #setTimeBetweenEvictionRunsMillis + * @see #setNumTestsPerEvictionRun(int) + * @see #setTimeBetweenEvictionRunsMillis(long) + * @return the number of statements */ public int getNumTestsPerEvictionRun() { return _numTestsPerEvictionRun; @@ -640,8 +642,9 @@ public class DriverAdapterCPDS * before it is eligible for eviction by the idle object evictor * (if any). * - * *see #setMinEvictableIdleTimeMillis - * *see #setTimeBetweenEvictionRunsMillis + * @see #setMinEvictableIdleTimeMillis(int) + * @see #setTimeBetweenEvictionRunsMillis(long) + * @return the amount of time */ public int getMinEvictableIdleTimeMillis() { return _minEvictableIdleTimeMillis; @@ -666,7 +669,8 @@ public class DriverAdapterCPDS /** * Returns the value of the accessToUnderlyingConnectionAllowed property. * - * @return true if access to the underlying is allowed, false otherwise. + * @return <code>true</code> if access to the underlying is allowed, + * <code>false</code> otherwise. */ public synchronized boolean isAccessToUnderlyingConnectionAllowed() { return this.accessToUnderlyingConnectionAllowed; Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java Fri Jan 15 16:00:25 2016 @@ -213,7 +213,7 @@ public abstract class InstanceKeyDataSou // Properties /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getBlockWhenExhausted()} for each per * user pool. */ @@ -225,6 +225,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getBlockWhenExhausted()} for each per * user pool. + * @param blockWhenExhausted The new value */ public void setDefaultBlockWhenExhausted(boolean blockWhenExhausted) { assertInitializationAllowed(); @@ -232,7 +233,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getEvictionPolicyClassName()} for * each per user pool. */ @@ -244,6 +245,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getEvictionPolicyClassName()} for * each per user pool. + * @param evictionPolicyClassName The new value */ public void setDefaultEvictionPolicyClassName( String evictionPolicyClassName) { @@ -252,7 +254,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getLifo()} for each per user pool. */ public boolean getDefaultLifo() { @@ -262,6 +264,7 @@ public abstract class InstanceKeyDataSou /** * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getLifo()} for each per user pool. + * @param lifo The new value */ public void setDefaultLifo(boolean lifo) { assertInitializationAllowed(); @@ -269,7 +272,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getMaxIdlePerKey()} for each per user * pool. */ @@ -281,6 +284,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getMaxIdlePerKey()} for each per user * pool. + * @param maxIdle The new value */ public void setDefaultMaxIdle(int maxIdle) { assertInitializationAllowed(); @@ -288,7 +292,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getMaxTotalPerKey()} for each per * user pool. */ @@ -300,6 +304,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getMaxTotalPerKey()} for each per * user pool. + * @param maxTotal The new value */ public void setDefaultMaxTotal(int maxTotal) { assertInitializationAllowed(); @@ -307,7 +312,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getMaxWaitMillis()} for each per user * pool. */ @@ -319,6 +324,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getMaxWaitMillis()} for each per user * pool. + * @param maxWaitMillis The new value */ public void setDefaultMaxWaitMillis(long maxWaitMillis) { assertInitializationAllowed(); @@ -326,7 +332,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getMinEvictableIdleTimeMillis()} for * each per user pool. */ @@ -338,6 +344,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getMinEvictableIdleTimeMillis()} for * each per user pool. + * @param minEvictableIdleTimeMillis The new value */ public void setDefaultMinEvictableIdleTimeMillis( long minEvictableIdleTimeMillis) { @@ -346,7 +353,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getMinIdlePerKey()} for each per user * pool. */ @@ -358,6 +365,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getMinIdlePerKey()} for each per user * pool. + * @param minIdle The new value */ public void setDefaultMinIdle(int minIdle) { assertInitializationAllowed(); @@ -365,7 +373,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link GenericKeyedObjectPoolConfig#getNumTestsPerEvictionRun()} for each * per user pool. */ @@ -377,6 +385,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link GenericKeyedObjectPoolConfig#getNumTestsPerEvictionRun()} for each * per user pool. + * @param numTestsPerEvictionRun The new value */ public void setDefaultNumTestsPerEvictionRun(int numTestsPerEvictionRun) { assertInitializationAllowed(); @@ -384,7 +393,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getSoftMinEvictableIdleTimeMillis()} for each * per user pool. */ @@ -395,6 +404,7 @@ public abstract class InstanceKeyDataSou /** * Sets the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getSoftMinEvictableIdleTimeMillis()} for each per user pool. + * @param softMinEvictableIdleTimeMillis The new value */ public void setDefaultSoftMinEvictableIdleTimeMillis( long softMinEvictableIdleTimeMillis) { @@ -403,7 +413,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTestOnCreate()} for each per user pool. */ public boolean getDefaultTestOnCreate() { @@ -413,6 +423,7 @@ public abstract class InstanceKeyDataSou /** * Sets the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTestOnCreate()} for each per user pool. + * @param testOnCreate The new value */ public void setDefaultTestOnCreate(boolean testOnCreate) { assertInitializationAllowed(); @@ -420,7 +431,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTestOnBorrow()} for each per user pool. */ public boolean getDefaultTestOnBorrow() { @@ -430,6 +441,7 @@ public abstract class InstanceKeyDataSou /** * Sets the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTestOnBorrow()} for each per user pool. + * @param testOnBorrow The new value */ public void setDefaultTestOnBorrow(boolean testOnBorrow) { assertInitializationAllowed(); @@ -437,7 +449,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTestOnReturn()} for each per user pool. */ public boolean getDefaultTestOnReturn() { @@ -447,6 +459,7 @@ public abstract class InstanceKeyDataSou /** * Sets the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTestOnReturn()} for each per user pool. + * @param testOnReturn The new value */ public void setDefaultTestOnReturn(boolean testOnReturn) { assertInitializationAllowed(); @@ -454,7 +467,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTestWhileIdle()} for each per user pool. */ public boolean getDefaultTestWhileIdle() { @@ -464,6 +477,7 @@ public abstract class InstanceKeyDataSou /** * Sets the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTestWhileIdle()} for each per user pool. + * @param testWhileIdle The new value */ public void setDefaultTestWhileIdle(boolean testWhileIdle) { assertInitializationAllowed(); @@ -471,7 +485,7 @@ public abstract class InstanceKeyDataSou } /** - * Gets the default value for + * @return the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTimeBetweenEvictionRunsMillis ()} for each * per user pool. */ @@ -483,6 +497,7 @@ public abstract class InstanceKeyDataSou * Sets the default value for * {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getTimeBetweenEvictionRunsMillis ()} for each * per user pool. + * @param timeBetweenEvictionRunsMillis The new value */ public void setDefaultTimeBetweenEvictionRunsMillis ( long timeBetweenEvictionRunsMillis ) { @@ -675,7 +690,7 @@ public abstract class InstanceKeyDataSou * Get the value of jndiEnvironment which is used when instantiating * a jndi InitialContext. This InitialContext is used to locate the * backend ConnectionPoolDataSource. - * + * @param key The environment property name * @return value of jndiEnvironment. */ public String getJndiEnvironment(String key) { @@ -764,6 +779,7 @@ public abstract class InstanceKeyDataSou * <strong>MUST</strong> be an SQL SELECT statement that returns at least * one row. If not specified, {@link Connection#isValid(int)} will be used * to validate connections. + * @return the validation query */ public String getValidationQuery() { return this.validationQuery; @@ -775,6 +791,7 @@ public abstract class InstanceKeyDataSou * <strong>MUST</strong> be an SQL SELECT statement that returns at least * one row. If not specified, connections will be validated using * {@link Connection#isValid(int)}. + * @param validationQuery The validation query */ public void setValidationQuery(String validationQuery) { assertInitializationAllowed(); @@ -782,7 +799,7 @@ public abstract class InstanceKeyDataSou } /** - * Returns the timeout in seconds before the validation query fails. + * @return the timeout in seconds before the validation query fails. */ public int getValidationQueryTimeout() { return validationQueryTimeout; @@ -824,7 +841,7 @@ public abstract class InstanceKeyDataSou } /** - * Returns the maximum permitted lifetime of a connection in milliseconds. A + * @return the maximum permitted lifetime of a connection in milliseconds. A * value of zero or less indicates an infinite lifetime. */ public long getMaxConnLifetimeMillis() { @@ -839,6 +856,7 @@ public abstract class InstanceKeyDataSou * initialized. The pool is initialized the first time one of the * following methods is invoked: <code>getConnection, setLogwriter, * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p> + * @param maxConnLifetimeMillis The maximum connection lifetime */ public void setMaxConnLifetimeMillis(long maxConnLifetimeMillis) { this.maxConnLifetimeMillis = maxConnLifetimeMillis; @@ -852,6 +870,8 @@ public abstract class InstanceKeyDataSou /** * Attempt to establish a database connection. + * @return the connection + * @throws SQLException Connection failed */ @Override public Connection getConnection() throws SQLException { @@ -868,7 +888,10 @@ public abstract class InstanceKeyDataSou * 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. - * + * @param username The user name to use to connect + * @param password The password + * @return the connection + * @throws SQLException Connection failed */ @Override public Connection getConnection(String username, String password) Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java Fri Jan 15 16:00:25 2016 @@ -72,6 +72,7 @@ abstract class InstanceKeyDataSourceFact /** * Close all pools associated with this class. + * @throws Exception Close exception */ public static void closeAll() throws Exception { //Get iterator to loop over all instances of this datasource. @@ -85,8 +86,8 @@ abstract class InstanceKeyDataSourceFact /** - * implements ObjectFactory to create an instance of SharedPoolDataSource - * or PerUserPoolDataSource + * Implements ObjectFactory to create an instance of SharedPoolDataSource + * or PerUserPoolDataSource. */ @Override public Object getObjectInstance(Object refObj, Name name, @@ -295,6 +296,7 @@ abstract class InstanceKeyDataSourceFact /** + * @param className The class name * @return true if and only if className is the value returned * from getClass().getName().toString() */ @@ -303,12 +305,20 @@ abstract class InstanceKeyDataSourceFact /** * Creates an instance of the subclass and sets any properties * contained in the Reference. + * @param ref The reference + * @return the data source + * @throws IOException IO error + * @throws ClassNotFoundException Couldn't load data source implementation */ protected abstract InstanceKeyDataSource getNewInstance(Reference ref) throws IOException, ClassNotFoundException; /** - * used to set some properties saved within a Reference + * Used to set some properties saved within a Reference. + * @param data Object data + * @return the deserialized object + * @throws IOException Stream error + * @throws ClassNotFoundException Couldn't load object class */ protected static final Object deserialize(byte[] data) throws IOException, ClassNotFoundException { Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.java Fri Jan 15 16:00:25 2016 @@ -119,6 +119,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getBlockWhenExhausted()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return <code>true</code> to block */ public boolean getPerUserBlockWhenExhausted(String key) { Boolean value = null; @@ -135,6 +137,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getBlockWhenExhausted()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserBlockWhenExhausted(String username, Boolean value) { @@ -161,6 +165,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getEvictionPolicyClassName()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return the policy class name */ public String getPerUserEvictionPolicyClassName(String key) { String value = null; @@ -177,6 +183,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getEvictionPolicyClassName()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserEvictionPolicyClassName(String username, String value) { @@ -203,6 +211,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for {@link GenericObjectPool#getLifo()} for * the specified user's pool or the default if no user specific value is * defined. + * @param key The user + * @return <code>true</code> to use LIFO */ public boolean getPerUserLifo(String key) { Boolean value = null; @@ -219,6 +229,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getLifo()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserLifo(String username, Boolean value) { assertInitializationAllowed(); @@ -243,6 +255,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getMaxIdle()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return the maximum idle */ public int getPerUserMaxIdle(String key) { Integer value = null; @@ -259,6 +273,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getMaxIdle()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserMaxIdle(String username, Integer value) { assertInitializationAllowed(); @@ -283,6 +299,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getMaxTotal()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return the maximum total */ public int getPerUserMaxTotal(String key) { Integer value = null; @@ -299,6 +317,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getMaxTotal()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserMaxTotal(String username, Integer value) { assertInitializationAllowed(); @@ -323,6 +343,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getMaxWaitMillis()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return the maximum wait time */ public long getPerUserMaxWaitMillis(String key) { Long value = null; @@ -339,6 +361,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getMaxWaitMillis()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserMaxWaitMillis(String username, Long value) { assertInitializationAllowed(); @@ -364,6 +388,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getMinEvictableIdleTimeMillis()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return the minimum idle time for eviction */ public long getPerUserMinEvictableIdleTimeMillis(String key) { Long value = null; @@ -380,6 +406,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getMinEvictableIdleTimeMillis()} for the * specified user's pool. + * @param username The user + * @param value The value */ public void setPerUserMinEvictableIdleTimeMillis(String username, Long value) { @@ -407,6 +435,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getMinIdle()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return the minimum idle count */ public int getPerUserMinIdle(String key) { Integer value = null; @@ -423,6 +453,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getMinIdle()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserMinIdle(String username, Integer value) { assertInitializationAllowed(); @@ -447,6 +479,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getNumTestsPerEvictionRun()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return the tests count */ public int getPerUserNumTestsPerEvictionRun(String key) { Integer value = null; @@ -463,6 +497,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getNumTestsPerEvictionRun()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserNumTestsPerEvictionRun(String username, Integer value) { @@ -489,6 +525,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getSoftMinEvictableIdleTimeMillis()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return the soft minimum idle time for eviction */ public long getPerUserSoftMinEvictableIdleTimeMillis(String key) { Long value = null; @@ -505,6 +543,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getSoftMinEvictableIdleTimeMillis()} for the * specified user's pool. + * @param username The user + * @param value The value */ public void setPerUserSoftMinEvictableIdleTimeMillis(String username, Long value) { @@ -531,6 +571,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getTestOnCreate()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return <code>true</code> to test on create */ public boolean getPerUserTestOnCreate(String key) { Boolean value = null; @@ -547,6 +589,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getTestOnCreate()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserTestOnCreate(String username, Boolean value) { assertInitializationAllowed(); @@ -571,6 +615,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getTestOnBorrow()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return <code>true</code> to test on borrow */ public boolean getPerUserTestOnBorrow(String key) { Boolean value = null; @@ -587,6 +633,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getTestOnBorrow()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserTestOnBorrow(String username, Boolean value) { assertInitializationAllowed(); @@ -611,6 +659,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getTestOnReturn()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return <code>true</code> to test on return */ public boolean getPerUserTestOnReturn(String key) { Boolean value = null; @@ -627,6 +677,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getTestOnReturn()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserTestOnReturn(String username, Boolean value) { assertInitializationAllowed(); @@ -652,6 +704,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getTestWhileIdle()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return <code>true</code> to test while idle */ public boolean getPerUserTestWhileIdle(String key) { Boolean value = null; @@ -668,6 +722,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getTestWhileIdle()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserTestWhileIdle(String username, Boolean value) { assertInitializationAllowed(); @@ -693,6 +749,8 @@ public class PerUserPoolDataSource exten * Gets the user specific value for * {@link GenericObjectPool#getTimeBetweenEvictionRunsMillis()} for the * specified user's pool or the default if no user specific value is defined. + * @param key The user + * @return time between eviction runs */ public long getPerUserTimeBetweenEvictionRunsMillis(String key) { Long value = null; @@ -709,6 +767,8 @@ public class PerUserPoolDataSource exten * Sets a user specific value for * {@link GenericObjectPool#getTimeBetweenEvictionRunsMillis ()} for the specified * user's pool. + * @param username The user + * @param value The value */ public void setPerUserTimeBetweenEvictionRunsMillis(String username, Long value) { @@ -735,6 +795,8 @@ public class PerUserPoolDataSource exten /** * Gets the user specific default value for * {@link Connection#setAutoCommit(boolean)} for the specified user's pool. + * @param key The user + * @return <code>true</code> to commit automatically */ public Boolean getPerUserDefaultAutoCommit(String key) { Boolean value = null; @@ -747,6 +809,8 @@ public class PerUserPoolDataSource exten /** * Sets a user specific default value for * {@link Connection#setAutoCommit(boolean)} for the specified user's pool. + * @param username The user + * @param value The value */ public void setPerUserDefaultAutoCommit(String username, Boolean value) { assertInitializationAllowed(); @@ -770,6 +834,8 @@ public class PerUserPoolDataSource exten /** * Gets the user specific default value for * {@link Connection#setReadOnly(boolean)} for the specified user's pool. + * @param key The user + * @return <code>true</code> is read only by default */ public Boolean getPerUserDefaultReadOnly(String key) { Boolean value = null; @@ -782,6 +848,8 @@ public class PerUserPoolDataSource exten /** * Sets a user specific default value for * {@link Connection#setReadOnly(boolean)} for the specified user's pool. + * @param username The user + * @param value The value */ public void setPerUserDefaultReadOnly(String username, Boolean value) { assertInitializationAllowed(); @@ -805,6 +873,8 @@ public class PerUserPoolDataSource exten /** * Gets the user specific default value for * {@link Connection#setTransactionIsolation(int)} for the specified user's pool. + * @param key The user + * @return the default transaction isolation */ public Integer getPerUserDefaultTransactionIsolation(String key) { Integer value = null; @@ -817,6 +887,8 @@ public class PerUserPoolDataSource exten /** * Sets a user specific default value for * {@link Connection#setTransactionIsolation(int)} for the specified user's pool. + * @param username The user + * @param value The value */ public void setPerUserDefaultTransactionIsolation(String username, Integer value) { @@ -843,14 +915,15 @@ public class PerUserPoolDataSource exten // Instrumentation Methods /** - * Get the number of active connections in the default pool. + * @return the number of active connections in the default pool. */ public int getNumActive() { return getNumActive(null); } /** - * Get the number of active connections in the pool for a given user. + * @param username The user + * @return the number of active connections in the pool for a given user. */ public int getNumActive(String username) { ObjectPool<PooledConnectionAndInfo> pool = @@ -859,14 +932,15 @@ public class PerUserPoolDataSource exten } /** - * Get the number of idle connections in the default pool. + * @return the number of idle connections in the default pool. */ public int getNumIdle() { return getNumIdle(null); } /** - * Get the number of idle connections in the pool for a given user. + * @param username The user + * @return the number of idle connections in the pool for a given user. */ public int getNumIdle(String username) { ObjectPool<PooledConnectionAndInfo> pool = @@ -984,7 +1058,8 @@ public class PerUserPoolDataSource exten } /** - * Returns a <code>PerUserPoolDataSource</code> {@link Reference}. + * @return a <code>PerUserPoolDataSource</code> {@link Reference}. + * @throws NamingException Should not happen */ @Override public Reference getReference() throws NamingException { @@ -998,7 +1073,7 @@ public class PerUserPoolDataSource exten * Create a pool key from the provided parameters. * * @param username User name - * @return The pool key + * @return the pool key */ private PoolKey getPoolKey(String username) { return new PoolKey(getDataSourceName(), username); Modified: tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/SharedPoolDataSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/SharedPoolDataSource.java?rev=1724845&r1=1724844&r2=1724845&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/SharedPoolDataSource.java (original) +++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/SharedPoolDataSource.java Fri Jan 15 16:00:25 2016 @@ -81,14 +81,15 @@ public class SharedPoolDataSource extend // Properties /** - * Set {@link GenericKeyedObjectPool#getMaxTotal()} for this pool. + * @return {@link GenericKeyedObjectPool#getMaxTotal()} for this pool. */ public int getMaxTotal() { return this.maxTotal; } /** - * Get {@link GenericKeyedObjectPool#getMaxTotal()} for this pool. + * Set {@link GenericKeyedObjectPool#getMaxTotal()} for this pool. + * @param maxTotal The max total value */ public void setMaxTotal(int maxTotal) { assertInitializationAllowed(); @@ -100,14 +101,14 @@ public class SharedPoolDataSource extend // Instrumentation Methods /** - * Get the number of active connections in the pool. + * @return the number of active connections in the pool. */ public int getNumActive() { return pool == null ? 0 : pool.getNumActive(); } /** - * Get the number of idle connections in the pool. + * @return the number of idle connections in the pool. */ public int getNumIdle() { return pool == null ? 0 : pool.getNumIdle(); @@ -151,7 +152,8 @@ public class SharedPoolDataSource extend } /** - * Returns a <code>SharedPoolDataSource</code> {@link Reference}. + * @return a <code>SharedPoolDataSource</code> {@link Reference}. + * @throws NamingException Should not occur */ @Override public Reference getReference() throws NamingException { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org