// This pool is used to run scripts. As a cached thread pool it will grow as necessary and shrink
// down to zero when idle. This is a separate thread pool because these threads persist for the life
// of the script.
scriptPool = Executors.newCachedThreadPool(new PoolNameFactory("Trireme Script Thread"));
contextFactory = new RhinoContextFactory();
contextFactory.setJsVersion(DEFAULT_JS_VERSION);
contextFactory.setOptLevel(optLevel);
contextFactory.setCountOperations(scriptTimeLimit > 0L);
contextFactory.setExtraClassShutter(getSandbox() == null ? null : getSandbox().getExtraClassShutter());