You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by schapes <Ka...@gmail.com> on 2008/11/03 03:11:45 UTC

Re: Session destruction due to timeout...


Mendeleev wrote:
> 
> I passed the application key and it worked. Thanks a lot for the help. 
> 
>     Would you be able to post your solution.  I am trying to solve the
> same problem.  Right now I am using the solution posted on this thread by
> Nino.  Do you have an alternate way of solving this problem without having
> to worry about issues when clustering?
> 
> 
> 
> 
> Johan Compagner wrote:
>> 
>> no you cant and Application.get() will never work then because the auto
>> destruct of a container
>> doesnt do that in a request ofcourse but just somewhere on some thread.
>> 
>> if you need an application object you could try:
>> 
>> Application.get(String applicationKey)
>> 
>> The session object is gone so you cant access it anymore.
>> 
>> On Wed, Oct 15, 2008 at 10:40 AM, Mendeleev <dr...@abv.bg> wrote:
>> 
>>>
>>> I need to add functionality to my Wicket application that allows me to
>>> record
>>> in the MySQL database the exact time a user logs out of the application.
>>> This includes recording the time the session is destroyed by the web
>>> container due to user inactivity.
>>>
>>> I tried:
>>> 1. An implementation of HttpSessionListener
>>> 2. Extending the HttpSessionStore class
>>> 3. WebApplication.sessionDestroyed(String sessionid)
>>> 4. An implementation of HttpSessionBindingListener
>>>
>>> All of these do not work in my case, because the methods are called
>>> AFTER
>>> the session is already destroyed. At that time, the hibernate session
>>> that
>>> connects to the database, does not exist anymore. I cannot reopen it,
>>> because the Application.get() method returns null at this time.
>>>
>>> My question is: is there any way that I can record the destruction right
>>> before it happens? Is there some sort of a listener I can implement?
>>>
>>> If not, how is the wicket application notified that the user navigates
>>> away
>>> from the page, starting a period of inactivity? If there is a way I can
>>> register that happening, I can solve the problem by adding a timer.
>>>
>>> Thanks,
>>> Drago
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Session-destruction-due-to-timeout...-tp19989230p19989230.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Session-destruction-due-to-timeout...-tp19989230p20296278.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org