Hi Jason,
I made a quick experiment with javaflow. Yeah, you are completely right, global variables DOES NOT span sessions, static ones does. They are initialized for each user session, and when the sitemap changes if sitemap gets reloaded. They are not bound to continuations, that means that if I initialize private int a = 1, then check a value and send a form, the set a = 2, if the user hits the back button "a" will still be 2. So, they should not be used for "state" informations with a scope smaller than user session, but can safely be initialized with session values.

Sorry for saying uncorrect things, I'm sure i had problems with global variables spaning different sessions in flowscript back in 2.1.6 and thought this remained unchanged 'till now.

Simone

Jason Johnston wrote:
Simone Gianni wrote:
  
Hey, pay attention. In Javaflow AND in flowscript, global variabiles are
quite dangerous : they are global in the real sense, can span different
user sessions, you should not use them if not for singleton classes, or
other really global data like configuration.
    

I'm pretty sure this is not correct; at least in flowscript global
variables (explicitly declared with the var keyword in global scope) are
attached to the user session and do not span across sessions.

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

  

Reply via email to