[Seaside] How to get the number of user connected
William Harford
seaside at harford.org
Wed Dec 13 16:54:13 UTC 2006
On Dec 13, 2006, at 11:42 AM, Florian Minjat wrote:
> Currently I use the default behavior for session expiration. So
> they just wait to be GCed. Is there an existing 'session reaper'
> available somewhere or should I make it myself? It doesn't seems to
> difficult, but I dislike coding the wheel again.
Actually the default behavior is to clear expired handlers (session,
images, documents, etc) every about every 10th time. See WARegistry
#shouldCollectHandlers
Some people like to change that method to always return false. When I
was using Squeak I added some methods to the class side of WAResigtry
but you will most likely want to keep this code in it's own class.
Hope that gets you started.
Will
....
finalizationContinue
^true.
finalizationProcess
[self finalizationContinue] whileTrue:[
self allSubInstancesDo:[:i| i unregisterExpiredHandlers].
Smalltalk garbageCollect.
(Delay forSeconds: 900) wait.
].
initialize
self restartFinalizationProcess.
restartFinalizationProcess
FinalizationProcess
ifNotNil: [FinalizationProcess terminate.
FinalizationProcess := nil].
FinalizationProcess := [self finalizationProcess]
forkAt: Processor userInterruptPriority.
>
> Thanks again,
>
> Florian Minjat
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the Seaside
mailing list