You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2014/01/11 20:19:05 UTC
svn commit: r1557437 -
/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
Author: markt
Date: Sat Jan 11 19:19:05 2014
New Revision: 1557437
URL: http://svn.apache.org/r1557437
Log:
Remove unused code. Note that maxActive was originally meaningless because the pool was configured to grow when exhausted.
Modified:
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java?rev=1557437&r1=1557436&r2=1557437&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java Sat Jan 11 19:19:05 2014
@@ -118,7 +118,6 @@ public class DriverAdapterCPDS
// PreparedStatement pool properties
private boolean poolPreparedStatements;
- private int maxActive = 10;
private int maxIdle = 10;
private int _timeBetweenEvictionRunsMillis = -1;
private int _numTestsPerEvictionRun = -1;
@@ -250,8 +249,6 @@ public class DriverAdapterCPDS
ref.add(new StringRefAddr("poolPreparedStatements",
String.valueOf(isPoolPreparedStatements())));
- ref.add(new StringRefAddr("maxActive",
- String.valueOf(getMaxActive())));
ref.add(new StringRefAddr("maxIdle",
String.valueOf(getMaxIdle())));
ref.add(new StringRefAddr("timeBetweenEvictionRunsMillis",
@@ -310,11 +307,6 @@ public class DriverAdapterCPDS
setPoolPreparedStatements(Boolean.valueOf(
ra.getContent().toString()).booleanValue());
}
- ra = ref.get("maxActive");
- if (ra != null && ra.getContent() != null) {
- setMaxActive(Integer.parseInt(ra.getContent().toString()));
- }
-
ra = ref.get("maxIdle");
if (ra != null && ra.getContent() != null) {
setMaxIdle(Integer.parseInt(ra.getContent().toString()));
@@ -561,25 +553,6 @@ public class DriverAdapterCPDS
}
/**
- * The maximum number of active statements that can be allocated from
- * this pool at the same time, or non-positive for no limit.
- */
- public int getMaxActive() {
- return (this.maxActive);
- }
-
- /**
- * The maximum number of active statements that can be allocated from
- * this pool at the same time, or non-positive for no limit.
- * @param maxActive the maximum number of concurrent active statements allowed
- * @throws IllegalStateException if {@link #getPooledConnection()} has been called
- */
- public void setMaxActive(int maxActive) {
- assertInitializationAllowed();
- this.maxActive = maxActive;
- }
-
- /**
* 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