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:30:11 GMT
Hi,

actually #sessionUnbound() is called *on* the application instance, so 
the ExceptionMapper is available.

But ExceptionMapper maps an exception to a requestHandler, this doesn't 
make sense for an exception happening on a worker thread.

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


Mime
View raw message