db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg von Frantzius <joerg.von.frantz...@artnology.com>
Subject Commit behaviour upon JDOOptimisticVerificationException during flush
Date Thu, 02 Nov 2006 13:07:43 GMT
Dear experts,

after looking at the spec, and 13.4.4 "Non-managed environment" in 
particular, I'm somewhat puzzled about what the expected behaviour of 
javax.jdo.Transaction.commit() should be upon encountering an exception 
during flush. What JPOX currently does is an automatic rollback of the 
DB connection and of the PM's caches, calling 
sync.afterCompletion(Status.STATUS_ROLLEDBACK) and setting the state of 
the transaction to not-active. I wonder whether that's really intended.

While there isn't much a user can do about an optimistic failure during 
flush, there could be any SQLException happening during flush that the 
user might want to catch and try to recover from, I imagine. He won't be 
able to do so if the transaction is automatically rolled-back.

So my proposal would be that upon failure during flush, nothing should 
be done by the implementation but throwing the appropriate exception.

Regards,
Jörg


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