[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Re: ConnectionPool JDBC vs. DBCP
From:       Christopher Schultz <chris () christopherschultz ! net>
Date:       2024-02-16 15:30:07
Message-ID: 5a51b7ad-56f4-4f96-8ce1-293d97462baa () christopherschultz ! net
[Download RAW message or body]

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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic