View Single Post

   
  #1 (permalink)  
Old 04-16-2008, 01:00 AM
Daniel Migowski
 
Posts: n/a
Default Fastest way to check aliveness of connection

Hello,

I want to implement a c3p0 ConnectionTester and now need a fast way to
check for the alivelyness of a Connection. Currently I issue a "select
1" to the database and if I don't get an exception I assume the
connection is still alive.

Is there a faster way? How can I check if the underlying socket is still
alive without doing a JDBC request? This has to work only with
PostgreSQL JDBC, so I can cast to any postgres interface available.

With best regards,
Daniel Migowski

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote