You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/05/13 19:03:42 UTC
svn commit: r1743727 [7/8] - in /tomcat/tc8.0.x/trunk: ./
java/org/apache/tomcat/dbcp/dbcp2/
java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/
java/org/apache/tomcat/dbcp/dbcp2/datasources/ webapps/docs/
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java?rev=1743727&r1=1743726&r2=1743727&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/DriverAdapterCPDS.java Fri May 13 19:03:42 2016
@@ -45,7 +45,7 @@ import org.apache.tomcat.dbcp.pool2.impl
/**
* <p>
- * An adapter for jdbc drivers that do not include an implementation
+ * 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
@@ -163,7 +163,7 @@ public class DriverAdapterCPDS
* @param pass password to be used fur the connection
*/
@Override
- public PooledConnection getPooledConnection(String username, String pass)
+ public PooledConnection getPooledConnection(final String username, final String pass)
throws SQLException {
getConnectionCalled = true;
PooledConnectionImpl pci = null;
@@ -181,7 +181,7 @@ public class DriverAdapterCPDS
}
pci.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());
}
- catch (ClassCircularityError e)
+ catch (final ClassCircularityError e)
{
if (connectionProperties != null) {
pci = new PooledConnectionImpl(DriverManager.getConnection(
@@ -194,7 +194,7 @@ public class DriverAdapterCPDS
}
KeyedObjectPool<PStmtKeyCPDS, PoolablePreparedStatement<PStmtKeyCPDS>> stmtPool = null;
if (isPoolPreparedStatements()) {
- GenericKeyedObjectPoolConfig config = new GenericKeyedObjectPoolConfig();
+ final GenericKeyedObjectPoolConfig config = new GenericKeyedObjectPoolConfig();
config.setMaxTotalPerKey(Integer.MAX_VALUE);
config.setBlockWhenExhausted(false);
config.setMaxWaitMillis(0);
@@ -237,9 +237,9 @@ public class DriverAdapterCPDS
@Override
public Reference getReference() throws NamingException {
// this class implements its own factory
- String factory = getClass().getName();
+ final String factory = getClass().getName();
- Reference ref = new Reference(getClass().getName(), factory, null);
+ final Reference ref = new Reference(getClass().getName(), factory, null);
ref.add(new StringRefAddr("description", getDescription()));
ref.add(new StringRefAddr("driver", getDriver()));
@@ -273,14 +273,14 @@ public class DriverAdapterCPDS
* implements ObjectFactory to create an instance of this class
*/
@Override
- public Object getObjectInstance(Object refObj, Name name,
- Context context, Hashtable<?,?> env)
+ public Object getObjectInstance(final Object refObj, final Name name,
+ final Context context, final Hashtable<?,?> env)
throws Exception {
// The spec says to return null if we can't create an instance
// of the reference
DriverAdapterCPDS cpds = null;
if (refObj instanceof Reference) {
- Reference ref = (Reference)refObj;
+ final Reference ref = (Reference)refObj;
if (ref.getClassName().equals(getClass().getName())) {
RefAddr ra = ref.get("description");
if (ra != null && ra.getContent() != null) {
@@ -363,7 +363,7 @@ public class DriverAdapterCPDS
// Properties
/**
- * Get the connection properties passed to the JDBC driver.
+ * Gets the connection properties passed to the JDBC driver.
*
* @return the JDBC connection properties used when creating connections.
*/
@@ -372,7 +372,7 @@ public class DriverAdapterCPDS
}
/**
- * <p>Set the connection properties passed to the JDBC driver.</p>
+ * <p>Sets the connection properties passed to the JDBC driver.</p>
*
* <p>If <code>props</code> contains "user" and/or "password"
* properties, the corresponding instance properties are set. If these
@@ -386,7 +386,7 @@ public class DriverAdapterCPDS
* @param props Connection properties to use when creating new connections.
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setConnectionProperties(Properties props) {
+ public void setConnectionProperties(final Properties props) {
assertInitializationAllowed();
connectionProperties = props;
if (connectionProperties.containsKey("user")) {
@@ -398,7 +398,7 @@ public class DriverAdapterCPDS
}
/**
- * Get the value of description. This property is here for use by
+ * Gets the value of description. This property is here for use by
* the code which will deploy this datasource. It is not used
* internally.
*
@@ -410,18 +410,18 @@ public class DriverAdapterCPDS
}
/**
- * Set the value of description. This property is here for use by
+ * Sets the value of description. This property is here for use by
* the code which will deploy this datasource. It is not used
* internally.
*
* @param v Value to assign to description.
*/
- public void setDescription(String v) {
+ public void setDescription(final String v) {
this.description = v;
}
/**
- * Get the value of password for the default user.
+ * Gets the value of password for the default user.
* @return value of password.
*/
public String getPassword() {
@@ -429,11 +429,11 @@ public class DriverAdapterCPDS
}
/**
- * Set the value of password for the default user.
+ * Sets the value of password for the default user.
* @param v Value to assign to password.
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setPassword(String v) {
+ public void setPassword(final String v) {
assertInitializationAllowed();
this.password = v;
if (connectionProperties != null) {
@@ -442,7 +442,7 @@ public class DriverAdapterCPDS
}
/**
- * Get the value of url used to locate the database for this datasource.
+ * Gets the value of url used to locate the database for this datasource.
* @return value of url.
*/
public String getUrl() {
@@ -450,17 +450,17 @@ public class DriverAdapterCPDS
}
/**
- * Set the value of url used to locate the database for this datasource.
+ * Sets the value of URL string used to locate the database for this datasource.
* @param v Value to assign to url.
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setUrl(String v) {
+ public void setUrl(final String v) {
assertInitializationAllowed();
this.url = v;
}
/**
- * Get the value of default user (login or username).
+ * Gets the value of default user (login or username).
* @return value of user.
*/
public String getUser() {
@@ -468,11 +468,11 @@ public class DriverAdapterCPDS
}
/**
- * Set the value of default user (login or username).
+ * Sets the value of default user (login or username).
* @param v Value to assign to user.
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setUser(String v) {
+ public void setUser(final String v) {
assertInitializationAllowed();
this.user = v;
if (connectionProperties != null) {
@@ -481,7 +481,7 @@ public class DriverAdapterCPDS
}
/**
- * Get the driver classname.
+ * Gets the driver classname.
* @return value of driver.
*/
public String getDriver() {
@@ -489,12 +489,12 @@ public class DriverAdapterCPDS
}
/**
- * Set the driver classname. Setting the driver classname cause the
+ * Sets the driver classname. Setting the driver classname cause the
* driver to be registered with the DriverManager.
* @param v Value to assign to driver.
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setDriver(String v) throws ClassNotFoundException {
+ public void setDriver(final String v) throws ClassNotFoundException {
assertInitializationAllowed();
this.driver = v;
// make sure driver is registered
@@ -511,7 +511,7 @@ public class DriverAdapterCPDS
}
/**
- * Get the log writer for this data source. NOT USED.
+ * Gets the log writer for this data source. NOT USED.
*/
@Override
public PrintWriter getLogWriter() {
@@ -523,15 +523,15 @@ public class DriverAdapterCPDS
* while attempting to connect to a database. NOT USED.
*/
@Override
- public void setLoginTimeout(int seconds) {
+ public void setLoginTimeout(final int seconds) {
loginTimeout = seconds;
}
/**
- * Set the log writer for this data source. NOT USED.
+ * Sets the log writer for this data source. NOT USED.
*/
@Override
- public void setLogWriter(PrintWriter out) {
+ public void setLogWriter(final PrintWriter out) {
logWriter = out;
}
@@ -553,13 +553,13 @@ public class DriverAdapterCPDS
* @param v true to pool statements.
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setPoolPreparedStatements(boolean v) {
+ public void setPoolPreparedStatements(final boolean v) {
assertInitializationAllowed();
this.poolPreparedStatements = v;
}
/**
- * The maximum number of statements that can remain idle in the
+ * Gets the maximum number of statements that can remain idle in the
* pool, without extra ones being released, or negative for no limit.
* @return the value of maxIdle
*/
@@ -568,19 +568,19 @@ public class DriverAdapterCPDS
}
/**
- * The maximum number of statements that can remain idle in the
+ * Gets the maximum number of statements that can remain idle in the
* pool, without extra ones being released, or negative for no limit.
*
* @param maxIdle The maximum number of statements that can remain idle
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setMaxIdle(int maxIdle) {
+ public void setMaxIdle(final int maxIdle) {
assertInitializationAllowed();
this.maxIdle = maxIdle;
}
/**
- * Returns the number of milliseconds to sleep between runs of the
+ * Gets the number of milliseconds to sleep between runs of the
* idle object evictor thread.
* When non-positive, no idle object evictor thread will be
* run.
@@ -601,13 +601,13 @@ public class DriverAdapterCPDS
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
public void setTimeBetweenEvictionRunsMillis(
- long timeBetweenEvictionRunsMillis) {
+ final long timeBetweenEvictionRunsMillis) {
assertInitializationAllowed();
_timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
}
/**
- * Returns the number of statements to examine during each run of the
+ * Gets the number of statements to examine during each run of the
* idle object evictor thread (if any).
*
* *see #setNumTestsPerEvictionRun
@@ -630,13 +630,13 @@ public class DriverAdapterCPDS
* @see #setTimeBetweenEvictionRunsMillis(long)
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
+ public void setNumTestsPerEvictionRun(final int numTestsPerEvictionRun) {
assertInitializationAllowed();
_numTestsPerEvictionRun = numTestsPerEvictionRun;
}
/**
- * Returns the minimum amount of time a statement may sit idle in the pool
+ * Gets the minimum amount of time a statement may sit idle in the pool
* before it is eligible for eviction by the idle object evictor
* (if any).
*
@@ -658,7 +658,7 @@ public class DriverAdapterCPDS
* @see #setTimeBetweenEvictionRunsMillis(long)
* @throws IllegalStateException if {@link #getPooledConnection()} has been called
*/
- public void setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis) {
+ public void setMinEvictableIdleTimeMillis(final int minEvictableIdleTimeMillis) {
assertInitializationAllowed();
_minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
}
@@ -679,12 +679,12 @@ public class DriverAdapterCPDS
*
* @param allow Access to the underlying connection is granted when true.
*/
- public synchronized void setAccessToUnderlyingConnectionAllowed(boolean allow) {
+ public synchronized void setAccessToUnderlyingConnectionAllowed(final boolean allow) {
this.accessToUnderlyingConnectionAllowed = allow;
}
/**
- * Returns the maximum number of prepared statements.
+ * Gets the maximum number of prepared statements.
*
* @return maxPrepartedStatements value
*/
@@ -698,7 +698,7 @@ public class DriverAdapterCPDS
* @param maxPreparedStatements the new maximum number of prepared
* statements
*/
- public void setMaxPreparedStatements(int maxPreparedStatements)
+ public void setMaxPreparedStatements(final int maxPreparedStatements)
{
_maxPreparedStatements = maxPreparedStatements;
}
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PStmtKeyCPDS.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PStmtKeyCPDS.java?rev=1743727&r1=1743726&r2=1743727&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PStmtKeyCPDS.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PStmtKeyCPDS.java Fri May 13 19:03:42 2016
@@ -29,43 +29,43 @@ public class PStmtKeyCPDS extends PStmtK
private final int _columnIndexes[];
private final String _columnNames[];
- public PStmtKeyCPDS(String sql) {
+ public PStmtKeyCPDS(final String sql) {
super(sql);
_resultSetHoldability = null;
_columnIndexes = null;
_columnNames = null;
}
- public PStmtKeyCPDS(String sql, int autoGeneratedKeys) {
+ public PStmtKeyCPDS(final String sql, final int autoGeneratedKeys) {
super(sql, null, autoGeneratedKeys);
_resultSetHoldability = null;
_columnIndexes = null;
_columnNames = null;
}
- public PStmtKeyCPDS(String sql, int resultSetType, int resultSetConcurrency) {
+ public PStmtKeyCPDS(final String sql, final int resultSetType, final int resultSetConcurrency) {
super(sql, resultSetType, resultSetConcurrency);
_resultSetHoldability = null;
_columnIndexes = null;
_columnNames = null;
}
- public PStmtKeyCPDS(String sql, int resultSetType, int resultSetConcurrency,
- int resultSetHoldability) {
+ public PStmtKeyCPDS(final String sql, final int resultSetType, final int resultSetConcurrency,
+ final int resultSetHoldability) {
super(sql, resultSetType, resultSetConcurrency);
_resultSetHoldability = Integer.valueOf(resultSetHoldability);
_columnIndexes = null;
_columnNames = null;
}
- public PStmtKeyCPDS(String sql, int columnIndexes[]) {
+ public PStmtKeyCPDS(final String sql, final int columnIndexes[]) {
super(sql);
_columnIndexes = Arrays.copyOf(columnIndexes, columnIndexes.length);
_resultSetHoldability = null;
_columnNames = null;
}
- public PStmtKeyCPDS(String sql, String columnNames[]) {
+ public PStmtKeyCPDS(final String sql, final String columnNames[]) {
super(sql);
_columnNames = Arrays.copyOf(columnNames, columnNames.length);
_resultSetHoldability = null;
@@ -74,7 +74,7 @@ public class PStmtKeyCPDS extends PStmtK
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
@@ -84,7 +84,7 @@ public class PStmtKeyCPDS extends PStmtK
if (getClass() != obj.getClass()) {
return false;
}
- PStmtKeyCPDS other = (PStmtKeyCPDS) obj;
+ final PStmtKeyCPDS other = (PStmtKeyCPDS) obj;
if (!Arrays.equals(_columnIndexes, other._columnIndexes)) {
return false;
}
@@ -115,7 +115,7 @@ public class PStmtKeyCPDS extends PStmtK
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ final StringBuffer buf = new StringBuffer();
buf.append("PStmtKey: sql=");
buf.append(getSql());
buf.append(", catalog=");
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java?rev=1743727&r1=1743726&r2=1743727&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/PooledConnectionImpl.java Fri May 13 19:03:42 2016
@@ -41,8 +41,8 @@ import org.apache.tomcat.dbcp.pool2.impl
* @author John D. McNally
* @since 2.0
*/
-class PooledConnectionImpl implements PooledConnection,
- KeyedPooledObjectFactory<PStmtKeyCPDS,PoolablePreparedStatement<PStmtKeyCPDS>> {
+class PooledConnectionImpl
+ implements PooledConnection, KeyedPooledObjectFactory<PStmtKeyCPDS, PoolablePreparedStatement<PStmtKeyCPDS>> {
private static final String CLOSED
= "Attempted to use PooledConnection after closed() was called.";
@@ -90,7 +90,7 @@ class PooledConnectionImpl implements Po
* Wrap the real connection.
* @param connection the connection to be wrapped
*/
- PooledConnectionImpl(Connection connection) {
+ PooledConnectionImpl(final Connection connection) {
this.connection = connection;
if (connection instanceof DelegatingConnection) {
this.delegatingConnection = (DelegatingConnection<?>) connection;
@@ -102,7 +102,7 @@ class PooledConnectionImpl implements Po
}
public void setStatementPool(
- KeyedObjectPool<PStmtKeyCPDS, PoolablePreparedStatement<PStmtKeyCPDS>> statementPool) {
+ final KeyedObjectPool<PStmtKeyCPDS, PoolablePreparedStatement<PStmtKeyCPDS>> statementPool) {
pstmtPool = statementPool;
}
@@ -110,7 +110,7 @@ class PooledConnectionImpl implements Po
* {@inheritDoc}
*/
@Override
- public void addConnectionEventListener(ConnectionEventListener listener) {
+ public void addConnectionEventListener(final ConnectionEventListener listener) {
if (!eventListeners.contains(listener)) {
eventListeners.add(listener);
}
@@ -118,7 +118,7 @@ class PooledConnectionImpl implements Po
/* JDBC_4_ANT_KEY_BEGIN */
@Override
- public void addStatementEventListener(StatementEventListener listener) {
+ public void addStatementEventListener(final StatementEventListener listener) {
if (!statementEventListeners.contains(listener)) {
statementEventListeners.add(listener);
}
@@ -144,9 +144,9 @@ class PooledConnectionImpl implements Po
pstmtPool = null;
}
}
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new SQLException("Cannot close connection (return to pool failed)", e);
} finally {
try {
@@ -194,13 +194,13 @@ class PooledConnectionImpl implements Po
*/
@Override
public void removeConnectionEventListener(
- ConnectionEventListener listener) {
+ final ConnectionEventListener listener) {
eventListeners.remove(listener);
}
/* JDBC_4_ANT_KEY_BEGIN */
@Override
- public void removeStatementEventListener(StatementEventListener listener) {
+ public void removeStatementEventListener(final StatementEventListener listener) {
statementEventListeners.remove(listener);
}
/* JDBC_4_ANT_KEY_END */
@@ -215,7 +215,7 @@ class PooledConnectionImpl implements Po
// an error will occur.
try {
connection.close();
- } catch (Exception ignored) {
+ } catch (final Exception ignored) {
}
// make sure the last connection is marked as closed
@@ -229,9 +229,9 @@ class PooledConnectionImpl implements Po
* sends a connectionClosed event.
*/
void notifyListeners() {
- ConnectionEvent event = new ConnectionEvent(this);
- Object[] listeners = eventListeners.toArray();
- for (Object listener : listeners) {
+ final ConnectionEvent event = new ConnectionEvent(this);
+ final Object[] listeners = eventListeners.toArray();
+ for (final Object listener : listeners) {
((ConnectionEventListener) listener).connectionClosed(event);
}
}
@@ -244,15 +244,15 @@ class PooledConnectionImpl implements Po
* @param sql the SQL statement
* @return a {@link PoolablePreparedStatement}
*/
- PreparedStatement prepareStatement(String sql) throws SQLException {
+ PreparedStatement prepareStatement(final String sql) throws SQLException {
if (pstmtPool == null) {
return connection.prepareStatement(sql);
}
try {
return pstmtPool.borrowObject(createKey(sql));
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new SQLException("Borrow prepareStatement from pool failed", e);
}
}
@@ -273,8 +273,8 @@ class PooledConnectionImpl implements Po
* @return a {@link PoolablePreparedStatement}
* @see Connection#prepareStatement(String, int, int)
*/
- PreparedStatement prepareStatement(String sql, int resultSetType,
- int resultSetConcurrency)
+ PreparedStatement prepareStatement(final String sql, final int resultSetType,
+ final int resultSetConcurrency)
throws SQLException {
if (pstmtPool == null) {
return connection.prepareStatement(sql, resultSetType, resultSetConcurrency);
@@ -282,9 +282,9 @@ class PooledConnectionImpl implements Po
try {
return pstmtPool.borrowObject(
createKey(sql,resultSetType,resultSetConcurrency));
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new SQLException("Borrow prepareStatement from pool failed", e);
}
}
@@ -300,22 +300,22 @@ class PooledConnectionImpl implements Po
* @return a {@link PoolablePreparedStatement}
* @see Connection#prepareStatement(String, int)
*/
- PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
+ PreparedStatement prepareStatement(final String sql, final int autoGeneratedKeys)
throws SQLException {
if (pstmtPool == null) {
return connection.prepareStatement(sql, autoGeneratedKeys);
}
try {
return pstmtPool.borrowObject(createKey(sql,autoGeneratedKeys));
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new SQLException("Borrow prepareStatement from pool failed", e);
}
}
- PreparedStatement prepareStatement(String sql, int resultSetType,
- int resultSetConcurrency, int resultSetHoldability)
+ PreparedStatement prepareStatement(final String sql, final int resultSetType,
+ final int resultSetConcurrency, final int resultSetHoldability)
throws SQLException {
if (pstmtPool == null) {
return connection.prepareStatement(sql, resultSetType,
@@ -324,37 +324,37 @@ class PooledConnectionImpl implements Po
try {
return pstmtPool.borrowObject(createKey(sql, resultSetType,
resultSetConcurrency, resultSetHoldability));
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new SQLException("Borrow prepareStatement from pool failed", e);
}
}
- PreparedStatement prepareStatement(String sql, int columnIndexes[])
+ PreparedStatement prepareStatement(final String sql, final int columnIndexes[])
throws SQLException {
if (pstmtPool == null) {
return connection.prepareStatement(sql, columnIndexes);
}
try {
return pstmtPool.borrowObject(createKey(sql, columnIndexes));
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new SQLException("Borrow prepareStatement from pool failed", e);
}
}
- PreparedStatement prepareStatement(String sql, String columnNames[])
+ PreparedStatement prepareStatement(final String sql, final String columnNames[])
throws SQLException {
if (pstmtPool == null) {
return connection.prepareStatement(sql, columnNames);
}
try {
return pstmtPool.borrowObject(createKey(sql, columnNames));
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new SQLException("Borrow prepareStatement from pool failed", e);
}
}
@@ -362,15 +362,15 @@ class PooledConnectionImpl implements Po
/**
* Create a {@link PooledConnectionImpl.PStmtKey} for the given arguments.
*/
- protected PStmtKeyCPDS createKey(String sql, int autoGeneratedKeys) {
+ protected PStmtKeyCPDS createKey(final String sql, final int autoGeneratedKeys) {
return new PStmtKeyCPDS(normalizeSQL(sql), autoGeneratedKeys);
}
/**
* Create a {@link PooledConnectionImpl.PStmtKey} for the given arguments.
*/
- protected PStmtKeyCPDS createKey(String sql, int resultSetType,
- int resultSetConcurrency, int resultSetHoldability) {
+ protected PStmtKeyCPDS createKey(final String sql, final int resultSetType,
+ final int resultSetConcurrency, final int resultSetHoldability) {
return new PStmtKeyCPDS(normalizeSQL(sql), resultSetType,
resultSetConcurrency, resultSetHoldability);
}
@@ -378,22 +378,22 @@ class PooledConnectionImpl implements Po
/**
* Create a {@link PooledConnectionImpl.PStmtKey} for the given arguments.
*/
- protected PStmtKeyCPDS createKey(String sql, int columnIndexes[]) {
+ protected PStmtKeyCPDS createKey(final String sql, final int columnIndexes[]) {
return new PStmtKeyCPDS(normalizeSQL(sql), columnIndexes);
}
/**
* Create a {@link PooledConnectionImpl.PStmtKey} for the given arguments.
*/
- protected PStmtKeyCPDS createKey(String sql, String columnNames[]) {
+ protected PStmtKeyCPDS createKey(final String sql, final String columnNames[]) {
return new PStmtKeyCPDS(normalizeSQL(sql), columnNames);
}
/**
* Create a {@link PooledConnectionImpl.PStmtKey} for the given arguments.
*/
- protected PStmtKeyCPDS createKey(String sql, int resultSetType,
- int resultSetConcurrency) {
+ protected PStmtKeyCPDS createKey(final String sql, final int resultSetType,
+ final int resultSetConcurrency) {
return new PStmtKeyCPDS(normalizeSQL(sql), resultSetType,
resultSetConcurrency);
}
@@ -401,7 +401,7 @@ class PooledConnectionImpl implements Po
/**
* Create a {@link PooledConnectionImpl.PStmtKey} for the given arguments.
*/
- protected PStmtKeyCPDS createKey(String sql) {
+ protected PStmtKeyCPDS createKey(final String sql) {
return new PStmtKeyCPDS(normalizeSQL(sql));
}
@@ -409,7 +409,7 @@ class PooledConnectionImpl implements Po
* Normalize the given SQL statement, producing a
* canonical form that is semantically equivalent to the original.
*/
- protected String normalizeSQL(String sql) {
+ protected String normalizeSQL(final String sql) {
return sql.trim();
}
@@ -419,7 +419,7 @@ class PooledConnectionImpl implements Po
* @param key the key for the {@link PreparedStatement} to be created
*/
@Override
- public PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> makeObject(PStmtKeyCPDS key) throws Exception {
+ public PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> makeObject(final PStmtKeyCPDS key) throws Exception {
if (null == key) {
throw new IllegalArgumentException();
}
@@ -450,8 +450,8 @@ class PooledConnectionImpl implements Po
* @param p the wrapped {@link PreparedStatement} to be destroyed.
*/
@Override
- public void destroyObject(PStmtKeyCPDS key,
- PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> p)
+ public void destroyObject(final PStmtKeyCPDS key,
+ final PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> p)
throws Exception {
p.getObject().getInnermostDelegate().close();
}
@@ -464,8 +464,8 @@ class PooledConnectionImpl implements Po
* @return {@code true}
*/
@Override
- public boolean validateObject(PStmtKeyCPDS key,
- PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> p) {
+ public boolean validateObject(final PStmtKeyCPDS key,
+ final PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> p) {
return true;
}
@@ -476,8 +476,8 @@ class PooledConnectionImpl implements Po
* @param p ignored
*/
@Override
- public void activateObject(PStmtKeyCPDS key,
- PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> p)
+ public void activateObject(final PStmtKeyCPDS key,
+ final PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> p)
throws Exception {
p.getObject().activate();
}
@@ -489,10 +489,10 @@ class PooledConnectionImpl implements Po
* @param p a wrapped {@link PreparedStatement}
*/
@Override
- public void passivateObject(PStmtKeyCPDS key,
- PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> p)
+ public void passivateObject(final PStmtKeyCPDS key,
+ final PooledObject<PoolablePreparedStatement<PStmtKeyCPDS>> p)
throws Exception {
- PoolablePreparedStatement<PStmtKeyCPDS> ppss = p.getObject();
+ final PoolablePreparedStatement<PStmtKeyCPDS> ppss = p.getObject();
ppss.clearParameters();
ppss.passivate();
}
@@ -513,7 +513,7 @@ class PooledConnectionImpl implements Po
*
* @param allow Access to the underlying connection is granted when true.
*/
- public synchronized void setAccessToUnderlyingConnectionAllowed(boolean allow) {
+ public synchronized void setAccessToUnderlyingConnectionAllowed(final boolean allow) {
this.accessToUnderlyingConnectionAllowed = allow;
}
}
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/package-info.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/package-info.java?rev=1743727&r1=1743726&r2=1743727&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/package-info.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/cpdsadapter/package-info.java Fri May 13 19:03:42 2016
@@ -19,7 +19,7 @@
* <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
+ * adapt older <code>Driver</code> based JDBC implementations. Below is an
* example of setting up the CPDS to be available via JNDI in the
* catalina servlet container.
* </p>
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/CPDSConnectionFactory.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/CPDSConnectionFactory.java?rev=1743727&r1=1743726&r2=1743727&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/CPDSConnectionFactory.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/CPDSConnectionFactory.java Fri May 13 19:03:42 2016
@@ -89,12 +89,12 @@ class CPDSConnectionFactory
* @param username
* @param password
*/
- public CPDSConnectionFactory(ConnectionPoolDataSource cpds,
- String validationQuery,
- int validationQueryTimeout,
- boolean rollbackAfterValidation,
- String username,
- String password) {
+ public CPDSConnectionFactory(final ConnectionPoolDataSource cpds,
+ final String validationQuery,
+ final int validationQueryTimeout,
+ final boolean rollbackAfterValidation,
+ final String username,
+ final String password) {
_cpds = cpds;
_validationQuery = validationQuery;
_validationQueryTimeout = validationQueryTimeout;
@@ -117,7 +117,7 @@ class CPDSConnectionFactory
* @param pool the {@link ObjectPool} in which to pool those {@link
* Connection}s
*/
- public void setPool(ObjectPool<PooledConnectionAndInfo> pool) {
+ public void setPool(final ObjectPool<PooledConnectionAndInfo> pool) {
this._pool = pool;
}
@@ -141,7 +141,7 @@ class CPDSConnectionFactory
pc.addConnectionEventListener(this);
pci = new PooledConnectionAndInfo(pc, _username, _password);
pcMap.put(pc, pci);
- } catch (SQLException e) {
+ } catch (final SQLException e) {
throw new RuntimeException(e.getMessage());
}
return new DefaultPooledObject<>(pci);
@@ -151,26 +151,26 @@ class CPDSConnectionFactory
* Closes the PooledConnection and stops listening for events from it.
*/
@Override
- public void destroyObject(PooledObject<PooledConnectionAndInfo> p) throws Exception {
+ public void destroyObject(final PooledObject<PooledConnectionAndInfo> p) throws Exception {
doDestroyObject(p.getObject());
}
- private void doDestroyObject(PooledConnectionAndInfo pci) throws Exception{
- PooledConnection pc = pci.getPooledConnection();
+ private void doDestroyObject(final PooledConnectionAndInfo pci) throws Exception{
+ final PooledConnection pc = pci.getPooledConnection();
pc.removeConnectionEventListener(this);
pcMap.remove(pc);
pc.close();
}
@Override
- public boolean validateObject(PooledObject<PooledConnectionAndInfo> p) {
+ public boolean validateObject(final PooledObject<PooledConnectionAndInfo> p) {
try {
validateLifetime(p);
- } catch (Exception e) {
+ } catch (final Exception e) {
return false;
}
boolean valid = false;
- PooledConnection pconn = p.getObject().getPooledConnection();
+ final PooledConnection pconn = p.getObject().getPooledConnection();
Connection conn = null;
validatingSet.add(pconn);
if (null == _validationQuery) {
@@ -181,7 +181,7 @@ class CPDSConnectionFactory
try {
conn = pconn.getConnection();
valid = conn.isValid(timeout);
- } catch (SQLException e) {
+ } catch (final SQLException e) {
valid = false;
} finally {
Utils.closeQuietly(conn);
@@ -207,7 +207,7 @@ class CPDSConnectionFactory
if (_rollbackAfterValidation) {
conn.rollback();
}
- } catch (Exception e) {
+ } catch (final Exception e) {
valid = false;
} finally {
Utils.closeQuietly(rset);
@@ -220,13 +220,13 @@ class CPDSConnectionFactory
}
@Override
- public void passivateObject(PooledObject<PooledConnectionAndInfo> p)
+ public void passivateObject(final PooledObject<PooledConnectionAndInfo> p)
throws Exception {
validateLifetime(p);
}
@Override
- public void activateObject(PooledObject<PooledConnectionAndInfo> p)
+ public void activateObject(final PooledObject<PooledConnectionAndInfo> p)
throws Exception {
validateLifetime(p);
}
@@ -242,25 +242,25 @@ class CPDSConnectionFactory
* release this PooledConnection from our pool...
*/
@Override
- public void connectionClosed(ConnectionEvent event) {
- PooledConnection pc = (PooledConnection) event.getSource();
+ public void connectionClosed(final ConnectionEvent event) {
+ final PooledConnection pc = (PooledConnection) event.getSource();
// if this event occurred because we were validating, ignore it
// otherwise return the connection to the pool.
if (!validatingSet.contains(pc)) {
- PooledConnectionAndInfo pci = pcMap.get(pc);
+ final PooledConnectionAndInfo pci = pcMap.get(pc);
if (pci == null) {
throw new IllegalStateException(NO_KEY_MESSAGE);
}
try {
_pool.returnObject(pci);
- } catch (Exception e) {
+ } catch (final Exception e) {
System.err.println("CLOSING DOWN CONNECTION AS IT COULD "
+ "NOT BE RETURNED TO THE POOL");
pc.removeConnectionEventListener(this);
try {
doDestroyObject(pci);
- } catch (Exception e2) {
+ } catch (final Exception e2) {
System.err.println("EXCEPTION WHILE DESTROYING OBJECT "
+ pci);
e2.printStackTrace();
@@ -274,8 +274,8 @@ class CPDSConnectionFactory
* not to be returned in the future
*/
@Override
- public void connectionErrorOccurred(ConnectionEvent event) {
- PooledConnection pc = (PooledConnection)event.getSource();
+ public void connectionErrorOccurred(final ConnectionEvent event) {
+ final PooledConnection pc = (PooledConnection)event.getSource();
if (null != event.getSQLException()) {
System.err.println(
"CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR ("
@@ -283,13 +283,13 @@ class CPDSConnectionFactory
}
pc.removeConnectionEventListener(this);
- PooledConnectionAndInfo pci = pcMap.get(pc);
+ final PooledConnectionAndInfo pci = pcMap.get(pc);
if (pci == null) {
throw new IllegalStateException(NO_KEY_MESSAGE);
}
try {
_pool.invalidateObject(pci);
- } catch (Exception e) {
+ } catch (final Exception e) {
System.err.println("EXCEPTION WHILE DESTROYING OBJECT " + pci);
e.printStackTrace();
}
@@ -306,15 +306,15 @@ class CPDSConnectionFactory
* and connections that are checked out are closed on return.
*/
@Override
- public void invalidate(PooledConnection pc) throws SQLException {
- PooledConnectionAndInfo pci = pcMap.get(pc);
+ public void invalidate(final PooledConnection pc) throws SQLException {
+ final PooledConnectionAndInfo pci = pcMap.get(pc);
if (pci == null) {
throw new IllegalStateException(NO_KEY_MESSAGE);
}
try {
_pool.invalidateObject(pci); // Destroy instance and update pool counters
_pool.close(); // Clear any other instances in this pool and kill others as they come back
- } catch (Exception ex) {
+ } catch (final Exception ex) {
throw new SQLException("Error invalidating connection", ex);
}
}
@@ -325,7 +325,7 @@ class CPDSConnectionFactory
* @param password new password
*/
@Override
- public synchronized void setPassword(String password) {
+ public synchronized void setPassword(final String password) {
_password = password;
}
@@ -335,7 +335,7 @@ class CPDSConnectionFactory
* value of zero or less indicates an infinite lifetime. The default value
* is -1.
*/
- public void setMaxConnLifetimeMillis(long maxConnLifetimeMillis) {
+ public void setMaxConnLifetimeMillis(final long maxConnLifetimeMillis) {
this.maxConnLifetimeMillis = maxConnLifetimeMillis;
}
@@ -344,7 +344,7 @@ class CPDSConnectionFactory
* factory and closes the pool if this is the case; otherwise does nothing.
*/
@Override
- public void closePool(String username) throws SQLException {
+ public void closePool(final String username) throws SQLException {
synchronized (this) {
if (username == null || !username.equals(_username)) {
return;
@@ -352,15 +352,15 @@ class CPDSConnectionFactory
}
try {
_pool.close();
- } catch (Exception ex) {
+ } catch (final Exception ex) {
throw new SQLException("Error closing connection pool", ex);
}
}
- private void validateLifetime(PooledObject<PooledConnectionAndInfo> p)
+ private void validateLifetime(final PooledObject<PooledConnectionAndInfo> p)
throws Exception {
if (maxConnLifetimeMillis > 0) {
- long lifetime = System.currentTimeMillis() - p.getCreateTime();
+ final long lifetime = System.currentTimeMillis() - p.getCreateTime();
if (lifetime > maxConnLifetimeMillis) {
throw new Exception(Utils.getMessage(
"connectionFactory.lifetimeExceeded",
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java?rev=1743727&r1=1743726&r2=1743727&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSource.java Fri May 13 19:03:42 2016
@@ -43,7 +43,7 @@ import org.apache.tomcat.dbcp.pool2.impl
* <code>PerUserPoolDataSource</code>. 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 commons-dbcp.
+ * use of it outside of <em>commons-dbcp2</em>.
* </p>
*
* <p>
@@ -70,7 +70,7 @@ import org.apache.tomcat.dbcp.pool2.impl
* The dbcp package contains an adapter,
* {@link org.apache.tomcat.dbcp.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
+ * class with JDBC driver implementations that do not supply a
* <code>ConnectionPoolDataSource</code>, but still
* provide a {@link java.sql.Driver} implementation.
* </p>
@@ -193,12 +193,12 @@ public abstract class InstanceKeyDataSou
/* JDBC_4_ANT_KEY_BEGIN */
@Override
- public boolean isWrapperFor(Class<?> iface) throws SQLException {
+ public boolean isWrapperFor(final Class<?> iface) throws SQLException {
return false;
}
@Override
- public <T> T unwrap(Class<T> iface) throws SQLException {
+ public <T> T unwrap(final Class<T> iface) throws SQLException {
throw new SQLException("InstanceKeyDataSource is not a wrapper.");
}
/* JDBC_4_ANT_KEY_END */
@@ -226,7 +226,7 @@ public abstract class InstanceKeyDataSou
* {@link GenericKeyedObjectPoolConfig#getBlockWhenExhausted()} for each per
* user pool.
*/
- public void setDefaultBlockWhenExhausted(boolean blockWhenExhausted) {
+ public void setDefaultBlockWhenExhausted(final boolean blockWhenExhausted) {
assertInitializationAllowed();
this.defaultBlockWhenExhausted = blockWhenExhausted;
}
@@ -246,7 +246,7 @@ public abstract class InstanceKeyDataSou
* each per user pool.
*/
public void setDefaultEvictionPolicyClassName(
- String evictionPolicyClassName) {
+ final String evictionPolicyClassName) {
assertInitializationAllowed();
this.defaultEvictionPolicyClassName = evictionPolicyClassName;
}
@@ -263,7 +263,7 @@ public abstract class InstanceKeyDataSou
* Sets the default value for
* {@link GenericKeyedObjectPoolConfig#getLifo()} for each per user pool.
*/
- public void setDefaultLifo(boolean lifo) {
+ public void setDefaultLifo(final boolean lifo) {
assertInitializationAllowed();
this.defaultLifo = lifo;
}
@@ -282,7 +282,7 @@ public abstract class InstanceKeyDataSou
* {@link GenericKeyedObjectPoolConfig#getMaxIdlePerKey()} for each per user
* pool.
*/
- public void setDefaultMaxIdle(int maxIdle) {
+ public void setDefaultMaxIdle(final int maxIdle) {
assertInitializationAllowed();
this.defaultMaxIdle = maxIdle;
}
@@ -301,7 +301,7 @@ public abstract class InstanceKeyDataSou
* {@link GenericKeyedObjectPoolConfig#getMaxTotalPerKey()} for each per
* user pool.
*/
- public void setDefaultMaxTotal(int maxTotal) {
+ public void setDefaultMaxTotal(final int maxTotal) {
assertInitializationAllowed();
this.defaultMaxTotal = maxTotal;
}
@@ -320,7 +320,7 @@ public abstract class InstanceKeyDataSou
* {@link GenericKeyedObjectPoolConfig#getMaxWaitMillis()} for each per user
* pool.
*/
- public void setDefaultMaxWaitMillis(long maxWaitMillis) {
+ public void setDefaultMaxWaitMillis(final long maxWaitMillis) {
assertInitializationAllowed();
this.defaultMaxWaitMillis = maxWaitMillis;
}
@@ -340,7 +340,7 @@ public abstract class InstanceKeyDataSou
* each per user pool.
*/
public void setDefaultMinEvictableIdleTimeMillis(
- long minEvictableIdleTimeMillis) {
+ final long minEvictableIdleTimeMillis) {
assertInitializationAllowed();
this.defaultMinEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
}
@@ -359,7 +359,7 @@ public abstract class InstanceKeyDataSou
* {@link GenericKeyedObjectPoolConfig#getMinIdlePerKey()} for each per user
* pool.
*/
- public void setDefaultMinIdle(int minIdle) {
+ public void setDefaultMinIdle(final int minIdle) {
assertInitializationAllowed();
this.defaultMinIdle = minIdle;
}
@@ -378,7 +378,7 @@ public abstract class InstanceKeyDataSou
* {@link GenericKeyedObjectPoolConfig#getNumTestsPerEvictionRun()} for each
* per user pool.
*/
- public void setDefaultNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
+ public void setDefaultNumTestsPerEvictionRun(final int numTestsPerEvictionRun) {
assertInitializationAllowed();
this.defaultNumTestsPerEvictionRun = numTestsPerEvictionRun;
}
@@ -397,7 +397,7 @@ public abstract class InstanceKeyDataSou
* {@link org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool GenericObjectPool#getSoftMinEvictableIdleTimeMillis()} for each per user pool.
*/
public void setDefaultSoftMinEvictableIdleTimeMillis(
- long softMinEvictableIdleTimeMillis) {
+ final long softMinEvictableIdleTimeMillis) {
assertInitializationAllowed();
this.defaultSoftMinEvictableIdleTimeMillis = softMinEvictableIdleTimeMillis;
}
@@ -414,7 +414,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.
*/
- public void setDefaultTestOnCreate(boolean testOnCreate) {
+ public void setDefaultTestOnCreate(final boolean testOnCreate) {
assertInitializationAllowed();
this.defaultTestOnCreate = testOnCreate;
}
@@ -431,7 +431,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.
*/
- public void setDefaultTestOnBorrow(boolean testOnBorrow) {
+ public void setDefaultTestOnBorrow(final boolean testOnBorrow) {
assertInitializationAllowed();
this.defaultTestOnBorrow = testOnBorrow;
}
@@ -448,7 +448,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.
*/
- public void setDefaultTestOnReturn(boolean testOnReturn) {
+ public void setDefaultTestOnReturn(final boolean testOnReturn) {
assertInitializationAllowed();
this.defaultTestOnReturn = testOnReturn;
}
@@ -465,7 +465,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.
*/
- public void setDefaultTestWhileIdle(boolean testWhileIdle) {
+ public void setDefaultTestWhileIdle(final boolean testWhileIdle) {
assertInitializationAllowed();
this.defaultTestWhileIdle = testWhileIdle;
}
@@ -485,7 +485,7 @@ public abstract class InstanceKeyDataSou
* per user pool.
*/
public void setDefaultTimeBetweenEvictionRunsMillis (
- long timeBetweenEvictionRunsMillis ) {
+ final long timeBetweenEvictionRunsMillis ) {
assertInitializationAllowed();
this.defaultTimeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis ;
}
@@ -506,7 +506,7 @@ public abstract class InstanceKeyDataSou
*
* @param v Value to assign to connectionPoolDataSource.
*/
- public void setConnectionPoolDataSource(ConnectionPoolDataSource v) {
+ public void setConnectionPoolDataSource(final ConnectionPoolDataSource v) {
assertInitializationAllowed();
if (dataSourceName != null) {
throw new IllegalStateException(
@@ -539,7 +539,7 @@ public abstract class InstanceKeyDataSou
*
* @param v Value to assign to dataSourceName.
*/
- public void setDataSourceName(String v) {
+ public void setDataSourceName(final String v) {
assertInitializationAllowed();
if (dataSource != null) {
throw new IllegalStateException(
@@ -578,7 +578,7 @@ public abstract class InstanceKeyDataSou
*
* @param v Value to assign to defaultAutoCommit.
*/
- public void setDefaultAutoCommit(Boolean v) {
+ public void setDefaultAutoCommit(final Boolean v) {
assertInitializationAllowed();
this.defaultAutoCommit = v;
}
@@ -605,7 +605,7 @@ public abstract class InstanceKeyDataSou
*
* @param v Value to assign to defaultReadOnly.
*/
- public void setDefaultReadOnly(Boolean v) {
+ public void setDefaultReadOnly(final Boolean v) {
assertInitializationAllowed();
this.defaultReadOnly = v;
}
@@ -630,7 +630,7 @@ public abstract class InstanceKeyDataSou
*
* @param v Value to assign to defaultTransactionIsolation
*/
- public void setDefaultTransactionIsolation(int v) {
+ public void setDefaultTransactionIsolation(final int v) {
assertInitializationAllowed();
switch (v) {
case Connection.TRANSACTION_NONE:
@@ -646,7 +646,7 @@ public abstract class InstanceKeyDataSou
}
/**
- * Get the description. This property is defined by jdbc as for use with
+ * Get the description. This property is defined by JDBC as for use with
* GUI (or other) tools that might deploy the datasource. It serves no
* internal purpose.
*
@@ -657,13 +657,13 @@ public abstract class InstanceKeyDataSou
}
/**
- * Set the description. This property is defined by jdbc as for use with
+ * Set the description. This property is defined by JDBC as for use with
* GUI (or other) tools that might deploy the datasource. It serves no
* internal purpose.
*
* @param v Value to assign to description.
*/
- public void setDescription(String v) {
+ public void setDescription(final String v) {
this.description = v;
}
@@ -678,7 +678,7 @@ public abstract class InstanceKeyDataSou
*
* @return value of jndiEnvironment.
*/
- public String getJndiEnvironment(String key) {
+ public String getJndiEnvironment(final String key) {
String value = null;
if (jndiEnvironment != null) {
value = jndiEnvironment.getProperty(key);
@@ -694,7 +694,7 @@ public abstract class InstanceKeyDataSou
* @param key the JNDI environment property to set.
* @param value the value assigned to specified JNDI environment property.
*/
- public void setJndiEnvironment(String key, String value) {
+ public void setJndiEnvironment(final String key, final String value) {
if (jndiEnvironment == null) {
jndiEnvironment = new Properties();
}
@@ -709,7 +709,7 @@ public abstract class InstanceKeyDataSou
* @param properties the JNDI environment property to set which will
* overwrite any current settings
*/
- void setJndiEnvironment(Properties properties) {
+ void setJndiEnvironment(final Properties properties) {
if (jndiEnvironment == null) {
jndiEnvironment = new Properties();
} else {
@@ -732,7 +732,7 @@ public abstract class InstanceKeyDataSou
* @param v Value to assign to loginTimeout.
*/
@Override
- public void setLoginTimeout(int v) {
+ public void setLoginTimeout(final int v) {
this.loginTimeout = v;
}
@@ -754,7 +754,7 @@ public abstract class InstanceKeyDataSou
* @param v Value to assign to logWriter.
*/
@Override
- public void setLogWriter(PrintWriter v) {
+ public void setLogWriter(final PrintWriter v) {
this.logWriter = v;
}
@@ -776,7 +776,7 @@ public abstract class InstanceKeyDataSou
* one row. If not specified, connections will be validated using
* {@link Connection#isValid(int)}.
*/
- public void setValidationQuery(String validationQuery) {
+ public void setValidationQuery(final String validationQuery) {
assertInitializationAllowed();
this.validationQuery = validationQuery;
}
@@ -793,7 +793,7 @@ public abstract class InstanceKeyDataSou
*
* @param validationQueryTimeout The new timeout in seconds
*/
- public void setValidationQueryTimeout(int validationQueryTimeout) {
+ public void setValidationQueryTimeout(final int validationQueryTimeout) {
this.validationQueryTimeout = validationQueryTimeout;
}
@@ -818,7 +818,7 @@ public abstract class InstanceKeyDataSou
*
* @param rollbackAfterValidation new property value
*/
- public void setRollbackAfterValidation(boolean rollbackAfterValidation) {
+ public void setRollbackAfterValidation(final boolean rollbackAfterValidation) {
assertInitializationAllowed();
this.rollbackAfterValidation = rollbackAfterValidation;
}
@@ -840,7 +840,7 @@ public abstract class InstanceKeyDataSou
* following methods is invoked: <code>getConnection, setLogwriter,
* setLoginTimeout, getLoginTimeout, getLogWriter.</code></p>
*/
- public void setMaxConnLifetimeMillis(long maxConnLifetimeMillis) {
+ public void setMaxConnLifetimeMillis(final long maxConnLifetimeMillis) {
this.maxConnLifetimeMillis = maxConnLifetimeMillis;
}
@@ -871,7 +871,7 @@ public abstract class InstanceKeyDataSou
*
*/
@Override
- public Connection getConnection(String username, String password)
+ public Connection getConnection(final String username, final String password)
throws SQLException {
if (instanceKey == null) {
throw new SQLException("Must set the ConnectionPoolDataSource "
@@ -882,16 +882,16 @@ public abstract class InstanceKeyDataSou
PooledConnectionAndInfo info = null;
try {
info = getPooledConnectionAndInfo(username, password);
- } catch (NoSuchElementException e) {
+ } catch (final NoSuchElementException e) {
closeDueToException(info);
throw new SQLException("Cannot borrow connection from pool", e);
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
closeDueToException(info);
throw e;
- } catch (SQLException e) {
+ } catch (final SQLException e) {
closeDueToException(info);
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
closeDueToException(info);
throw new SQLException("Cannot borrow connection from pool", e);
}
@@ -900,12 +900,12 @@ public abstract class InstanceKeyDataSou
: password.equals(info.getPassword()))) { // Password on PooledConnectionAndInfo does not match
try { // See if password has changed by attempting connection
testCPDS(username, password);
- } catch (SQLException ex) {
+ } catch (final SQLException ex) {
// Password has not changed, so refuse client, but return connection to the pool
closeDueToException(info);
throw new SQLException("Given password did not match password used"
+ " to create the PooledConnection.", ex);
- } catch (javax.naming.NamingException ne) {
+ } catch (final javax.naming.NamingException ne) {
throw new SQLException(
"NamingException encountered connecting to database", ne);
}
@@ -921,16 +921,16 @@ public abstract class InstanceKeyDataSou
for (int i = 0; i < 10; i++) { // Bound the number of retries - only needed if bad instances return
try {
info = getPooledConnectionAndInfo(username, password);
- } catch (NoSuchElementException e) {
+ } catch (final NoSuchElementException e) {
closeDueToException(info);
throw new SQLException("Cannot borrow connection from pool", e);
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
closeDueToException(info);
throw e;
- } catch (SQLException e) {
+ } catch (final SQLException e) {
closeDueToException(info);
throw e;
- } catch (Exception e) {
+ } catch (final Exception e) {
closeDueToException(info);
throw new SQLException("Cannot borrow connection from pool", e);
}
@@ -947,15 +947,15 @@ public abstract class InstanceKeyDataSou
}
}
- Connection con = info.getPooledConnection().getConnection();
+ final Connection con = info.getPooledConnection().getConnection();
try {
setupDefaults(con, username);
con.clearWarnings();
return con;
- } catch (SQLException ex) {
+ } catch (final SQLException ex) {
try {
con.close();
- } catch (Exception exc) {
+ } catch (final Exception exc) {
getLogWriter().println(
"ignoring exception during close: " + exc);
}
@@ -971,11 +971,11 @@ public abstract class InstanceKeyDataSou
throws SQLException;
- private void closeDueToException(PooledConnectionAndInfo info) {
+ private void closeDueToException(final PooledConnectionAndInfo info) {
if (info != null) {
try {
info.getPooledConnection().getConnection().close();
- } catch (Exception e) {
+ } catch (final Exception e) {
// do not throw this exception because we are in the middle
// of handling another exception. But record it because
// it potentially leaks connections from the pool.
@@ -986,7 +986,7 @@ public abstract class InstanceKeyDataSou
}
protected ConnectionPoolDataSource
- testCPDS(String username, String password)
+ testCPDS(final String username, final String password)
throws javax.naming.NamingException, SQLException {
// The source of physical db connections
ConnectionPoolDataSource cpds = this.dataSource;
@@ -997,7 +997,7 @@ public abstract class InstanceKeyDataSou
} else {
ctx = new InitialContext(jndiEnvironment);
}
- Object ds = ctx.lookup(dataSourceName);
+ final Object ds = ctx.lookup(dataSourceName);
if (ds instanceof ConnectionPoolDataSource) {
cpds = (ConnectionPoolDataSource) ds;
} else {
@@ -1027,7 +1027,7 @@ public abstract class InstanceKeyDataSou
try {
conn.close();
}
- catch (SQLException e) {
+ catch (final SQLException e) {
// at least we could connect
}
}
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java?rev=1743727&r1=1743726&r2=1743727&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/InstanceKeyDataSourceFactory.java Fri May 13 19:03:42 2016
@@ -44,27 +44,27 @@ abstract class InstanceKeyDataSourceFact
private static final Map<String, InstanceKeyDataSource> instanceMap =
new ConcurrentHashMap<>();
- static synchronized String registerNewInstance(InstanceKeyDataSource ds) {
+ static synchronized String registerNewInstance(final InstanceKeyDataSource ds) {
int max = 0;
- Iterator<String> i = instanceMap.keySet().iterator();
+ final Iterator<String> i = instanceMap.keySet().iterator();
while (i.hasNext()) {
- String s = i.next();
+ final String s = i.next();
if (s != null) {
try {
max = Math.max(max, Integer.parseInt(s));
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
// no sweat, ignore those keys
}
}
}
- String instanceKey = String.valueOf(max + 1);
+ final String instanceKey = String.valueOf(max + 1);
// put a placeholder here for now, so other instances will not
// take our key. we will replace with a pool when ready.
instanceMap.put(instanceKey, ds);
return instanceKey;
}
- static void removeInstance(String key) {
+ static void removeInstance(final String key) {
if (key != null) {
instanceMap.remove(key);
}
@@ -75,7 +75,7 @@ abstract class InstanceKeyDataSourceFact
*/
public static void closeAll() throws Exception {
//Get iterator to loop over all instances of this datasource.
- Iterator<Entry<String,InstanceKeyDataSource>> instanceIterator =
+ final Iterator<Entry<String,InstanceKeyDataSource>> instanceIterator =
instanceMap.entrySet().iterator();
while (instanceIterator.hasNext()) {
instanceIterator.next().getValue().close();
@@ -89,16 +89,16 @@ abstract class InstanceKeyDataSourceFact
* or PerUserPoolDataSource
*/
@Override
- public Object getObjectInstance(Object refObj, Name name,
- Context context, Hashtable<?,?> env)
+ public Object getObjectInstance(final Object refObj, final Name name,
+ final Context context, final Hashtable<?,?> env)
throws IOException, ClassNotFoundException {
// The spec says to return null if we can't create an instance
// of the reference
Object obj = null;
if (refObj instanceof Reference) {
- Reference ref = (Reference) refObj;
+ final Reference ref = (Reference) refObj;
if (isCorrectClass(ref.getClassName())) {
- RefAddr ra = ref.get("instanceKey");
+ final RefAddr ra = ref.get("instanceKey");
if (ra != null && ra.getContent() != null) {
// object was bound to jndi via Referenceable api.
obj = instanceMap.get(ra.getContent());
@@ -116,7 +116,7 @@ abstract class InstanceKeyDataSourceFact
}
if (obj == null)
{
- InstanceKeyDataSource ds = getNewInstance(ref);
+ final InstanceKeyDataSource ds = getNewInstance(ref);
setCommonProperties(ref, ds);
obj = ds;
if (key != null)
@@ -130,8 +130,8 @@ abstract class InstanceKeyDataSourceFact
return obj;
}
- private void setCommonProperties(Reference ref,
- InstanceKeyDataSource ikds)
+ private void setCommonProperties(final Reference ref,
+ final InstanceKeyDataSource ikds)
throws IOException, ClassNotFoundException {
RefAddr ra = ref.get("dataSourceName");
@@ -146,7 +146,7 @@ abstract class InstanceKeyDataSourceFact
ra = ref.get("jndiEnvironment");
if (ra != null && ra.getContent() != null) {
- byte[] serialized = (byte[]) ra.getContent();
+ final byte[] serialized = (byte[]) ra.getContent();
ikds.setJndiEnvironment((Properties) deserialize(serialized));
}
@@ -310,7 +310,7 @@ abstract class InstanceKeyDataSourceFact
/**
* used to set some properties saved within a Reference
*/
- protected static final Object deserialize(byte[] data)
+ protected static final Object deserialize(final byte[] data)
throws IOException, ClassNotFoundException {
ObjectInputStream in = null;
try {
@@ -320,7 +320,7 @@ abstract class InstanceKeyDataSourceFact
if (in != null) {
try {
in.close();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
}
}
}
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/KeyedCPDSConnectionFactory.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/KeyedCPDSConnectionFactory.java?rev=1743727&r1=1743726&r2=1743727&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/KeyedCPDSConnectionFactory.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/dbcp/dbcp2/datasources/KeyedCPDSConnectionFactory.java Fri May 13 19:03:42 2016
@@ -84,17 +84,17 @@ class KeyedCPDSConnectionFactory
* @param rollbackAfterValidation whether a rollback should be issued after
* {@link #validateObject validating} {@link Connection}s.
*/
- public KeyedCPDSConnectionFactory(ConnectionPoolDataSource cpds,
- String validationQuery,
- int validationQueryTimeout,
- boolean rollbackAfterValidation) {
+ public KeyedCPDSConnectionFactory(final ConnectionPoolDataSource cpds,
+ final String validationQuery,
+ final int validationQueryTimeout,
+ final boolean rollbackAfterValidation) {
_cpds = cpds;
_validationQuery = validationQuery;
_validationQueryTimeout = validationQueryTimeout;
_rollbackAfterValidation = rollbackAfterValidation;
}
- public void setPool(KeyedObjectPool<UserPassKey,PooledConnectionAndInfo> pool) {
+ public void setPool(final KeyedObjectPool<UserPassKey,PooledConnectionAndInfo> pool) {
this._pool = pool;
}
@@ -115,13 +115,13 @@ class KeyedCPDSConnectionFactory
* @see org.apache.tomcat.dbcp.pool2.KeyedPooledObjectFactory#makeObject(java.lang.Object)
*/
@Override
- public synchronized PooledObject<PooledConnectionAndInfo> makeObject(UserPassKey upkey)
+ public synchronized PooledObject<PooledConnectionAndInfo> makeObject(final UserPassKey upkey)
throws Exception {
PooledConnectionAndInfo pci = null;
PooledConnection pc = null;
- String username = upkey.getUsername();
- String password = upkey.getPassword();
+ final String username = upkey.getUsername();
+ final String password = upkey.getPassword();
if (username == null) {
pc = _cpds.getPooledConnection();
} else {
@@ -145,9 +145,9 @@ class KeyedCPDSConnectionFactory
* Closes the PooledConnection and stops listening for events from it.
*/
@Override
- public void destroyObject(UserPassKey key, PooledObject<PooledConnectionAndInfo> p)
+ public void destroyObject(final UserPassKey key, final PooledObject<PooledConnectionAndInfo> p)
throws Exception {
- PooledConnection pc = p.getObject().getPooledConnection();
+ final PooledConnection pc = p.getObject().getPooledConnection();
pc.removeConnectionEventListener(this);
pcMap.remove(pc);
pc.close();
@@ -162,15 +162,15 @@ class KeyedCPDSConnectionFactory
* @return true if validation succeeds
*/
@Override
- public boolean validateObject(UserPassKey key,
- PooledObject<PooledConnectionAndInfo> p) {
+ public boolean validateObject(final UserPassKey key,
+ final PooledObject<PooledConnectionAndInfo> p) {
try {
validateLifetime(p);
- } catch (Exception e) {
+ } catch (final Exception e) {
return false;
}
boolean valid = false;
- PooledConnection pconn = p.getObject().getPooledConnection();
+ final PooledConnection pconn = p.getObject().getPooledConnection();
Connection conn = null;
validatingSet.add(pconn);
if (null == _validationQuery) {
@@ -181,7 +181,7 @@ class KeyedCPDSConnectionFactory
try {
conn = pconn.getConnection();
valid = conn.isValid(timeout);
- } catch (SQLException e) {
+ } catch (final SQLException e) {
valid = false;
} finally {
Utils.closeQuietly(conn);
@@ -207,7 +207,7 @@ class KeyedCPDSConnectionFactory
if (_rollbackAfterValidation) {
conn.rollback();
}
- } catch(Exception e) {
+ } catch(final Exception e) {
valid = false;
} finally {
Utils.closeQuietly(rset);
@@ -220,14 +220,14 @@ class KeyedCPDSConnectionFactory
}
@Override
- public void passivateObject(UserPassKey key,
- PooledObject<PooledConnectionAndInfo> p) throws Exception {
+ public void passivateObject(final UserPassKey key,
+ final PooledObject<PooledConnectionAndInfo> p) throws Exception {
validateLifetime(p);
}
@Override
- public void activateObject(UserPassKey key,
- PooledObject<PooledConnectionAndInfo> p) throws Exception {
+ public void activateObject(final UserPassKey key,
+ final PooledObject<PooledConnectionAndInfo> p) throws Exception {
validateLifetime(p);
}
@@ -242,25 +242,25 @@ class KeyedCPDSConnectionFactory
* release this PooledConnection from our pool...
*/
@Override
- public void connectionClosed(ConnectionEvent event) {
- PooledConnection pc = (PooledConnection)event.getSource();
+ public void connectionClosed(final ConnectionEvent event) {
+ final PooledConnection pc = (PooledConnection)event.getSource();
// if this event occurred because we were validating, or if this
// connection has been marked for removal, ignore it
// otherwise return the connection to the pool.
if (!validatingSet.contains(pc)) {
- PooledConnectionAndInfo pci = pcMap.get(pc);
+ final PooledConnectionAndInfo pci = pcMap.get(pc);
if (pci == null) {
throw new IllegalStateException(NO_KEY_MESSAGE);
}
try {
_pool.returnObject(pci.getUserPassKey(), pci);
- } catch (Exception e) {
+ } catch (final Exception e) {
System.err.println("CLOSING DOWN CONNECTION AS IT COULD " +
"NOT BE RETURNED TO THE POOL");
pc.removeConnectionEventListener(this);
try {
_pool.invalidateObject(pci.getUserPassKey(), pci);
- } catch (Exception e3) {
+ } catch (final Exception e3) {
System.err.println("EXCEPTION WHILE DESTROYING OBJECT " +
pci);
e3.printStackTrace();
@@ -274,8 +274,8 @@ class KeyedCPDSConnectionFactory
* not to be returned in the future
*/
@Override
- public void connectionErrorOccurred(ConnectionEvent event) {
- PooledConnection pc = (PooledConnection)event.getSource();
+ public void connectionErrorOccurred(final ConnectionEvent event) {
+ final PooledConnection pc = (PooledConnection)event.getSource();
if (null != event.getSQLException()) {
System.err
.println("CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR (" +
@@ -283,13 +283,13 @@ class KeyedCPDSConnectionFactory
}
pc.removeConnectionEventListener(this);
- PooledConnectionAndInfo info = pcMap.get(pc);
+ final PooledConnectionAndInfo info = pcMap.get(pc);
if (info == null) {
throw new IllegalStateException(NO_KEY_MESSAGE);
}
try {
_pool.invalidateObject(info.getUserPassKey(), info);
- } catch (Exception e) {
+ } catch (final Exception e) {
System.err.println("EXCEPTION WHILE DESTROYING OBJECT " + info);
e.printStackTrace();
}
@@ -307,16 +307,16 @@ class KeyedCPDSConnectionFactory
* are not affected and they will not be automatically closed on return to the pool.
*/
@Override
- public void invalidate(PooledConnection pc) throws SQLException {
- PooledConnectionAndInfo info = pcMap.get(pc);
+ public void invalidate(final PooledConnection pc) throws SQLException {
+ final PooledConnectionAndInfo info = pcMap.get(pc);
if (info == null) {
throw new IllegalStateException(NO_KEY_MESSAGE);
}
- UserPassKey key = info.getUserPassKey();
+ final UserPassKey key = info.getUserPassKey();
try {
_pool.invalidateObject(key, info); // Destroy and update pool counters
_pool.clear(key); // Remove any idle instances with this key
- } catch (Exception ex) {
+ } catch (final Exception ex) {
throw new SQLException("Error invalidating connection", ex);
}
}
@@ -325,7 +325,7 @@ class KeyedCPDSConnectionFactory
* Does nothing. This factory does not cache user credentials.
*/
@Override
- public void setPassword(String password) {
+ public void setPassword(final String password) {
}
/**
@@ -334,7 +334,7 @@ class KeyedCPDSConnectionFactory
* value of zero or less indicates an infinite lifetime. The default value
* is -1.
*/
- public void setMaxConnLifetimeMillis(long maxConnLifetimeMillis) {
+ public void setMaxConnLifetimeMillis(final long maxConnLifetimeMillis) {
this.maxConnLifetimeMillis = maxConnLifetimeMillis;
}
@@ -344,18 +344,18 @@ class KeyedCPDSConnectionFactory
* with the given user. This method is not currently used.
*/
@Override
- public void closePool(String username) throws SQLException {
+ public void closePool(final String username) throws SQLException {
try {
_pool.clear(new UserPassKey(username, null));
- } catch (Exception ex) {
+ } catch (final Exception ex) {
throw new SQLException("Error closing connection pool", ex);
}
}
- private void validateLifetime(PooledObject<PooledConnectionAndInfo> p)
+ private void validateLifetime(final PooledObject<PooledConnectionAndInfo> p)
throws Exception {
if (maxConnLifetimeMillis > 0) {
- long lifetime = System.currentTimeMillis() - p.getCreateTime();
+ final long lifetime = System.currentTimeMillis() - p.getCreateTime();
if (lifetime > maxConnLifetimeMillis) {
throw new Exception(Utils.getMessage(
"connectionFactory.lifetimeExceeded",
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org