PaulS, ----- Original Message ----- From: "Paul Szego" <[EMAIL PROTECTED]> To: "Turbine Users List" <[EMAIL PROTECTED]> Sent: Tuesday, February 19, 2002 11:47 PM Subject: Session scope tools
> > Hi, > > I'm just getting going with Turbine/Velocity, and have some questions > about "session" tools and their lifecycle. > > My understanding is that the tool will be initialised with a User object > and placed in the tempStorage of that User. However I can't see how to > tell when the session is "over". > > My solutions so far are to either (1) implement > HttpSessionBindingListener and bind myself to the servlet session and > work from HttpSessionBindingEvent's myself, or (2) extend TurbineUser > and override the valueUnbound() and do some tricks there. I chose number 2. Found a bug though with the pull service in Turbine2.1 that I don't know if it was ever formally addressed. Seems Session scope pull tools are never returned to the pool. So in the valueUnbound, I do a TurbinePool.put for each object in tempstorage ( only because I only use TempStorage for session pull tools and nothing else). Anyways, just a warning to keep track of all those instances running around... -Peter > > In the second approach I look through each object in the tempStorage, > and if it implements HttpSessionBindingListener I call the > valueUnbound() method on it. Then I call super.valueUnbound() to let the > TurbineUser object do its thing. > > Is there any other way to do this? Am I missing something completely? > > Regards, PaulS. > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
