Putting large objects into session is ok, as long as you

a) have enough memory and can afford it
b) don't replicate the session (clustering).

-Matej

Pierre-Yves Saumont wrote:
> I already tried this method, but it is called just before the user can 
> see the page. What I need is to do something when he leaves the page.
> 
> However, I think I have found an acceptable solution. I would make all 
> my data objects implements an interface (let's say Lockable) and retain 
> the last locked object in the session. That way, I can release the last 
> locked object on each new request (if needed). The risk is to have the 
> last object locked until the session expires, but that's acceptable in 
> my use case.
> 
> However, I red many times that big objects should not be put in the 
> session. Putting an object in the session is just a matter of retaining 
> a reference to it. So it should not cost much. Or do I miss something?
> 
> Pierre-Yves
> 
> Eelco Hillenius a écrit :
>>> Is there a Wicket (ie really smart) way to detext when the user switch
>>> to another page?
>>>
>>> The use case is to release locks that a user might have put on database
>>> records with pessimistic locking when the user switch to another page.
>> For every request target that was set during a request (like for
>> everytime you called setResponsePage), onDetach will be called at the
>> end of the request handling. This is the place where you should clean
>> up resources for normal requests.
>>
>> Eelco
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
>>
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to