Re: why do some failure spoils the jdbc connection ?

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: why do some failure spoils the jdbc connection ?
Дата
Msg-id alpine.BSO.2.00.1005011129500.2171@leary.csoft.net
обсуждение исходный текст
Ответ на why do some failure spoils the jdbc connection ?  (Maxime Lévesque <maxime.levesque@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Maxime Lévesque
Дата:
Сообщение: why do some failure spoils the jdbc connection ?
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: How to ensure that SSL is enabled?