Problem with jdbc connection behavior

From: "Blakely, Jerel \(Mission Systems\)" <Jerel(dot)Blakely(at)ngc(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Problem with jdbc connection behavior
Date: 2007-02-14 16:29:31
Message-ID: E81F32D30475E341A3DBEEEA7CB6691CB0A404@xmbco501.northgrum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Any help would be appreciated on this, I am not sure if it is a bug or
intended behavior. I see no documentation on it.

Some simple exceptions cause the jdbc connection to stop working. It
does not kill the connection, but any query/update... sent after that
exception does not execute. The return is always the same exception that
started the problem. The simple test case that I have to reproduce the
problem is in a prepared statement sending (select count(1) from
non_existant_tablename) it of course returns an exception stating that
the table does not exist. If I catch that exception and move on and then
send another prepared statement (select count(1) from
a_table_that_exists) or any other command that should work, I only get
the same original table does not exist exception returned from the
connection. I can do this testcase against other database servers and
none seem to have this same issue thus far.

This is just an example testcase that I can easily duplicate the problem
with, how ever I do not know how many total types of exceptions cause
this to happen. Unless there is some simple fix for the connection it,
it looks like I will have to blanket close and destroy any connection
when I get any type of exception (since I see no documented information
on this behavior and I have no way of knowing what exception will break
the connection and which will not) and open a new one, which is
ridiculous.

Jerel

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Heikki Linnakangas 2007-02-14 16:59:43 Re: Problem with jdbc connection behavior
Previous Message Kris Jurka 2007-02-14 15:32:15 Re: getProcedureColumns