cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <robby.pelss...@ciber.com>
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?

Robby

-----Original Message-----
From: Fawzib Rojas [mailto:f_rojas@spectron-msim.com] 
Sent: Friday, March 19, 2010 8:03 PM
To: users@cocoon.apache.org
Subject: Re: Runnable in flowscript?

Output:

fmt= pdf2
output_stream = com.spectron.io.FileProgressOutputStream@fc8361

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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


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


Mime
View raw message