[
https://issues.apache.org/jira/browse/DBCP-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16108227#comment-16108227
]
Gary Gregory commented on DBCP-477:
-----------------------------------
Thank you for your report.
Would you mind providing a PR (https://github.com/apache/commons-dbcp) or patch
to fix this?
Thank you!
Gary
> 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
> Reporter: Steve Cohen
> Priority: Minor
>
> 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
(v6.4.14#64029)