Apache JDO Project - Commit behaviour upon JDOOptimisticVerificationException during flush

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > November 2006 > Commit behaviour upon JDOOptimisticVerificationException during flush





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commit behaviour upon JDOOptimisticVerificationException during flush
Jörg von Frantzius

2006-11-02, 7:11 am

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


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com