Обсуждение: Connection pooling question

Поиск
Список
Период
Сортировка

Connection pooling question

От
Didrik Pinte
Дата:
Hi,

I'm using the Connection Pooling implementation of Postgres JDBC driver.
Wich object should I use if I'm using the jakarta DBCP tools for Tomcat ?

Should I use org.postgresql.jdbc2.optional.PoolingDataSource or
org.postgresql.jdbc2.optional.ConnectionPool ?

I've read the comments at the beginning of ConnectionPool.java :

  * PostgreSQL implementation of ConnectionPoolDataSource.  The app server or
  * middleware vendor should provide a DataSource implementation that takes
advantage
  * of this ConnectionPoolDataSource.  If not, you can use the PostgreSQL
implementation
  * known as PoolingDataSource, but that should only be used if your server
or middleware
  * vendor does not provide their own. Why? The server may want to reuse
the same
  * Connection across all EJBs requesting a Connection within the same
Transaction, or
  * provide other similar advanced features.

Is jakarta DBCP a middleware providing the DataSource implementation for
Tomcat ?

Is is possible that the problems of "connection reset by peer" that I had
was related to the use of PoolingDataSource with DBCP ?

Thank you for any help

Didrik Pinte
Adhoc Solutions



**** DISCLAIMER ****
This e-mail and any attachments thereto may contain information
which is confidential and/or protected by intellectual property
rights and are intended for the sole use of the recipient(s) named above.
Any use of the information contained herein (including, but not limited to,
total or partial reproduction, communication or distribution in any form)
by persons other than the designated recipient(s) is prohibited.
If you have received this e-mail in error, please notify the sender
and delete the material from any computer.
Thank you for your cooperation.



Re: Connection pooling question

От
Dave Cramer
Дата:
Didrik,

the connection problems are likely due to a firewall between you and the
database, nothing can be done about this except remove the firewall, or
put code in your application to cycle through the connections and do
some housekeeping selects like select version()

Dave
On Wed, 2003-02-05 at 09:55, Didrik Pinte wrote:
> Hi,
>
> I'm using the Connection Pooling implementation of Postgres JDBC driver.
> Wich object should I use if I'm using the jakarta DBCP tools for Tomcat ?
>
> Should I use org.postgresql.jdbc2.optional.PoolingDataSource or
> org.postgresql.jdbc2.optional.ConnectionPool ?
>
> I've read the comments at the beginning of ConnectionPool.java :
>
>   * PostgreSQL implementation of ConnectionPoolDataSource.  The app server or
>   * middleware vendor should provide a DataSource implementation that takes
> advantage
>   * of this ConnectionPoolDataSource.  If not, you can use the PostgreSQL
> implementation
>   * known as PoolingDataSource, but that should only be used if your server
> or middleware
>   * vendor does not provide their own. Why? The server may want to reuse
> the same
>   * Connection across all EJBs requesting a Connection within the same
> Transaction, or
>   * provide other similar advanced features.
>
> Is jakarta DBCP a middleware providing the DataSource implementation for
> Tomcat ?
>
> Is is possible that the problems of "connection reset by peer" that I had
> was related to the use of PoolingDataSource with DBCP ?
>
> Thank you for any help
>
> Didrik Pinte
> Adhoc Solutions
>
>
>
> **** DISCLAIMER ****
> This e-mail and any attachments thereto may contain information
> which is confidential and/or protected by intellectual property
> rights and are intended for the sole use of the recipient(s) named above.
> Any use of the information contained herein (including, but not limited to,
> total or partial reproduction, communication or distribution in any form)
> by persons other than the designated recipient(s) is prohibited.
> If you have received this e-mail in error, please notify the sender
> and delete the material from any computer.
> Thank you for your cooperation.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
Dave Cramer <Dave@micro-automation.net>