Hi Chris,

----- Original Message -----
From: "Chris Lewington" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Friday, October 18, 2002 4:15 PM
Subject: Re: BUG REPORT: OJB 0.9.7 - Commit Failure In Eager Release
Mode


> Hi Armin,
>
> Well here is a snippet.....
> Basic idea is a TestCaseHelper class, which is called by a junit
TestCase and
> handles the setUp/tearDown for the TestCase. The object wrapping the
PB is
> created in the TestCaseHelper, then passed back to the testCase for
use in its
> test methods (eg complex searches etc). So, it is the TestCaseHelper
class
> that initiates the create/update/delete ops - create/update done in
setUp, and
> delete in tearDown.
> roughly this translates to:
>
> public void setUp() {
>
> file://create a bunch of objects.....
> file://add them to a Collection.....
> file://pass to a wrapper class which uses a PB to create each in turn
>
> file://do a few object modifications....
>
> file://then call 'update' on the wrapper class (uses PB.store with an
> ObjectModification.needsUpdate())...
> }
>
> public void tearDown() {
>
> file://just calls delete via the wrapper class on each object in
correct order...
> }
>
> The wrapper class does straight delegation to the PB for
update/delete; the
> only other level of complexity is that the wrapper 'create' method
taking a
> Collection calls PB.store() for each item in turn, *but* the iterator
itself
> is run within a transaction, ie
>
> pb.begin();
> Iterator it = collection.iterator();
> while(it.hasNext()) {
>
> pb.store(it.next());
> }
> pb.commit();

This part is ok. Anyway I think somewhere in your code
is a user bug. All 260 junit test, all stress tests of
OJB passed well.
As I said in a pervious posting think you
have a PB leak (e.g. no PB.close() call after commit)
in your code or forget to commit a PB instance.
Sorry, I'm stumped.
Only I could say is take a look in the OJB junit tests,
maybe this give you some more information, re-check
the properties in OJB.properties.
Please let me know about your further experience.
When you send me a whole test case I will check this.

regards,
Armin

>
> That's it, basically. The db fill code isn't any more complex really -
just
> creates a bunch of objects, stores them then retrieves them and
updates them
> with extra relationships.
>
> Not sure if that helps!!
>
> cheers,
>
> Chris
>
> Armin Waibel wrote:
>
> > Strange!?
> >
> > Could you post a some sample code or
> > a small test case?
> >
> > regards,
> > Armin
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:ojb-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:ojb-user-help@;jakarta.apache.org>
>
>
>


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to