Description
After org.odmg.Transaction.abort() call preceded by org.apache.ojb.odmg.TransactionExt.flush() all objects that were modified during transaction are found in cache.
Expecting:
All modified object should be evicted from cache on abort().
Reproducing:
With 1.0.5RC1 Tests:
org.apache.ojb.odmg.ODMGRollbackTest with ObjectCacheDefaultImpl (with autoSync=false) as Cache Implementation
following two testCases fails:
- testTransactionFlush() and
- testTransactionFlush_2()
Both tests are doing following:
- persisting previously non-persisted objects by invoking
Transaction.lock(Object, int) and calling TransactionExt.flush()
afterwards, - performing Transaction.abort() and at last,
- checking for existence of used objects (in DB/Cache) via
org.apache.ojb.broker.query.QueryByIdentity expecting not to find them.
Original ojb-user mailing list thread: http://www.mail-archive.com/ojb-user@db.apache.org/msg16156.html