Hello,

Sorry if this an easy question, but I'm new to tapestry and couldn't quite 
figure out how does tapestry handle sessions. My main worry is concurrent 
access to session objects.

If two request for the same session arrive simultaneously, will the session 
object be accessed concurrently in two threads?

Take the following code:

______
@SessionState
Foo someSessionObject;
bool someSessionObjectExists; 

(…)

if( !someSessionObjectExists ){
        someSessionObject = getSomeSessionObject();
}
______

If two request with the same session execute that if statement the 
getSomeSessionObject() might be called twice and thus creating two objects.

Coming form WebObjects I usually don't have to worry about this because I know 
that two threads are never accessing the same Session object simultaneously. 
All session access is serialized.

So how does this work with tapestry?

PS: I'm playing with Tapestry 5.2.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to