Skip site navigation (1) Skip section navigation (2)

JDBC Driver Class: Connection Method: isClosed() error

From: "Oscar FRANCOIS" <ofrancois(at)e-contact(dot)fr>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: JDBC Driver Class: Connection Method: isClosed() error
Date: 2001-04-26 13:02:27
Message-ID: sae83897.000@wise.e-contact.fr (view raw or flat)
Thread:
Lists: 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.


Responses

pgsql-bugs by date

Next:From: Chris StorahDate: 2001-04-26 13:03:50
Subject: 7.1 euro-style dates insert error
Previous:From: Thomas LockhartDate: 2001-04-26 12:50:02
Subject: Re: Cannot Create plpqsql function!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group