You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2003/12/26 14:33:34 UTC
cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp PoolingDriver.java
dirkv 2003/12/26 05:33:33
Modified: dbcp/src/java/org/apache/commons/dbcp PoolingDriver.java
Log:
Bugzilla Bug 25067: Please give possibility to acecss ObjectPools from PoolingDriver or at least un-deprecate PoolingDriver.getPool()
- add requested method getPoolNames()
Revision Changes Path
1.9 +9 -3 jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolingDriver.java
Index: PoolingDriver.java
===================================================================
RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolingDriver.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- PoolingDriver.java 10 Nov 2003 14:26:19 -0000 1.8
+++ PoolingDriver.java 26 Dec 2003 13:33:33 -0000 1.9
@@ -70,6 +70,7 @@
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Properties;
+import java.util.Set;
import org.apache.commons.jocl.JOCLContentHandler;
import org.apache.commons.pool.ObjectPool;
@@ -164,6 +165,11 @@
throw new SQLNestedException("Error closing pool " + name, e);
}
}
+ }
+
+ public synchronized String[] getPoolNames() throws SQLException{
+ Set names = _pools.keySet();
+ return (String[]) names.toArray(new String[names.size()]);
}
public boolean acceptsURL(String url) throws SQLException {
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org