On Thu, Nov 21, 2019 at 6:30 PM Sven Meier <s...@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.meil...@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-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to