Re: why do some failure spoils the jdbc connection ? - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: why do some failure spoils the jdbc connection ?
Date
Msg-id alpine.BSO.2.00.1005011129500.2171@leary.csoft.net
Whole thread Raw
In response to why do some failure spoils the jdbc connection ?  (Maxime Lévesque <maxime.levesque@gmail.com>)
List pgsql-jdbc

On Sat, 1 May 2010, Maxime L?vesque wrote:

>  When I execute some statements, for example droping a constraint and
> the constraint doesn't exist, an exception gets thrown as expected. If I
> issue another statelemt via the same connection, I get another exception
> saying the transaction is canceled, in other words, the connection is no
> longer useable.
>
>  Is the re a way that I can concinue using the connection ?
>

Yes, by creating a Savepoint around statements that may fail and rolling
back to that Savepoint if an exception occurs.

http://java.sun.com/javase/6/docs/api/java/sql/Connection.html#rollback%28java.sql.Savepoint%29

Kris Jurka

pgsql-jdbc by date:

Previous
From: Maxime Lévesque
Date:
Subject: why do some failure spoils the jdbc connection ?
Next
From: Kris Jurka
Date:
Subject: Re: How to ensure that SSL is enabled?