Re: keeping Connection alive

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: keeping Connection alive
Дата
Msg-id 4B26EF18.9060606@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: keeping Connection alive  (Andreas <ml@3.141592654.de>)
Список pgsql-jdbc
On 14/12/2009 10:53 PM, Andreas wrote:

> I'm not sure how to do this, because AFAIK a DataSource implementation does not have a method for invalidating the
Connection.How to do this when implementing against standard interfaces? 

OK, after a little more reading it's clear that if you're using the
basic javax.sql.DataSource there's no pooling and you just close dead
connections and open new ones.

If you're using javax.sql.ConnectionPoolDataSource, you'll need to
inform the connection pool that the connection is dead. How to do so
depends on the connection pool you're using, so you'd need to provide
more information. In general, it seems to end up with the connection
pool calling close() on the PooledConnection associated with the problem
connection.

See:
   http://java.sun.com/javase/6/docs/api/javax/sql/PooledConnection.html

--
Craig Ringer

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: keeping Connection alive
Следующее
От: Viktor Usunov
Дата:
Сообщение: Bulgarian translation for the PostgreSQL JDBC driver