private WebBeansListener getWebBeansContext(ContextInfo contextInfo) { final AppContext appContext = getContainerSystem().getAppContext(contextInfo.appInfo.appId); if (appContext == null) return null; final WebBeansContext webBeansContext = appContext.getWebBeansContext(); if (webBeansContext == null) return null; return new WebBeansListener(webBeansContext); }
private WebBeansContext getWebBeansContext(final ContextInfo contextInfo) { final AppContext appContext = getContainerSystem().getAppContext(contextInfo.appInfo.appId); if (appContext == null) { return null; } WebBeansContext webBeansContext = appContext.getWebBeansContext(); if (webBeansContext == null) { return null; } for (final WebContext web : appContext.getWebContexts()) { final String stdName = removeFirstSlashAndWar(contextInfo.standardContext.getName()); if (stdName == null) { continue; } final String name = removeFirstSlashAndWar(web.getContextRoot()); if (stdName.equals(name)) { webBeansContext = web.getWebbeansContext(); if (Contexts.getHostname(contextInfo.standardContext).equals(web.getHost())) { break; } // else loop hoping to find a better matching } } if (webBeansContext == null) { webBeansContext = appContext.getWebBeansContext(); } return webBeansContext; }
if (isIgnored(standardContext)) return; CoreContainerSystem cs = getContainerSystem(); appContext = getContainerSystem().getAppContext(contextInfo.appInfo.appId);
ContextAccessController.setWritable(listenerName, standardContext.getNamingToken()); try { final Context openejbContext = (Context) getContainerSystem().getJNDIContext().lookup("openejb"); final Context root = (Context) ContextBindings.getClassLoader().lookup(""); final Context comp = (Context) ContextBindings.getClassLoader().lookup("comp"); // usually fails final WebContext webContext = getContainerSystem().getWebContext(currentWebAppInfo.moduleId); if (webContext != null) { webContext.setJndiEnc(root);
try { Context openejbContext = getContainerSystem().getJNDIContext(); openejbContext = (Context) openejbContext.lookup("openejb"); boolean isRoot = isRootApplication(standardContext); if (("/" + webAppInfo.contextRoot).equals(standardContext.getPath()) || isRoot) { WebContext webContext = getContainerSystem().getWebContext(webAppInfo.moduleId); if (webContext != null) { webContext.setJndiEnc(comp);
final CoreContainerSystem cs = getContainerSystem(); appContext = getContainerSystem().getAppContext(contextInfo.appInfo.appId);