Author: markt
Date: Sat Jan 11 19:55:42 2014
New Revision: 1557453
URL: http://svn.apache.org/r1557453
Log:
DBCP-400.
Correct the documentation for the maxOpenPreparedStatements parameter and
review the use of the phrase non-positive throughout the documentation and
javadoc, replacing it with negative where that is the correct definition to use.
Modified:
commons/proper/dbcp/trunk/src/changes/changes.xml
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml
Modified: commons/proper/dbcp/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/changes/changes.xml?rev=1557453&r1=1557452&r2=1557453&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/changes/changes.xml (original)
+++ commons/proper/dbcp/trunk/src/changes/changes.xml Sat Jan 11 19:55:42 2014
@@ -89,6 +89,12 @@ The <action> type attribute can be add,u
</action>
</release>
<release version="1.5.1" date="TBD" description="TBD">
+ <action dev="markt" issue="DBCP-400" type="fix">
+ Correct the documentation for the maxOpenPreparedStatements parameter
+ and review the use of the phrase non-positive throughout the
+ documentation and javadoc, replacing it with negative where that is the
+ correct definition to use.
+ </action>
<action dev="markt" issue="DBCP-405" type="fix">
Avoid multiple calls to Connection.getAutoCommit() in
PoolableConnectionFactory.passivateObject() as it could be an expensive
Modified:
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
URL:
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java?rev=1557453&r1=1557452&r2=1557453&view=diff
==============================================================================
---
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
(original)
+++
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
Sat Jan 11 19:55:42 2014
@@ -599,7 +599,7 @@ public class BasicDataSource
/**
* <p>The maximum number of open statements that can be allocated from
- * the statement pool at the same time, or non-positive for no limit.
Since
+ * the statement pool at the same time, or negative for no limit. Since
* a connection usually only uses one or two statements at a time, this is
* mostly used to help detect resource leaks.</p>
*
@@ -1223,7 +1223,7 @@ public class BasicDataSource
}
private String jmxName = null;
-
+
/**
* Returns the JMX name that has been requested for this DataSource. If the
* requested name is not valid, an alternative may be chosen.
@@ -2085,7 +2085,7 @@ public class BasicDataSource
* Actual name under which this component has been registered.
*/
private ObjectName registeredJmxName = null;
-
+
private void jmxRegister() {
// Return immediately if this DataSource has already been registered
if (registeredJmxName != null) {
@@ -2104,7 +2104,7 @@ public class BasicDataSource
"] was not valid and will be ignored.");
return;
}
-
+
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
try {
mbs.registerMBean(this, oname);
@@ -2145,7 +2145,7 @@ public class BasicDataSource
public void postDeregister() {
// NO-OP
}
-
+
private void updateJmxName(GenericObjectPoolConfig config) {
if (registeredJmxName == null) {
return;
@@ -2155,7 +2155,7 @@ public class BasicDataSource
config.setJmxNameBase(base.toString());
config.setJmxNamePrefix("connections");
}
-
+
protected ObjectName getRegisteredJmxName() {
return registeredJmxName;
}
Modified:
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
URL:
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java?rev=1557453&r1=1557452&r2=1557453&view=diff
==============================================================================
---
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
(original)
+++
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
Sat Jan 11 19:55:42 2014
@@ -108,7 +108,7 @@ public class PerUserPoolDataSource exten
/**
* The maximum number of active connections that can be allocated from
- * this pool at the same time, or non-positive for no limit.
+ * this pool at the same time, or negative for no limit.
* This value is used for any username which is not specified
* in perUserMaxConnections.
*/
@@ -118,7 +118,7 @@ public class PerUserPoolDataSource exten
/**
* The maximum number of active connections that can be allocated from
- * this pool at the same time, or non-positive for no limit.
+ * this pool at the same time, or negative for no limit.
* This value is used for any username which is not specified
* in perUserMaxConnections. The default is 8.
*/
@@ -246,7 +246,7 @@ public class PerUserPoolDataSource exten
/**
* The maximum number of active connections that can be allocated from
- * this pool at the same time, or non-positive for no limit.
+ * this pool at the same time, or negative for no limit.
* The keys are usernames and the value is the maximum connections. Any
* username specified here will override the value of defaultMaxTotal.
*/
@@ -260,7 +260,7 @@ public class PerUserPoolDataSource exten
/**
* The maximum number of active connections that can be allocated from
- * this pool at the same time, or non-positive for no limit.
+ * this pool at the same time, or negative for no limit.
* The keys are usernames and the value is the maximum connections. Any
* username specified here will override the value of defaultMaxTotal.
*/
Modified:
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
URL:
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java?rev=1557453&r1=1557452&r2=1557453&view=diff
==============================================================================
---
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
(original)
+++
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
Sat Jan 11 19:55:42 2014
@@ -83,7 +83,7 @@ public class SharedPoolDataSource
/**
* The maximum number of active connections that can be allocated from
- * this pool at the same time, or non-positive for no limit.
+ * this pool at the same time, or negative for no limit.
*/
public int getMaxTotal() {
return (this.maxTotal);
@@ -91,7 +91,7 @@ public class SharedPoolDataSource
/**
* The maximum number of active connections that can be allocated from
- * this pool at the same time, or non-positive for no limit.
+ * this pool at the same time, or negative for no limit.
* The default is 8.
*/
public void setMaxTotal(int maxTotal) {
Modified: commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml
URL:
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml?rev=1557453&r1=1557452&r2=1557453&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml (original)
+++ commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml Sat Jan 11
19:55:42 2014
@@ -309,7 +309,7 @@ one row.
<td>unlimited</td>
<td>
The maximum number of open statements that can be allocated from
- the statement pool at the same time, or zero for no limit.
+ the statement pool at the same time, or negative for no limit.
</td>
</tr>
</table>