[
https://issues.apache.org/jira/browse/DBCP-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved DBCP-477.
----------------------------------
Fix Version/s: 2.11.1
Resolution: Fixed
> Documentation out of date and confusing
> ---------------------------------------
>
> Key: DBCP-477
> URL: https://issues.apache.org/jira/browse/DBCP-477
> Project: Commons DBCP
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Steve Cohen
> Priority: Minor
> Fix For: 2.11.1
>
>
> The DBCP package description page
> ([https://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp2/package-summary.html#package_description])
> is referred to from the Overview page
> as containing important information on usage of the package.
> The following sample code is provided there:
> {noformat}
> GenericObjectPool connectionPool = new GenericObjectPool(null);
> ConnectionFactory connectionFactory = new
> DriverManagerConnectionFactory("jdbc:some:connect:string", "username",
> "password");
> PoolableConnectionFactory poolableConnectionFactory = new
> PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
> PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
> {noformat}
> This is out of date: the six argument constructor for
> PoolableConnectionFactory has been removed. Additionally, even if the
> correct constructor is used, nothing connects the PortableConnectionFactory
> created on the third line with the pool.
> There is a much better sample at
> [https://git-wip-us.apache.org/repos/asf?p=commons-dbcp.git;a=blob;f=doc/PoolingDataSourceExample.java;h=2a12c74898930b9623223db1597b8a8052a6f1df;hb=56deeaf5ccbbee5081dbcce374685f4399d71bd5]
> However this should be accessible from any of several "examples" links on the
> site, all of which are broken.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)