Can I check if a db connection is working? - Mailing list pgsql-jdbc

From Jacob Vennervald Madsen
Subject Can I check if a db connection is working?
Date
Msg-id AA6075F044E39D4DBBA876CA427A0E02057BED@gop-server.GOP-server.local
Whole thread Raw
Responses Re: Can I check if a db connection is working?
List pgsql-jdbc
Hi List

I have a database handler with a persistent connection to a Postgres database.
The problem is that if the TCP/IP connection between the database and the application is temporaryly down then I have
torestart my application afterwards to reestablish the connection. This happens for example when the database is
restartedwith mode fast. 
Is there any way to check if the database connection is working before using it?

Best regards,
Jacob Vennervald Madsen
Systems Developer

GoPinocchio
Norrebrogade 45
DK-2200 Copenhagen
www.gopinocchio.com
+45 26750106

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.


pgsql-jdbc by date:

Previous
From: "James Kelty"
Date:
Subject: Re: Referential integrity error
Next
From: Aditya
Date:
Subject: jdk1.4.1 Password authentication failed for user. md5 support?