Permalink
Browse files

properly reinitialize the script cache

  • Loading branch information...
1 parent 58375af commit 25eff098cfddfbb29be394daf547a6b88e6ea89b @skuro committed Dec 2, 2011
@@ -18,7 +18,7 @@
public class ClojureScriptProcessor extends AbstractScriptProcessor {
private static final Log log = LogFactory.getLog(ClojureScriptProcessor.class);
- private final Map<String, WebScript> compiledWebScripts =
+ private Map<String, WebScript> compiledWebScripts =
Collections.synchronizedMap(new HashMap<String,WebScript>());
/* (non-Javadoc)
@@ -97,7 +97,7 @@ public Object executeScript(ScriptContent scriptContent, Map<String, Object> mod
throw new ScriptException("Cannot compile Clojure web script at path " + path);
}
- synchronized (this.compiledWebScripts) {
+ synchronized (this) {
if (log.isDebugEnabled()) {
log.debug("Caching Clojure webscript at path " + path);
}
@@ -121,5 +121,6 @@ public Object unwrapValue(Object value) {
public void reset() {
init();
+ this.compiledWebScripts = Collections.synchronizedMap(new HashMap<String,WebScript>());
}
}

0 comments on commit 25eff09

Please sign in to comment.