cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject Re: Another bug in javaflow?
Date Sat, 12 Jun 2004 12:22:45 GMT
Am Fr, den 11.06.2004 schrieb Stephan Coboos um 19:06:
> Hello,
> 
> please have a look at the following java flow code:
> 
> ...
> 
> public class TestFlow extends AbstractContinuable{
>    
>     private boolean foo= false;
> 
>     public void doTest() throws Exception {
>    
>         while(true) {
>    
>             this.getLogger().debug("reload = " + this.foo);
>            
>             this.sendPageAndWait("test.jxt");
>        
>             this.foo= true;
>         }
>     }
> }
> 
> I assume if I'am "hopping" from continuation to continuation the 
> variable "foo" should always be "true". It's ok it is always "true".
> 
> BUT: If I reload the page in my browser (hard reload) the var "foo" is 
> "true", too. There is no initialization process! So "foo" is always 
> "true" in the same browser instance. In my opinion, If I make a reload 
> without a call of a continuation the var reload should be false, should it?
> 
> Is it another bug in javaflow?

In the current implementation the flow object is stored into the
session. So after the first initialization of "foo" to "true",  you
will get the value "true" for all called continuations from the same
browser.

member variables have the scope of the seesion.
local variable have the scope of the continuation.

Stephan.


Mime
View raw message