I sent a message to the Mozilla JavaScript newsgroup and got the following reply...
> It's not currently possible to serialize the execution state of the Rhino > interpreter, if that's what you're requesting. However there has been > some work on this by Christopher Oliver, see > > http://groups.google.com/groups?q=group:netscape.public.mozilla.jseng+author: > Christopher+author:Oliver&hl=en&selm=3BB3A10D.D7B1DE48%40mminternet.com&rnum= > 4 > > Rhino 1.5R3 introduced serialization for the first time, but I was > hesitant to add the ability to serialize execution state. Perhaps it is > worth considering for 1.5R4. If you take a look at the URL, you get the following nice tidbit... > >function foo(level) { > > var now = new java.util.Date(); > > if(level > 5) { > > print("run the file foo.jss"); > > capture("foo.jss"); > > } else { > > print("next level"); > > foo(level + 1); > > } print("restarted("+level+"): " + now) > >} > > > >foo(1); > > > >//c/rhinoSer/rhino1_5R3pre> date > >Thu Sep 27 09:44:30 2001 > >//c/rhinoSer/rhino1_5R3pre> java -cp jss.jar > org.mozilla.javascript.tools.shell.Main -opt -1 foo.js > >next level > >next level > >next level > >next level > >next level > >run the file foo.jss > >//c/rhinoSer/rhino1_5R3pre> date > >Thu Sep 27 09:44:37 2001 > >//c/rhinoSer/rhino1_5R3pre> java -cp jss.jar > >org.mozilla.javascript.tools.shell.Main -opt -1 foo.jss > >restarted(6): Thu Sep 27 09:44:33 PDT 2001 > >restarted(5): Thu Sep 27 09:44:33 PDT 2001 > >restarted(4): Thu Sep 27 09:44:33 PDT 2001 > >restarted(3): Thu Sep 27 09:44:33 PDT 2001 > >restarted(2): Thu Sep 27 09:44:33 PDT 2001 > >restarted(1): Thu Sep 27 09:44:33 PDT 2001 Maybe I'm just feeling optimistic, but this looks almost exactly like what would be needed for Cocoon. Granted that this code is experimental, but if the nice man from Mozilla is willing to incorporate it into Rhino 1.5, then we'll be set. Comments? Jason Foster --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]