Explanation of Wicket session management

2008-03-11 Thread Rajiv Jivan
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

Re: Explanation of Wicket session management

2008-03-11 Thread Martijn Dashorst
Did you read the javadoc for Session#exists() ? http://wicket.sourceforge.net/apidocs/wicket/Session.html#exists() Checks if the Session threadlocal is set in this thread So not if the session was created or not. Martijn On 3/11/08, Rajiv Jivan [EMAIL PROTECTED] wrote: I am having a tough

Re: Explanation of Wicket session management

2008-03-11 Thread Rajiv Jivan
Yes I did. I was assuming that once newSession is called, on subsequent calls, the session will be set on a thread local variable. If that is not the case, what would be the right way to check if a session has been created. On Tue, Mar 11, 2008 at 10:32 AM, Martijn Dashorst [EMAIL PROTECTED]

Re: Explanation of Wicket session management

2008-03-11 Thread Johan Compagner
RequestCycle is first made and the the Session is being resolved. Because the session creation code needs the request cycle first. So thats why your code doesn't work that test that you want should be done in Requestcycle.onBeginRequest On Tue, Mar 11, 2008 at 4:47 PM, Rajiv Jivan [EMAIL

Re: Explanation of Wicket session management

2008-03-11 Thread Johan Compagner
Yes that is true, Session is lazy created in Session.get() so only after the first time that is called Session.exists() works. I guess Session.exists() doesnt really make much sense On Tue, Mar 11, 2008 at 8:29 PM, Rajiv Jivan [EMAIL PROTECTED] wrote: I have updated the code based on Johan's