Re: embeded tomcat and correct DataSource.

Поиск
Список
Период
Сортировка
От Rob Bygrave
Тема Re: embeded tomcat and correct DataSource.
Дата
Msg-id CAC=ts-HbFEfi6JH59Vd_r_Wqpu00P9zcoSd48vYJVtdVwxBTMA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: embeded tomcat and correct DataSource.  (Dave Cramer <davecramer@postgres.rocks>)
Ответы Re: embeded tomcat and correct DataSource.  (Dave Cramer <davecramer@postgres.rocks>)
Список 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 по дате отправления:

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