Andreas,

On 2/16/24 02:21, Döscher, Andreas (ESI) wrote:
Moin,
in the docpage https://tomcat.apache.org/tomcat-10.1-doc/jdbc-pool.html it says

The JDBC Connection Pool org.apache.tomcat.jdbc.pool is a replacement or an 
alternative to the Apache Commons DBCP connection pool.

So why do we need a new connection pool?

Here are a few of the reasons:

    Commons DBCP 1.x is single threaded. In order to be thread safe Commons 
locks the entire pool for short periods during both object allocation and 
object return. Note that this does not apply to Commons DBCP 2.x.
[...snip...]

I thought that Tomcat uses DBCP 2.x per default, is this document still 
relevant or is it outdated?

Recent versions of Tomcat do indeed use DBCP2.

You are reading the documentation for the pool itself, which is justifying the reason it was developed in the first place, back when Tomcat shipped with DBCP1. DBCP2 was created for many of the same reasons tomcat-pool was created, just on different schedules.

This document could be updated to make it clear that the comparison of tomcat-pool against DBCP1 is a historical comparison, and that Tomcat now uses DBCP2 by default which does not suffer from the same problems tomcat-pool was designed to address.

There are some significant architectural and feature differences between DBCP2 and tomcat-pool which is why we haven't shut the sub-project down.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to