[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem



Tim Brown wrote:
> 
> Read below..
> 
> Falko Braeutigam wrote:
> 
> > Tim Brown wrote:
> > >
> > > I think I know what the problem is.  The planet object I am trying
> > > to get is the same one calling this object.  So, apparently you
> > > cannot try to get your parent object in another call to the
> > > database.  Bummer.
> >
> > Ok, I will check this. So far it seems to be a problem of the cyclic
> > structure of the objects. Right?
> >
> 
> Yes.  It is:
> 
> in object a:
>     obj b = database().objectForName(key);
>     b.getTreeNode();
> 
> in object b.getTreeNode():
>     obj a = database().objectForName(key_for_object_a);
> 
> >
> > To get this right: Why are you using named objects instead of just
> > references? (Why does homePlanetKey.getKey() does not return just a
> > proxy of the object you get by the objectForName() call?)
> 
> I guess I do not know what you mean...  how would I do this?
In b.getTreeNode() you need a proxy for object "a". Right? You call
b.getTreeNode() from within "a". Right again? So why don't you pass "a" in
the argument list of b.getTreeNode() ? ozone will convert the object to a
corresponding proxy.

> > And what does
> > "server crash" mean? What happens exactly?
> >
> 
> The ozone server crashes.  Not sure if I get a Linux core dump or not.  I
> get a java.io.exception (I forget which one) in my app.
Hmmm... but a simple exception should be no problem for the ozone server.
The corresponding transaction is aborted and the client receives an
exception. This should definitely not crash the server process. In fact, in
all my tests I never crashed the server process of ozone.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de