we sync on the session so only one request-processing thread can be inside a page instance during the processing of the request, so that the page code does not need to be threadsafe.
whats the problem here?
-Igor
On 11/14/05, Matej Knopp <[EMAIL PROTECTED]> wrote:
I assume he meant that multiple (different) threads can access the
page/session during page lifecycle. But not during one request.
-Matej
Alexandru Popescu wrote:
> #: Johan Compagner changed the world a bit at a time by saying on
> 11/14/2005 6:18 PM :#
>
>> at the same time.
>>
>
> What do you mean?
>
> per request there is only 1 thread. or are you saying that during a
> request multiple threads are used? (this is contradicting with the
> servlet spec in fact, so I guess I am not reading correctly).
>
> ./alex
> --
> .w( the_mindstorm )p.
>
>> On 11/14/05, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
>>
>>>
>>> yes, a page instance is only accessed by 1 thread per request per user.
>>>
>>> -Igor
>>>
>>>
>>> On 11/14/05, Alexandru Popescu <[EMAIL PROTECTED]>
>>> wrote:
>>> >
>>> > #: Gili changed the world a bit at a time by saying on 11/14/2005 6:33
>>> > AM :#
>>> > > Ok, I've submitted
>>> > > http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
>>> > >
>>> > > Gili
>>> > >
>>> >
>>> > According to Igor, the 3 bullet item is not valid, or at least this is
>>> > my understanding. Considering
>>> > that a request is guaranteed to be served by only one thread and the
>>> > synchronization done, it looks
>>> > like a page will be accessed by 1 and only 1 thread per request.
>>> >
>>> > ./alex
>>> > --
>>> > .w( the_mindstorm )p.
>>> >
>>> > > Igor Vaynberg wrote:
>>> > >> you hit a url with the page name you want and then click edit.
>>> > >> for example if you wanted to create this under a page called
>>> Session
>>> > >>
>>> > >> go to url
>>> > >>
>>> > >> http://www.wicket-wiki.org.uk/wiki/index.php/Session
>>> > >>
>>> > >> and click the edit tab
>>> > >>
>>> > >> -Igor
>>> > >>
>>> > >>
>>> > >> On 11/13/05, *Gili* <[EMAIL PROTECTED]
>>> > >> <mailto: [EMAIL PROTECTED]>> wrote:
>>> > >>
>>> > >>
>>> > >> I had no idea how to create a new Wiki page so I added this
>>> > >> instead:
>>> > >> http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
>>> > >>
>>> > >> How does one move this into a formal entry?
>>> > >>
>>> > >> Gili
>>> > >>
>>> > >> Igor Vaynberg wrote:
>>> > >> > dont know, if its not would you mind putting it in?
>>> > >> >
>>> > >> > -Igor
>>> > >> >
>>> > >> >
>>> > >> > On 11/13/05, *Gili* < [EMAIL PROTECTED]
>>> > >> <mailto: [EMAIL PROTECTED] >
>>> > >> > <mailto:[EMAIL PROTECTED]
>>> > >> <mailto: [EMAIL PROTECTED] >>> wrote:
>>> > >> >
>>> > >> >
>>> > >> > Wow, this is very useful to know. Is it in Wiki
>>> > >> somewhere?
>>> > >> >
>>> > >> > Gili
>>> > >> >
>>> > >> > Igor Vaynberg wrote:
>>> > >> > > - Each user has a session associated with it. We
>>> > >> identify a
>>> > >> > user's
>>> > >> > > session using jsessionid.
>>> > >> > >
>>> > >> > >
>>> > >> > > The servlet container does the binding of session to user,
>>> > >> we ask the
>>> > >> > > container for the user session.
>>> > >> > >
>>> > >> > > - Each session has a tree of pages associated with it.
>>> > >> This means
>>> > >> > > that a Page instance is not shared amongst users.
>>> > >> > >
>>> > >> > >
>>> > >> > > Yes, but the pages are not in a tree, they are in a PageMap.
>>> > >> > >
>>> > >> > >
>>> > >> > > - Each page may be accessed by at most one thread at a
>>> > >> time,
>>> > >> > but there
>>> > >> > > is no guarantee it'll be the same thread. That is, a
>>> > >> page is
>>> > >> > owned by a
>>> > >> > > single user but the thread being used might change
>>> > >> over time.
>>> > >> > >
>>> > >> > >
>>> > >> > > Yes.
>>> > >> > >
>>> > >> > > The page is owned by a pagemap, and the pagemap is owned by a
>>> > >> > session.
>>> > >> > > When beginning request processing one of the first things
>>> > >> wicket
>>> > >> > does is
>>> > >> > > synchronize on the user's session so that only one request
>>> > >> thread can
>>> > >> > > process a request belonging to the same session user session.
>>> > >> > >
>>> > >> > > -Igor
>>> > >> > >
>>> > >> >
>>> > >> > --
>>> > >> > http://www.desktopbeautifier.com/
>>> > >> >
>>> > >> >
>>> >
>>> >
>>> >
>>> > -------------------------------------------------------
>>> > SF.Net email is sponsored by:
>>> > Tame your development challenges with Apache's Geronimo App Server.
>>> > Download
>>> > it for free - -and be entered to win a 42" plasma tv or your very own
>>> > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
>>> > _______________________________________________
>>> > Wicket-user mailing list
>>> > Wicket-user@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>>> >
>>>
>>>
>>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
> __________ NOD32 1.1284 (20051111) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user