Re: embeded tomcat and correct DataSource. - Mailing list pgsql-jdbc

From Rob Bygrave
Subject Re: embeded tomcat and correct DataSource.
Date
Msg-id CAC=ts-HbFEfi6JH59Vd_r_Wqpu00P9zcoSd48vYJVtdVwxBTMA@mail.gmail.com
Whole thread Raw
In response to Re: embeded tomcat and correct DataSource.  (Dave Cramer <davecramer@postgres.rocks>)
Responses Re: embeded tomcat and correct DataSource.
List pgsql-jdbc
Hi,

Sorry I'm probably mis-interpreting your question.  Hopefully the comments below are useful.


I should use the PGConnectionPoolDataSource if I wish to use Apache connection pool mechanism.

In short, I'm pretty sure the answer is no.

The longer answer is, PGPoolingDataSource is the DataSource implementation provided in pgjdbc. PGPoolingDataSource is deprecated with the comment below and noting that PGPoolingDataSource uses PGConnectionPoolDataSource (as an implementation detail).  We could think of PGConnectionPoolDataSource as part of the DataSource implementation provided with postgresql jdbc driver that is marked as deprecated (with the suggestion that we migrate to any other third party DataSource implementation). 

* @deprecated Since 42.0.0, instead of this class you should use a fully featured connection pool
* like HikariCP, vibur-dbcp, commons-dbcp, c3p0, etc.
 


Any third party javax.sql.DataSource implementation would be extremely unlikely to use anything in the org.postgresql.ds package including PGConnectionPoolDataSource.



Cheers, Rob.


On Wed, 18 Nov 2020 at 11:15, Dave Cramer <davecramer@postgres.rocks> wrote:
I haven't setup an embedded tomcat in a while. I'd like to know the answer as well.

Any reason you aren't using something like quarkus ?

Dave Cramer
www.postgres.rocks


On Mon, 16 Nov 2020 at 12:05, Rob Sargent <robjsargent@gmail.com> wrote:

Asking for confirmation that, when using an embedded tomcat instance, I should use the PGConnectionPoolDataSource if I wish to use Apache connection pool mechanism.

 

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: embeded tomcat and correct DataSource.
Next
From: Dave Cramer
Date:
Subject: Re: embeded tomcat and correct DataSource.