[Xotcl] Object destruction on exit

Ben Thomasson ben.thomasson at gmail.com
Wed Feb 1 15:44:01 CET 2006


Kristoffer,

I hit the same problem in a persistent application I am working on.  My
solution
is to define a new method, delete, that destroys the object and deletes
the object from the persistent storage.  Just destroying the object does not
delete it from persistent storage.

Instead of explicitly calling destroy on objects, I just call delete. My
persistence
layer is snapshot based, but delete instantly deletes the persistence
for an object.  This has the problem of a shrinking set of persisted objects
between snaphots.

Have you worked with prevayler(www.prevayler.org)?  In my java days I used
this
for a while.  I'd like to make a port of this to xotcl one day.

Ben

On 01/02/06, Kristoffer Lawson <setok at fishpool.com> wrote:
>
> When XOTcl exits, it seems that the [destroy] method is called on all
> objects. The first question is whether this is wise .. possibly. The
> problem is I would like to build a transparent layer for persistence
> storage which could be applied to a wide range of applications. The
> problem naturally is that the objects in the persistence storage get
> destroyed when the application exits :-)
>
>             /  http://www.fishpool.com/~setok/
>
> _______________________________________________
> Xotcl mailing list
> Xotcl at alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
>



--
Lao Tsu said:
When the fool learns the Way,
   He laughs at it.
   Yet if the fool did not laugh at it,
   It would not be the Way.
   Indeed, if you are seeking the Way,
   Listen for the laughter of fools.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://alice.wu-wien.ac.at/pipermail/xotcl/attachments/20060201/7cbd664e/attachment.html


More information about the Xotcl mailing list