cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <>
Subject Re: Fwd: Flow concurrency (was Re: Action Vs Logicsheet)
Date Tue, 08 Aug 2006 05:21:39 GMT
Mark Lundquist wrote:
> Hi,
> I posted this on the users list a few days ago, but never got a 
> definitive answer (I did find out that this is *not* the case for 
> javaflow :-), but that's not really an answer... I want to know if it 
> *is* the case for flowscript).
> cheers,
> —ml—
> Begin forwarded message:
>> From: Mark Lundquist <>
>> On Aug 1, 2006, at 1:46 PM, wrote:
>>>> You're saying that flow calls in concurrently received requests within
>>>> a session are processed serially, not in parallel threads?  Is that
>>>> right?
>>> That's pretty much it in a nutshell, yes.
>> wow...
>> Is there a developer around who can confirm/refute the above?

I guess that's right, see the code of the FOM_JavascriptInterpreter line 563 (in 

ThreadScope thrScope = getSessionScope();
synchronized (thrScope) {
    ClassLoader savedClassLoader =
     FOM_Cocoon cocoon = null;
     try {
        try {
            setupContext(redirector, context, thrScope);
            cocoon = (FOM_Cocoon) thrScope.get("cocoon", thrScope);

I remember that we had concurrency issues with Rhino a long time ago. It might 
be that they have gone in the meantime with Rhino 1.6. If concurrency is really 
an issue for you, experimenting with synchronization is definitly worth a try.

But note that synchronization is done based on the thread scope object. AFAIU 
every user has a thread scope per session _and_ per sitemap. That means that 
only requests to the same sitemap and the same session are blocking.

Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}



Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:

View raw message