Philippe Gassmann wrote:
Sylvain Wallez wrote:

Gianluca Morello wrote:

Hi,

I have a cocoon app with a pipeline that read (generator) and write
(writesource) the some xml file.
Because i have many concurrent requests i was wondering if is it possible to declare a pipeline as synchronized.


No you can't. You have to handle the locking by other means in a controller (action or flowscript).

Sylvain

How can you do that with actions ?

Well...

synchronized(lockObject) {
   Source syncedPipeline = resolver.resolveURI("cocoon://synced-pipeline");
   try {
       doSomeThingWith(synchedPipeline.getInputStream());
   } finally {
      resolver.release(syncedPipeline);
   }
}

Sylvain

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]