From: | Tyson Lloyd Thwaites <tyson(dot)lloydthwaites(at)allianza(dot)com(dot)au> |
---|---|
To: | Tyson Lloyd Thwaites <tyson(dot)lloydthwaites(at)allianza(dot)com(dot)au> |
Cc: | Webb Sprague <webb(dot)sprague(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: [RESEND] Transaction auto-abort causes grief with Spring Framework |
Date: | 2007-08-17 06:34:08 |
Message-ID: | 46C54160.2060808@allianza.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>> The auditing is an interesting question, to which I do not have an
>> answer. Seems impossible to do in a transaction, by definition (ie
>> not product specific). Thoughts?
>
We do this with MSSQL. I have never given it a second thought until now.
If anything goes wrong we send an audit event, usually in a catch block,
all in the same transaction. If we have caught the exception, Spring
will commit, and the 'good' statements will stick.
The best example of this is if we can't delete a record, we will 'mark'
it instead, for example:
try {
<delete record>
} catch (DataIntegrityViolationException e) {
<mark record deleted/invisible>
}
These deleted records are then cleaned up at a later stage. This works
fine for MSSQL, I must admit we are not actively maintaining our Oracle
support.
From | Date | Subject | |
---|---|---|---|
Next Message | Tyson Lloyd Thwaites | 2007-08-17 06:40:24 | Re: [RESEND] Transaction auto-abort causes grief with Spring Framework |
Previous Message | Martijn van Oosterhout | 2007-08-17 06:34:03 | Re: [RESEND] Transaction auto-abort causes grief with Spring Framework |