JDBC Driver Class: Connection Method: isClosed() error - Mailing list pgsql-bugs

From Oscar FRANCOIS
Subject JDBC Driver Class: Connection Method: isClosed() error
Date
Msg-id sae83897.000@wise.e-contact.fr
Whole thread Raw
Responses Re: JDBC Driver Class: Connection Method: isClosed() error
List pgsql-bugs
Hi,

  Here are the maximum information about the error:

OS where the class is running: winnt4 with jdk1.3
DB OS: Linux Debian potatoe
Postgresql version: 7.0.3
Driver JDBC: included in the source code.

Description:
-----------
First case (postmaster is running ok):
I get the connection with:
conn = DriverManager.getConnection("...
I do a sleep for 5 seconds
I test the code with the isClosed() function.
I do a request like "select * from ...."
Finally I close the connection.

But If I do the following:
I get the connection with:
  conn = DriverManager.getConnection("...
I do a sleep for 5 seconds
(during while I stop the postmaster)
I test the code with the isClosed() function.
---> WHICH RETURN FALSE!!! <-----
I do a request like "select * from ...."
---> which generate a SQLException Error <---
Finally I close the connection.
---> which generate a SQLException Error <---

  Why the Hell, does the method isclosed() is answering that everything is Ok whereas the postmaster
is closed & the next request generate an Error.

Thanks in advance for further details.

Regards,

Oscar FRANCOIS.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Optimalisation options change query results
Next
From: Boulat Khakimov
Date:
Subject: alter table rename bug