Persisting the session!

Keith Hodges keith_hodges at yahoo.co.uk
Mon Sep 11 00:13:11 UTC 2006


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


More information about the Magma mailing list