final Context globalContext = application.getGlobalJndiContext();
final Context globalContext = application.getGlobalJndiContext();
private OpenEjbContainer(final Map<?, ?> map, final AppContext appContext) { webBeanContext = appContext.getWebBeansContext(); globalJndiContext = new GlobalContext(appContext.getGlobalJndiContext()); final Properties properties = new Properties(); properties.putAll(map); options = new Options(properties); startNetworkServices(); servletContext = new MockServletContext(); session = new MockHttpSession(); try { startContexts(webBeanContext.getContextsService(), servletContext, session); } catch (final Exception e) { logger().warning("can't start all CDI contexts", e); } }
private OpenEjbContainer(final Map<?, ?> map, final AppContext appContext) { webBeanContext = appContext.getWebBeansContext(); globalJndiContext = new GlobalContext(appContext.getGlobalJndiContext()); final Properties properties = new Properties(); properties.putAll(map); options = new Options(properties); startNetworkServices(); if (webBeanContext != null) { servletContext = new MockServletContext(); session = new MockHttpSession(); try { startContexts(webBeanContext.getContextsService(), servletContext, session); } catch (final Exception e) { logger().warning("can't start all CDI contexts", e); } } }
webContext.setBindings(bindings); webContext.getBindings().putAll(new JndiEncBuilder(webAppInfo.jndiEnc, injections, webAppInfo.moduleId, "Bean", null, webAppInfo.uniqueId, classLoader, appInfo.properties).buildBindings(JndiEncBuilder.JndiScope.comp)); webContext.setJndiEnc(WebInitialContext.create(bindings, appContext.getGlobalJndiContext())); webContext.setClassLoader(classLoader); webContext.setId(webAppInfo.moduleId);
webContext.setBindings(bindings); webContext.getBindings().putAll(new JndiEncBuilder(webAppInfo.jndiEnc, injections, webAppInfo.moduleId, "Bean", null, webAppInfo.uniqueId, classLoader, appInfo.properties).buildBindings(JndiEncBuilder.JndiScope.comp)); webContext.setJndiEnc(WebInitialContext.create(bindings, appContext.getGlobalJndiContext())); webContext.setClassLoader(classLoader); webContext.setId(webAppInfo.moduleId);
System.getProperties().put(OPENEJB_APPLICATION_COMPOSER_CONTEXT, appContext.getGlobalJndiContext());
bind(compJndiContext, "module", moduleContext.getModuleJndiContext()); bind(compJndiContext, "app", moduleContext.getAppContext().getAppJndiContext()); bind(compJndiContext, "global", moduleContext.getAppContext().getGlobalJndiContext());
bind(compJndiContext, "module", moduleContext.getModuleJndiContext()); bind(compJndiContext, "app", moduleContext.getAppContext().getAppJndiContext()); bind(compJndiContext, "global", moduleContext.getAppContext().getGlobalJndiContext());
JavaSecurityManagers.setSystemProperty(OPENEJB_APPLICATION_COMPOSER_CONTEXT, appContext.getGlobalJndiContext());