PluginContext context = WebPluginLifeCycle.getPluginContext(contextPath);
if (context != null) {
Boolean enabled = context.getProperty(WebPlugin.ENABLED);
if (enabled != null && enabled) {
log.fine("Using shell " + context);
ShellFactory factory = context.getPlugin(ShellFactory.class);
Principal user = wsSession.getUserPrincipal();
Shell shell = factory.create(user);
CRaSHSession session = new CRaSHSession(wsSession, shell);
sessions.put(wsSession.getId(), session);
log.fine("Established session " + wsSession.getId());
} else {
log.fine("Web plugin disabled");