String contextPath = context.getContextPath();
synchronized (lock) {
if (!contextMap.containsKey(contextPath)) {
ClassLoader webAppLoader = Thread.currentThread().getContextClassLoader();
PluginDiscovery discovery = createDiscovery(context, webAppLoader);
PluginContext pluginContext = start(new ServletContextMap(context), discovery, context.getClassLoader());
contextMap.put(contextPath, pluginContext);
registered = true;
}
}
}