an efficient way of checking if the connection to a db is actually open

Поиск
Список
Период
Сортировка
Hi All,
   Trying to check if a connection is actually open every time I perform an operation (if not, I want to reopen it and perform that operation). isClosed()
is no good, as in, it only guarantees true if close() was actually called on it.

The documentation says, the only real way is to actually call an sql statement on it. That seems inefficient. Is there any other way that is recommended?
Much thanks in advance.

-assad

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: CallableStatements: index starts at 2
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: an efficient way of checking if the connection to a db