[PATCH] Support for ping method.

Поиск
Список
Период
Сортировка
От Michael Barker
Тема [PATCH] Support for ping method.
Дата
Msg-id 1144305529.2955.11.camel@corona
обсуждение исходный текст
Ответы Re: [PATCH] Support for ping method.  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Hi,

Attached is a patch that adds support for a ping method on the
AbstractJdbc2Connection.  This is useful for JBoss (and other
containers) where the container needs to check if the connection is
alive before passing it to the caller.  Currently JBoss does a "SELECT
1", but using the new ping method there is a boost in performance.
Opening and closing 1000 connections from a datasource:

PGTest1 (SELECT 1) 1000 iterations: 2491ms

PGTest2 (ping())   1000 iterations: 63ms

All is does is send a sendSync and wait for a valid response.

Regards,
Michael Barker.

Вложения

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

Предыдущее
От: "markds75"
Дата:
Сообщение: Re: PostgreSQL (XADataSource) as Tomcat Resource
Следующее
От: Pavan Kumar
Дата:
Сообщение: Re: thread hang on execute call