if (startup == null) { StartupObject startupObject = new StartupObject(new AppContext("none", SystemInstance.get(), Thread.currentThread().getContextClassLoader(), null, null, true), new AppInfo(), Collections.<BeanContext> emptyList()); lifecycle.startApplication(startupObject);
private BeanContext createDeployment(final Class<?> testClass) { try { final AppContext appContext = new AppContext("", SystemInstance.get(), testClass.getClassLoader(), new IvmContext(), new IvmContext(), false); final ModuleContext moduleContext = new ModuleContext("", null, "", appContext, new IvmContext(), null); return new BeanContext(null, new IvmContext(), moduleContext, testClass, null, null, null, null, null, null, null, null, null, BeanType.MANAGED, false, false); } catch (final SystemException e) { throw new IllegalStateException(e); } }
@Override public void init(final ServletConfig servletConfig) throws ServletException { final String contextRoot = servletConfig.getServletContext().getContextPath(); final String context = contextRoot == null || contextRoot.equals("") ? "" : contextRoot.substring(1); app = SystemInstance.get().getComponent(ContainerSystem.class).getAppContext(context); if (app == null) { // could be if we skip EE integration, fake an app app = new AppContext(context, SystemInstance.get(), servletConfig.getServletContext().getClassLoader(), new IvmContext(), new IvmContext(), true); app.set(GovernanceApplicationScopedService.class, new GovernanceApplicationScopedService(app.getId())); final WebContext webContext = new WebContext(app); webContext.setContextRoot(context); webContext.setHost(servletConfig.getServletContext().getServletContextName()); app.getWebContexts().add(webContext); } super.init(servletConfig); SystemInstance.get().fireEvent( new ServerCreated( server, app, app.getWebContexts().iterator().next(), contextRoot)); app = null; }
final AppContext appContext = new AppContext(appInfo.appId, SystemInstance.get(), classLoader, globalJndiContext, appJndiContext, appInfo.standaloneModule); appContext.getProperties().putAll(appInfo.properties); appContext.getInjections().addAll(injections);
final AppContext appContext = new AppContext(appInfo.appId, SystemInstance.get(), classLoader, globalJndiContext, appJndiContext, appInfo.standaloneModule); appContext.getProperties().putAll(appInfo.properties); appContext.getInjections().addAll(injections);