August 17, 2002

Changes in Cocoon's flow engine


The global space of the variables is no longer shared between users now. Each user has his/her own space for the global variables, and the only way to share information between different users is by means of the servlet API or Cocoon's Environment object.

Another visible change is the fact that scripts now reload as expected when they are modified, when they are declared using the file: protocol. Unfortunately the migration of Source from Cocoon to Avalon (org.apache.avalon.excalibur.source.impl.ResourceSource) broke the reload of the files declared using the resource: protocol. The problem is that the getLastModified() method on the Excalibur ResourceSource always returns 0, instead of checking the timestamp of the real file if possible (see org.apache.avalon.excalibur.source.impl.AbstractSource).

The next thing which I'm working on is to have the JavaScript org.mozilla.javascript.Scriptable object saved in the user' session object, if one is available. This will allow invocations of top level functions (those called using <map:call function="...">) to share the same values of the global variables. This will improve even further the functionality of the whole flow engine, as it will allow applications to invoke top-level functions that implement different parts of the application in the same global scope context, e.g. with the same global variables.

Posted by ovidiu at August 17, 2002 11:34 AM |
Copyright © 2002-2016 Ovidiu Predescu.