cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: Cocoon and threads
Date Fri, 01 Jun 2001 19:36:06 GMT
On Fri, 1 Jun 2001, Antonio Parolini wrote:

>
> Hi there,
>
> Let's think about the following XSP page accessed by two users in the same
> time:
>
> <page>
> 	<xsp:logic>
> 	String sName = session.getAttribute("name") ;
> 	[...]
> 	</xsp:logic>
>
> 	Welcome <xsp:expr>sName</xsp:expr>
> </page>
>
> In concurency tests I made, sometimes, users don't see their own name on the
> browser!
>
> One could put all the xsp page logic into a synchronize(this){ [..] }
> block...
>
> But I was wondering if someone already ran into this problem and what is the
> reason why XSP pages aren't already declared as synchronized...

they don't need to be, as long as you restrict yourself to method
variables and not class variables. i can't tell why your example wouldn't
work perfectly - maybe if you'd post your entire xsp page...?

- donald


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message