From: | Dave Cramer <davecramer(at)postgres(dot)rocks> |
---|---|
To: | Rob Bygrave <robin(dot)bygrave(at)gmail(dot)com> |
Cc: | Rob Sargent <robjsargent(at)gmail(dot)com>, "pgsql-jdbc(at)lists(dot)postgresql(dot)org" <pgsql-jdbc(at)lists(dot)postgresql(dot)org> |
Subject: | Re: embeded tomcat and correct DataSource. |
Date: | 2020-11-17 23:04:24 |
Message-ID: | CADK3HHLpCNvcZPSd0skQ2v1d5h5rH_cMeXw5BMBAmSMCFLDA2g@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Tue, 17 Nov 2020 at 17:57, Rob Bygrave <robin(dot)bygrave(at)gmail(dot)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(at)postgres(dot)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(at)gmail(dot)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.
>>>
>>>
>>>
>>
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2020-11-17 23:15:37 | Re: embeded tomcat and correct DataSource. |
Previous Message | Rob Bygrave | 2020-11-17 22:57:25 | Re: embeded tomcat and correct DataSource. |