openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Teresa Kan" <>
Subject why do we save all the exceptions during flush??
Date Wed, 22 Aug 2007 21:08:14 GMT
 What are the rules to handle the exception?
I found out that in the OperationOrderUpdateManager.flush(rowMgr, psMgr,
exceps), it always flushed all the primary rows first, then flush any
constraintUpdates, then the secondary rows. In each set of flush, it saved
all the exceptions. If any exception in the primary rows, should we rollback
the transaction instead of continue to the next flush?
I don't see the logic closely enough that will handle the exception and
retry if there is any constraint violation. So if one table has the
exception, should we throw the exception? What scenario that will cause the
first exception be ignored ? I also discovered that the exception eventually
be threw back and failed at the end.

Currently I have 100 insertions, each has a constraint violation.
Instead of stopping the  processing of the insertion once an exception was
encountered, all 100 insertions were executed. Then 100 exceptions were
thrown at the end of process. Will it waste the time to continue to execute
the statement once an exception occurs?

Please clarify and thanks,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message