Change the socket timeout of a live connection? - Mailing list pgsql-jdbc

From Matt Solnit
Subject Change the socket timeout of a live connection?
Date
Msg-id 9ED1C42C-8758-4052-822E-65C48BC3E20F@soasta.com
Whole thread Raw
List pgsql-jdbc
Hi everyone.  Is there any way to change the socket timeout of an existing PostgreSQL JDBC connection?  The reason I
askis that we would like to test various timeouts in a JBoss environment where we can't directly edit the JBoss data
sourceXML file (and therefore the JDBC URL).  So it would be great if we could somehow do this in Java code. 

Based on a look at the source code, I'm pretty sure the answer is no -- we would have to have a way of getting to the
PGStream.getSocket()method.  And I'm not even sure what happens if you call setSoTimeout() more than once on an
existingsocket.  But I thought I would ask anyway. 

I'm using driver version 8.4-701 (JDBC 3), JRE 1.6.0_18 64-bit on Windows, connecting to a PostgreSQL 8.3 server on
Linux.

-- Matt

pgsql-jdbc by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: JDBC Driver and timezones
Next
From: Oliver Jowett
Date:
Subject: Re: JDBC Driver and timezones