cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <>
Subject RE: Runnable in flowscript?
Date Fri, 19 Mar 2010 19:10:41 GMT
mm.... I actually was searching for the flowscript shipped with cocoon which is being called...
But I can't seem to find it in the cocoon sources... Which version of cocoon are you using
by the way?

I'm trying to understand what the flowscript function does ...since apparently it should set
some Avalon context.  You don't happen to have that script at hand?


-----Original Message-----
From: Fawzib Rojas [] 
Sent: Friday, March 19, 2010 8:03 PM
Subject: Re: Runnable in flowscript?


fmt= pdf2
output_stream =

I know that part works (i can access objects variables in thread) 
because I tested it with something like this:

var length=0;
var r = new java.lang.Runnable() {
     run: function() {
	while(true) length++;
new java.lang.Thread(r).start();
// Display the waiting page until complete:
while(!output_stream.isClosed()) {
   cocoon.sendPageAndWait("progress.jx",{ "length" : length });

And the progress page displayed the length variable, and it was 
increasing (the thread was working). The problem seems to be that inside 
the thread none of the cocoon-related objects can be used.

On 3/19/2010 2:53 PM, Robby Pelssers wrote:
> You're in fact using a closure here so I'm not sure if that's causing issues. Can you
add following debug statements?
> var r = new java.lang.Runnable() {
>      run: function() {
>          //add following print statements
>          print("fmt= " + fmt);
>          print("output_stream = " + ouput_stream);
>          // gives an exception here on the console
>          cocoon.processPipelineTo(fmt+"_pipe/"+url,{}, output_stream);
>          output_stream.close();
>      }
> };

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message