db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <ar...@code-au-lait.de>
Subject [BUG] TransactionExt#flush() after tx.abort not in sync with cache
Date Sat, 03 Jan 2004 13:41:22 GMT
Hi all,

I checked in a test case ODMGRollbackTest#testTransactionFlush(). This 
test fails, because flush() writes all objects to the database without 
committing the tx. If now the tx was aborted the default cache is out of 
sync and returns invalid objects.

Primarily it's a fault in ObjectCacheDefaultImpl, because the cache does 
not take care of "invalid objects" after a rollback.
Locally I fixed this by tracing all Identity cached/looked up while a tx 
is running and removing all traced objects on tx abort (it's a simple 
auto-synchronization mechanism).

Or we only fix this in TransactionImpl#flush() method and trace all 
flushed objects on odmg-level and remove them from cache on tx.abort() call.

Any comments?

regards,
Armin





---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message