Since nobody answered my original post but this is important (at least to
me), I thought I'd better repost my question (slightly updated).

Original post:

I'm still "toying" with the ODMG implementation and I stumbled upon
something strange (at least in my eyes). While working through the ODMG
testcases, I noticed that when I change the
PersonWithArrayTest.testStoreThreePersons test a slightly bit from

        Transaction tx = odmg.newTransaction();
        tx.begin();
        tx.lock(karlHeinz, Transaction.WRITE);
        tx.lock(kurt, Transaction.WRITE);
        tx.lock(knuth, Transaction.WRITE);
        tx.commit();

to

        Transaction tx = odmg.newTransaction();
        tx.begin();
        tx.lock(kurt, Transaction.WRITE);
        tx.lock(knuth, Transaction.WRITE);
        tx.lock(karlHeinz, Transaction.WRITE);
        tx.commit();

or to

        Transaction tx = odmg.newTransaction();
        tx.begin();
        tx.lock(kurt, Transaction.WRITE);
        tx.lock(knuth, Transaction.WRITE);
        tx.commit();

        tx.begin();
        tx.lock(karlHeinz, Transaction.WRITE);
        tx.commit();

then the test case fails. Is there a reason that I have to put the objects
in exactly the order "collection-owner first, then collection
elements" and that I have to lock the subobjects in the same transaction ?
Also, if I have already-stored objects then the test fails as well:

        Transaction tx = odmg.newTransaction();
        tx.begin();
        tx.lock(kurt, Transaction.WRITE);
        tx.lock(knuth, Transaction.WRITE);
        tx.commit();

        tx.begin();
        tx.lock(karlHeinz, Transaction.WRITE);
        tx.lock(kurt, Transaction.WRITE);
        tx.lock(knuth, Transaction.WRITE);
        tx.commit();


Thanks,
Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to