Output:
fmt= pdf2
output_stream = com.spectron.io.fileprogressoutputstr...@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-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org