X-Git-Url: http://git.megacz.com/?p=org.ibex.xt.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fxt%2FPrevalence.java;fp=src%2Forg%2Fibex%2Fxt%2FPrevalence.java;h=2057f23dece314374e6db0bfa27a33f677a79edc;hp=ef871474e9cc694058d1623e62a257eeb4ffb387;hb=da7cc154ec697b179afd2aa5dc4c46771f21936e;hpb=5365f47787b1b4eeca31ad5da2373237371e264e diff --git a/src/org/ibex/xt/Prevalence.java b/src/org/ibex/xt/Prevalence.java index ef87147..2057f23 100644 --- a/src/org/ibex/xt/Prevalence.java +++ b/src/org/ibex/xt/Prevalence.java @@ -46,6 +46,7 @@ public class Prevalence { String base = cx.getRealPath("/") + "WEB-INF" + File.separatorChar + "prevalent"; System.err.println("prevayling to " + base); pf.configurePrevalenceBase(base); + /* XStreamSnapshotManager manager = new XStreamSnapshotManager(new JS(), base, null) { protected XStream createXStream() { XStream xstream = new XStream(); @@ -56,6 +57,8 @@ public class Prevalence { }; System.err.println("configuring with " + manager); pf.configureSnapshotManager(manager); + */ + pf.configureSnapshotManager(new SnapshotManager(new JS(), base)); //pf.configureClassLoader(JSTransaction.class.getClassLoader()); prevayler = pf.create(); prevaylers.put(cx, prevayler); @@ -68,10 +71,27 @@ public class Prevalence { public static class JSTransaction implements Transaction { public static final long serialVersionUid = 0xfb2aa281; private JS js; - public JSTransaction(JS js) { this.js = js; } + JSScope newscope; + Vec v; + public JSTransaction(JS js) throws JSExn { + newscope = new JSScope(null); + this.js = JS.cloneWithNewParentScope(js, newscope); + v = JS.getFormalArgs(this.js); + for(int i=0; i