You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Peter Karich <pe...@yahoo.de> on 2010/12/28 20:26:08 UTC

new session

 Hi,

when is a new session created?
If I am overwriting newSession I can see that wicket will call this
method twice for a fresh browser:

Restart completed at Tue Dec 28 20:22:57 CET 2010 // jetty log
2010-12-28 20:23:02,575 [3107562@qtp-7885469-4] INFO  created new session!
2010-12-28 20:23:02,593 [23004808@qtp-7885469-3] INFO  created new session!
...

Did I do something wrong?

Kind regards,
Peter.

 @Override
    public Session newSession(Request request, Response response) {
        MySession session = new MySession(request);
        getGuiceInjector().inject(session);
        logger.info("created new session!");
        return session;
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: new session

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
>  forgot: this is done in one request.
> Martin, is your answer still valid :-) ?

Put a breakpoint to see if there is a redireect... ;)

**
Martin

>
>> Hi!
>>
>> First time you don't have cookie, second time maybe cookie created...
>>
>> **
>> Martin
>>
>> 2010/12/28 Peter Karich <pe...@yahoo.de>:
>>>  Hi,
>>>
>>> when is a new session created?
>>> If I am overwriting newSession I can see that wicket will call this
>>> method twice for a fresh browser:
>>>
>>> Restart completed at Tue Dec 28 20:22:57 CET 2010 // jetty log
>>> 2010-12-28 20:23:02,575 [3107562@qtp-7885469-4] INFO  created new session!
>>> 2010-12-28 20:23:02,593 [23004808@qtp-7885469-3] INFO  created new session!
>>> ...
>>>
>>> Did I do something wrong?
>>>
>>> Kind regards,
>>> Peter.
>>>
>>>  @Override
>>>    public Session newSession(Request request, Response response) {
>>>        MySession session = new MySession(request);
>>>        getGuiceInjector().inject(session);
>>>        logger.info("created new session!");
>>>        return session;
>>>    }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: new session

Posted by Peter Karich <pe...@yahoo.de>.
 forgot: this is done in one request.
Martin, is your answer still valid :-) ?

> Hi!
>
> First time you don't have cookie, second time maybe cookie created...
>
> **
> Martin
>
> 2010/12/28 Peter Karich <pe...@yahoo.de>:
>>  Hi,
>>
>> when is a new session created?
>> If I am overwriting newSession I can see that wicket will call this
>> method twice for a fresh browser:
>>
>> Restart completed at Tue Dec 28 20:22:57 CET 2010 // jetty log
>> 2010-12-28 20:23:02,575 [3107562@qtp-7885469-4] INFO  created new session!
>> 2010-12-28 20:23:02,593 [23004808@qtp-7885469-3] INFO  created new session!
>> ...
>>
>> Did I do something wrong?
>>
>> Kind regards,
>> Peter.
>>
>>  @Override
>>    public Session newSession(Request request, Response response) {
>>        MySession session = new MySession(request);
>>        getGuiceInjector().inject(session);
>>        logger.info("created new session!");
>>        return session;
>>    }


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: new session

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

First time you don't have cookie, second time maybe cookie created...

**
Martin

2010/12/28 Peter Karich <pe...@yahoo.de>:
>  Hi,
>
> when is a new session created?
> If I am overwriting newSession I can see that wicket will call this
> method twice for a fresh browser:
>
> Restart completed at Tue Dec 28 20:22:57 CET 2010 // jetty log
> 2010-12-28 20:23:02,575 [3107562@qtp-7885469-4] INFO  created new session!
> 2010-12-28 20:23:02,593 [23004808@qtp-7885469-3] INFO  created new session!
> ...
>
> Did I do something wrong?
>
> Kind regards,
> Peter.
>
>  @Override
>    public Session newSession(Request request, Response response) {
>        MySession session = new MySession(request);
>        getGuiceInjector().inject(session);
>        logger.info("created new session!");
>        return session;
>    }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org