Bug 64106 - Attributes marked as un-used are being used in Tomcat dbcp implementation
Summary: Attributes marked as un-used are being used in Tomcat dbcp implementation
Alias: None
Product: Tomcat 9
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 9.0.x
Hardware: PC All
: P2 normal (vote)
Target Milestone: -----
Assignee: Tomcat Developers Mailing List
URL: https://tomcat.apache.org/tomcat-9.0-...
Depends on:
Reported: 2020-01-30 17:07 UTC by tarun.kalra
Modified: 2020-02-01 17:49 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description tarun.kalra 2020-01-30 17:07:54 UTC
Attribute "poolPreparedStatements" and "maxOpenPreparedStatements" are marked as un-used but are being used in Tomcat dbcp implementation.

This leads to confusion.
Comment 1 Mark Thomas 2020-01-30 17:41:03 UTC
You are mixing up tomcat-jdbc and tomcat-dbcp.

Tomcat JDBC is Tomcat's "home grown" database connection pooling and does not use poolPreparedStatements

Tomcat DBCP is Tomcat's package renamed fork of Apache Commons DBCP 2.

Tomcat DBCP is used by default.
Comment 2 tarun.kalra 2020-01-30 17:47:07 UTC
See the "Common Attributes" heading in the documentation link.

It says "These attributes are shared between commons-dbcp and tomcat-jdbc-pool, in some cases default values are different."

This is clearly talking about dbcp attributes.
Comment 3 Mark Thomas 2020-01-30 18:37:18 UTC
That is the doc for tomcat-jdbc.

The doc states tomcat-jdbc does not use those attributes.

This is correct.
Comment 4 tarun.kalra 2020-01-31 11:36:32 UTC
Mark, can you please point me to the dbcp documentation for that version ? Thank You.
Comment 5 Christopher Schultz 2020-01-31 18:45:49 UTC
It's commons-dbcp. Google is your friend.

Comment 6 tarun.kalra 2020-02-01 13:30:42 UTC
Thank You Chris for pointing me to the commons-dbcp.

I was curious about the documentation of tomcat-dbcp. Since there are quite a bit of changes in tomcat-dbcp vs commons-dbcp. I was hoping to find documentation which is relevant to tomcat-dbcp and not the one it was copied from.

Anyways, It makes me believe none exists for tomcat-dbcp specifically.

Thanks Again.
Comment 7 Christopher Schultz 2020-02-01 17:49:29 UTC
If you are looking for some specific information, please post to the users' mailing list with a question. Based on what you've said so far, are you just asking whether prepared statements are pooled? (Please reply/post to the list if this is your question.)