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