wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Meier <s...@meiers.net>
Subject Re: Application # newSession # sessionUnbound - RuntimeException
Date Thu, 21 Nov 2019 16:55:01 GMT
Yes, I mean a non-web-request thread, i.e. when the session expires as 
you've written.

Sven

On 21.11.19 17:52, Martin Grigorov wrote:
> On Thu, Nov 21, 2019 at 6:30 PM Sven Meier <sven@meiers.net> wrote:
>
>> Hi,
>>
>> actually #sessionUnbound() is called *on* the application instance, so
>> the ExceptionMapper is available.
>>
> oh, right. silly me!
>
>
>
>> But ExceptionMapper maps an exception to a requestHandler, this doesn't
>> make sense for an exception happening on a worker thread.
>>
> you meant on *non*-worker thread ?
>
> Francois, please give us the stack trace.
>
>
>> Hope this helps
>> Sven
>>
>>
>> On 21.11.19 16:37, Martin Grigorov wrote:
>>> Hi Francois,
>>>
>>> #sessionUnbound() is called in two contexts:
>>> 1) the user clicked the Logout button - in this case the call is executed
>>> in http worker thread where there is a ThreadContext, i.e.
>>> Application.get(), Session.get() and RequestCycle.get() would work
>>> here, I think, Wicket should use the ExceptionMapper
>>> 2) when the user session has timed out - in this case the web container
>>> (Tomcat/Jetty) will execute this method in non-worker thread and
>>> Application.get() would be null, so we cannot get a reference to the
>>> ExceptionMapper
>>>
>>> On Thu, Nov 21, 2019 at 5:01 PM Francois Meillet <
>> francois.meillet@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Any RuntimeException thrown in Application # newSession(Request request,
>>>> Response response) is handled by the DefaultExceptionMapper #
>>>> mapUnexpectedExceptions(Exception e, final Application application)
>>>>
>>>> but
>>>>
>>>> Any RuntimeException thrown in Application # sessionUnbound(String
>>>> sessionid) is not handled
>>>>
>>>> Is that normal ?
>>>>
>>>> Fran├žois
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>

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


Mime
View raw message