The first code block in
http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/package-summary.html#package_description
has two compilation errors with DBCP 1.2.1.
Here is the code block:
GenericObjectPool connectionPool = new
GenericObjectPool(null);
DriverManagerConnectionFactory connectionFactory = new
DriverConnectionFactory("jdbc:some:connect:string",null);
PoolableConnectionFactory poolableConnectionFactory =
new
PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
PoolingDataSource dataSource = new
PoolingDataSource(connectionPool);
and here is the compilation error:
compile:
[echo] Compiling with java version 1.4 using
jikes
[javac] 50. DriverManagerConnectionFactory
connectionFactory = new
DriverConnectionFactory("jdbc:some:connect:string",null);
[javac]
^------------------------------------------------------------------------------^
[javac] *** Semantic Error: The type of the right
sub-expression,
"org.apache.commons.dbcp.DriverConnectionFactory", is
not assignable to the variable, of type
"org.apache.commons.dbcp.DriverManagerConnectionFactory".
[javac] 50. DriverManagerConnectionFactory
connectionFactory = new
DriverConnectionFactory("jdbc:some:connect:string",null);
[javac]
^----------------------------------------------------------^
[javac] *** Semantic Error: No applicable overload
was found for a constructor of type
"org.apache.commons.dbcp.DriverConnectionFactory".
Perhaps you wanted the overloaded version
"DriverConnectionFactory(java.sql.Driver $1,
java.lang.String $2, java.util.Properties $3);"
instead?
The source for this javadoc is at
src/java/org/apache/commons/dbcp/package.html
I'd fix it myself, but since I'm brand new to DBCP it
would be better to have someone more experienced fix
it.
Thanks,
Tim
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]