I am looking for a reliable way to clear up old MagmaSessions. My use of seaside is a bit hit and miss, and I seem to have a load of MagmaSessions left dangling.
There seems to be a process that is merrily chugging through every class in the system what is going on. lots of allSubclassesDoGently:
Would it be safe to persist a "Semaphore"?
Keith
___________________________________________________________ All New Yahoo! Mail Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html
--- keith hodges keith.hodges@warwick.ac.uk wrote:
I am looking for a reliable way to clear up old MagmaSessions. My use of seaside is a bit hit and miss, and I seem to have a load of MagmaSessions left dangling.
MagmaSession cleanUp.
There seems to be a process that is merrily chugging through every class in the system what is going on. lots of allSubclassesDoGently:
Not sure..
Would it be safe to persist a "Semaphore"?
Yeah, that should be fine. I think the default read-strategy (one-level minimum) could cause linked-lists to be materialized all at once, but that shouldn't be an issue with Semaphores.
Ok so I understand that it is not a good idea to persist the session object.
The problem that I have is that pier saves its history by saving its instances of PRContext', namely the context of the model changing command being performed. This context happens to have a local cache in it's properties the seaside session ('to avoid unneccessary lookups'), which if it is WAMagmaSession has a magmaSession instance var.
Now I could attempt to clear this cached value out before persistence takes place, but I see no guarantees that some other bit of code may reference the session and repopulate the cached value while I am not looking.
So I am wondering what would be the effect of accidently persisting this? Is there a way of guarding against it?
Am I correct in assuming that WAMagmaSharedSession which keeps its references to MagmaSessions in class instance vars will be safe to persist whether accidentally or not.
If I recommend to the Pier guys that we dont bother caching this value, does anyone have any idea what the performance overhead of a DynamicVariable lookup actually is?
best regards
Keith
___________________________________________________________ The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
magma@lists.squeakfoundation.org