i dont even understand why we have session.attach(), we dont need it.

-igor


On 1/19/07, Johan Compagner <[EMAIL PROTECTED]> wrote:

And the locking on session should or can be removed i guess. Because it is
not really used anymore..
Because the lock for the component hierarchy is done on the pagemap level
when the page is get from the session.
But i can't completely see what happens if we really remove it

But if we move Session.attach/detach to a guarded block or sync block.
Then it has to be drilled down
so it will be called much much later..

And then still we don't know it for sure because SharedResources and so on
don't do a lock anyway.

So i think we just have to tell people: Session is not thread save.

johan


On 1/19/07, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
>
> this is sort of a gray area just because we havent come up with a formal
> contract.
>
> usually during processing of a request the session is used as the lock
> object to sync threads, so during those times the session and page are
> threadsafe (thats why you dont need to worry about syncs in your component
> hierarchy)
>
> however, there are exceptions,
> for example shared resource requests do not lock the session
> also session.attach/detach is called before the session is locked so
> these methods are not threadsafe - thus your problem
>
> we need to decide what we want the behavior to be, lets discuss
>
> -igor
>
>
> On 1/18/07, Ryan <[EMAIL PROTECTED] > wrote:
> >
> > I don't want to alarm anyone in that I have not seen this in the wild
> > however I came across a problem in my code recently that got me
> > thinking about race conditions and detachable models. I had a
> > detachable model that I was storing in my session object and decided
> > that Session.detach () and Session.attach() should go ahead and pass
> > the message on to its child detachable models (later I have realized
> > this is probably not a good idea). The behavior i was seeing was that
> > when two requests for the same session were made in rapid succession I
> >
> > would get a null pointer exception. It appeared that thread2 attached
> > the module, thread1 detached the model, and then thread2 continued
> > with a detached model.
> >
> > Could something similar to this happen with a model that is stored in
> > the page map? What if a user clicked on a stateful link twice quickly?
> > Does wicket protect against this potential issue?
> >
> > Ryan
> >
> > -------------------------------------------------------------------------
> >
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> > share your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to