db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <b.molenk...@bizzdesign.nl>
Subject [ODMG] Modifying object states of object evelopes inside a transaction
Date Fri, 08 Jul 2005 14:28:15 GMT

I'm using OJB 1.0.3, and I'm still having problems when storing large
object graphs (which I already had). I solved this problem, by listening
to the PBStateListener.afterBegin() method. In this method, I use the
metadata from the OJB metadata manager to clone myself a new object,
which has no relationships to any other objects. This object is then
stored using the persistence broker. This is done for all objects that
are made persistent. After this, all objects are stored again, but now
including all relationships etc. This works pretty good for me.

But now I'm having a little problem, when locking a persistent object
that has a reference to a new object. The ODMG layer marks this object
as StateNewDirty. I also insert the new object in
PBStateListener.afterBegin(). So I get an error, as OJB tries to insert
the object twice.

Is there anyway that I can set the state to StateOldClean or something,
to let OJB know that it shouldn't care about that object anymore?
Letting OJB do the insert fails (the graph problem).


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

View raw message