I am having a tough time understanding how sessions are
created/managed specifically related to the calls

public RequestCycle newRequestCycle(Request request, Response response)

and

public Session newSession(Request request, Response response)

I am creating a new session by overriding the method newSession and
doing something like

public Session newSession(Request request, Response response) {
   ......
   Session session = new Session(request);
   return session;
}

This works fine. On subsequent calls, newSession isn't called as a
session is already in place. This is working as expected.

What isn't working is the call
to Session.exists(), this is always returning false when its invoked
in the method newRequestCycle which I override.

public RequestCycle newRequestCycle(Request request, Response response) {
    if(Session.exists() && <certain condiition is met>) {   <----- The
method Session.exists() is always returning false
         Session  mySession = Session.get();
         mySession.invalidateNow();
    }
}
}

Can someone explain why Session.exists() always returns false, and if
the session truly doesn't exist why newSession isn't called after the
first invocation

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to