{
Object[] scriptWrappers = wfses.values().toArray();
for (int i = 0; i < scriptWrappers.length; i++)
{
ScriptWrapper scriptWrapper = (ScriptWrapper) scriptWrappers[i];
ScriptCompilationContext ctxt = scriptWrapper.getServletEngineContext();
// scriptWrapper also synchronizes on this when
// it detects it has to do a reload
synchronized (scriptWrapper)
{
try
{
ctxt.compile();
}
catch (FileNotFoundException ex)
{
ctxt.incrementRemoved();
}
catch (Throwable t)
{
scriptWrapper.getServletContext().log("Background compile failed", t);
}