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

Re: persistence problem maybe



Well, using the self() idea and making getPlayer() a writeable method it is
fixed.  I will need to test more to see if I did need to make getPlayer()
writable because I did both things at the same time :(  But it is working and I
am happy.

Falko Braeutigam wrote:

> On Mon, 30 Aug 1999, Tim Brown wrote:
> > I seem to be having a persistence problem.  I now know that
> > I must flag all methods in my interfaces that are writable.
> > I have done this.  What I just noticed is that if a
> > OzoneObject calls a method within itself (ie: in database
> > call) that changes are not persistent.
> Unfortunatly it is not possible to convert "this" (which is OzoneObject) at
> call-time to a corresponding proxy. So this.doSomething() is not an database
> call and no locks are set and nothing is stored.
>
> BTW: if you give "this" as a parameter to a database call, then it _is_
> substituted.
>
> I see two ways to solve this:
> 1) Add a new function self() that returns a proxy for "this".
> 2) Let the programmer (Tim in this case;) be responsible to flag _all_
> methods that change object state (addPlayerInfo _and_ getPlayerInfo()).
>
> What do you think?
>
> Falko
> --
> ______________________________________________________________________
> Falko Braeutigam                         mailto:falko@softwarebuero.de
> softwarebuero m&b (SMB)                    http://www.softwarebuero.de

--
Tim Brown
URL: http://www.incenter.org