You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Thomas Dudziak <to...@first.gmd.de> on 2003/08/06 12:14:45 UTC

Updated repost: Questions about ODMG testcase PersonWithArrayTest.testStoreThreePersons

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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Updated repost: Questions about ODMG testcase PersonWithArrayTest.testStoreThreePersons

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Tom,

I update the test case to show your problem.

regards,
Armin

----- Original Message -----
From: "Thomas Dudziak" <to...@first.gmd.de>
To: <oj...@db.apache.org>
Sent: Wednesday, August 06, 2003 12:14 PM
Subject: Updated repost: Questions about ODMG testcase
PersonWithArrayTest.testStoreThreePersons


> 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: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>



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