WebBeansContext oldContext = GeronimoSingletonService.contextEntered(webBeansContext);
//from OWB's WebBeansConfigurationListener
try {
if (startup == null) {
//this should only be used for servlet tests
StartupObject startupObject = new StartupObject(new AppContext("none", SystemInstance.get(), Thread.currentThread().getContextClassLoader(), null, null, true), new AppInfo(),
Collections.<BeanContext> emptyList());
lifecycle.startApplication(startupObject);
//lifecycle.startServletContext((ServletContext)startup);
} else if (startup instanceof StartupObject) {
lifecycle.startApplication(startup);