Hello,
I've got a REST service which is behind a Wicket Session Filter (due to the
need to obtain the wicket current session at the service), and this REST
service is being periodically hit by a Flash client (embedded in wicket
page)
At this REST service I've got a method that retrieves the wicket session,
and it holds this snippet of code:

    if (session.hasExpired()) {
      session.invalidateNow();
      throw new SessionExpiredException();
    }

The reason I do this and rely not on wicket's session timeout is because
Wicket will create a new session if previous one is expired, so it'll lack
all data I've stored in the session.

The problem is that, this piece of code being called by the client via the
REST service throws NullPointerException at Session line 492, which means
that current RequestCycle is null. This happens due to calling
invalidateNow(). I'm using wicket 1.5.0.

Would you please tell me how to invalidate the session immediately in this
case?

Best regards,
Martin

Reply via email to