Re: an efficient way of checking if the connection to a db is actually open - Mailing list pgsql-jdbc

From Guillaume Cottenceau
Subject Re: an efficient way of checking if the connection to a db is actually open
Date
Msg-id 87wti58oel.fsf@meuh.mnc.ch
Whole thread Raw
In response to an efficient way of checking if the connection to a db is actually open  (Assad Jarrahian <jarraa@gmail.com>)
List pgsql-jdbc
Assad Jarrahian <jarraa 'at' gmail.com> writes:

> 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).

Why not performing the operation anyway, and when it fails
reopening the connection and retrying the operation?

Seems that it's the idea the JDBC designers had in mind, which
doesn't seem too stupid.

--
Guillaume Cottenceau

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: an efficient way of checking if the connection to a db
Next
From: "shrenik vikam"
Date:
Subject: problem of network is unreachable