Thanks, I wonder if I use invalidate() it would throw an error. I'll give it a try.
Best regards, Martin On Thu, Mar 8, 2012 at 2:39 PM, Martin Grigorov <mgrigo...@apache.org>wrote: > Hi, > > You can invalidate the http session. Since Wicket Session is an > attribute in the http session it will be removed as well. > > On Wed, Mar 7, 2012 at 6:35 PM, Martin A <wml...@gmail.com> wrote: > > 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 > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >