I am experiencing a strange problem:
I fired an optimistic insertion. The insert fails due a violation of a unique constraint. Since it fails, I wanted to throw an exception in the business layer and continue using a compensation operation.
Saidly by executing the compensation operation (even on select), I was informed that the transaction is aborted and the operation is ignored. So I burried my head in the Spring sources but there was no transaction abort on any level (I use SqlOperation subclasses).
So I guess the abortion is done by the jdbc-driver. I am using a PostgreSQL 8.0 database with the 3.* jdbc driver.
Is it really not possible to recover from a sql-exception and to do anything alternatively? Or is Spring responsable for this abort?
Cheers,
Martin (Kersten)


Reply With Quote