Re: [RESEND] Transaction auto-abort causes grief with Spring Framework
В списке pgsql-general по дате отправления:
| От | Tyson Lloyd Thwaites |
|---|---|
| Тема | Re: [RESEND] Transaction auto-abort causes grief with Spring Framework |
| Дата | |
| Msg-id | 46C54160.2060808@allianza.com.au обсуждение |
| Ответ на | [RESEND] Transaction auto-abort causes grief with Spring Framework (Tyson Lloyd Thwaites <tyson.lloydthwaites@allianza.com.au>) |
| Список | 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.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера