Re: Unable to commit: transaction marked for rollback - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Re: Unable to commit: transaction marked for rollback
Date
Msg-id 4C2C98930200002500032F20@gw.wicourts.gov
Whole thread Raw
In response to Unable to commit: transaction marked for rollback  (David Kerr <dmk@mr-paradox.net>)
Responses Re: Unable to commit: transaction marked for rollback  (David Kerr <dmk@mr-paradox.net>)
List pgsql-jdbc
David Kerr <dmk@mr-paradox.net> wrote:

> javax.transaction.RollbackException: Unable to commit: transaction
> marked for rollback
>
> Can someone give me a scenario where this would happen?

It sounds like the right exception for the case where a previous
statement generated an error within a database transaction.  After
that, any attempt to run a statement would generate this at the
PostgreSQL level:

ERROR:  current transaction is aborted, commands ignored until end
of transaction block

until a ROLLBACK or COMMIT (which would be treated as a ROLLBACK
because of the transaction state) is executed.

That sounds like exactly the case for which RollbackException was
created:

http://java.sun.com/javase/6/docs/api/javax/transaction/TransactionRolledbackException.html

-Kevin

pgsql-jdbc by date:

Previous
From: David Kerr
Date:
Subject: Unable to commit: transaction marked for rollback
Next
From: David Kerr
Date:
Subject: Re: Unable to commit: transaction marked for rollback