> > OK so any code outside these functions will get run at the point the code > is loaded. Do we give any guarantees about that - for example, how often do > we load that code? Under what conditions do we unload etc.? > > Maybe for starters we should say that there must not be any code outside > of these functions and if you put anything there and it does something that > your problem/luck and that we do not guarantee how that will hold up in the > future. >
At the moment, it doesn't use Rhino's compiled scripts. What it does is just load the script when a request needs to be served. So, for the best performance, we have to use compiled scripts. Currently, the problem of global variable access is there. We need to find the best solution for it. Anyway, a compiled script is executed on a given scope. i.e. We need to pass a toplevel scope into the compiled script when we execute it. So, we will have to keep a per *.jss scope object in the memory in order to keep those globally defined variable values. Again, scope objects in Rhino implement java.io.Serializable interface. So we can serialize the per *.jss scope and load when ever needed. regards, Ruchira
_______________________________________________ Carbon-dev mailing list [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
