You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Parolini <to...@employer.com.br> on 2001/06/01 19:21:55 UTC
Cocoon and threads
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...
Any clues ?
- tony
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Cocoon and threads
Posted by Antonio Parolini <to...@employer.com.br>.
I think this beaviour was given by IE. I made the test on the same machine
using dfferente IE sessions...
Sorry about this...
The page seems now to be synchronized...
- Tony
> -----Original Message-----
> From: Antonio Parolini [mailto:tony@employer.com.br]
> Sent: sexta-feira, 1 de junho de 2001 14:22
> To: cocoon-users@xml.apache.org
> Subject: Cocoon and threads
>
>
>
> 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...
>
> Any clues ?
>
> - tony
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Cocoon and threads
Posted by Donald Ball <ba...@webslingerZ.com>.
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>