Re: embeded tomcat and correct DataSource.

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: embeded tomcat and correct DataSource.
Дата
Msg-id CADK3HHLpCNvcZPSd0skQ2v1d5h5rH_cMeXw5BMBAmSMCFLDA2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: embeded tomcat and correct DataSource.  (Rob Bygrave <robin.bygrave@gmail.com>)
Ответы Re: embeded tomcat and correct DataSource.  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-jdbc

On Tue, 17 Nov 2020 at 17:57, Rob Bygrave <robin.bygrave@gmail.com> wrote:
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.


Rob,

Thanks for catching this. I mis-read the question.

Rob is correct! Do not use the PGPooling source for anything. It is really there for completeness. There are so many other good pooling implementations it just does not make sense for us to re-implement one.
 

Dave Cramer
www.postgres.rocks



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 по дате отправления:

Предыдущее
От: Rob Bygrave
Дата:
Сообщение: Re: embeded tomcat and correct DataSource.
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: embeded tomcat and correct DataSource.