private static void doTestServingLayer(Config config) throws IOException { try (ServingLayer servingLayer = new ServingLayer(config)) { servingLayer.start(); Context context = servingLayer.getContext(); assertNotNull(context.findErrorPage(500)); assertEquals(0, context.getApplicationLifecycleListeners().length); assertNotNull(context.findParameter(ConfigUtils.class.getName() + ".serialized")); assertNotNull(context.getName()); assertGreaterOrEqual(Double.parseDouble(context.getWebappVersion()), 3.1); } }
/** * Register wrapper. */ private void registerWrapper(Wrapper wrapper) { Context context = (Context) wrapper.getParent(); String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } String version = context.getWebappVersion(); String hostName = context.getParent().getName(); List<WrapperMappingInfo> wrappers = new ArrayList<>(); prepareWrapperMappingInfo(context, wrapper, wrappers); mapper.addWrappers(hostName, contextPath, version, wrappers); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerWrapper", wrapper.getName(), contextPath, service)); } }
/** * Register wrapper. */ private void registerWrapper(Wrapper wrapper) { Context context = (Context) wrapper.getParent(); String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } String version = context.getWebappVersion(); String hostName = context.getParent().getName(); List<WrapperMappingInfo> wrappers = new ArrayList<>(); prepareWrapperMappingInfo(context, wrapper, wrappers); mapper.addWrappers(hostName, contextPath, version, wrappers); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerWrapper", wrapper.getName(), contextPath, service)); } }
/** * Unregister context. */ private void unregisterContext(Context context) { // Don't un-map a context that is paused if (context.getPaused()){ return; } String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } String hostName = context.getParent().getName(); if(log.isDebugEnabled()) log.debug(sm.getString("mapperListener.unregisterContext", contextPath, connector)); mapper.removeContextVersion(hostName, contextPath, context.getWebappVersion()); }
/** * Unregister context. */ private void unregisterContext(Context context) { // Don't un-map a context that is paused if (context.getPaused()){ return; } String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } String hostName = context.getParent().getName(); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterContext", contextPath, service)); } mapper.removeContextVersion(context, hostName, contextPath, context.getWebappVersion()); }
/** * Unregister context. */ private void unregisterContext(Context context) { // Don't un-map a context that is paused if (context.getPaused()){ return; } String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } String hostName = context.getParent().getName(); if(log.isDebugEnabled()) log.debug(sm.getString("mapperListener.unregisterContext", contextPath, connector)); mapper.removeContextVersion(hostName, contextPath, context.getWebappVersion()); }
/** * Unregister context. */ private void unregisterContext(Context context) { // Don't un-map a context that is paused if (context.getPaused()){ return; } String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } String hostName = context.getParent().getName(); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterContext", contextPath, connector)); } mapper.removeContextVersion(hostName, contextPath, context.getWebappVersion()); }
/** * Unregister context. */ private void unregisterContext(Context context) { // Don't un-map a context that is paused if (context.getPaused()){ return; } String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } String hostName = context.getParent().getName(); if(log.isDebugEnabled()) log.debug(sm.getString("mapperListener.unregisterContext", contextPath, connector)); mapper.removeContextVersion(hostName, contextPath, context.getWebappVersion()); }
/** * Unregister context. */ private void unregisterContext(Context context) { // Don't un-map a context that is paused if (context.getPaused()){ return; } String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } String hostName = context.getParent().getName(); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterContext", contextPath, connector)); } mapper.removeContextVersion(hostName, contextPath, context.getWebappVersion()); }
/** * Unregister wrapper. */ private void unregisterWrapper(Wrapper wrapper) { Context context = ((Context) wrapper.getParent()); String contextPath = context.getPath(); String wrapperName = wrapper.getName(); if ("/".equals(contextPath)) { contextPath = ""; } String version = context.getWebappVersion(); String hostName = context.getParent().getName(); String[] mappings = wrapper.findMappings(); for (String mapping : mappings) { mapper.removeWrapper(hostName, contextPath, version, mapping); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterWrapper", wrapperName, contextPath, service)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Host host = (Host)context.getParent(); WebResourceRoot resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, service)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Container host = context.getParent(); javax.naming.Context resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, connector)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Container host = context.getParent(); javax.naming.Context resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, connector)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Container host = context.getParent(); javax.naming.Context resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, connector)); } }
/** * Unregister wrapper. */ private void unregisterWrapper(Wrapper wrapper) { String contextPath = ((Context) wrapper.getParent()).getPath(); String wrapperName = wrapper.getName(); if ("/".equals(contextPath)) { contextPath = ""; } String version = ((Context) wrapper.getParent()).getWebappVersion(); String hostName = wrapper.getParent().getParent().getName(); String[] mappings = wrapper.findMappings(); for (String mapping : mappings) { mapper.removeWrapper(hostName, contextPath, version, mapping); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterWrapper", wrapperName, contextPath, connector)); } }
/** * Unregister wrapper. */ private void unregisterWrapper(Wrapper wrapper) { String contextPath = ((Context) wrapper.getParent()).getPath(); String wrapperName = wrapper.getName(); if ("/".equals(contextPath)) { contextPath = ""; } String version = ((Context) wrapper.getParent()).getWebappVersion(); String hostName = wrapper.getParent().getParent().getName(); String[] mappings = wrapper.findMappings(); for (String mapping : mappings) { mapper.removeWrapper(hostName, contextPath, version, mapping); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterWrapper", wrapperName, contextPath, connector)); } }
/** * Unregister wrapper. */ private void unregisterWrapper(Wrapper wrapper) { String contextPath = ((Context) wrapper.getParent()).getPath(); String wrapperName = wrapper.getName(); if ("/".equals(contextPath)) { contextPath = ""; } String version = ((Context) wrapper.getParent()).getWebappVersion(); String hostName = wrapper.getParent().getParent().getName(); String[] mappings = wrapper.findMappings(); for (String mapping : mappings) { mapper.removeWrapper(hostName, contextPath, version, mapping); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterWrapper", wrapperName, contextPath, service)); } }
/** * Unregister wrapper. */ private void unregisterWrapper(Wrapper wrapper) { String contextPath = ((Context) wrapper.getParent()).getPath(); String wrapperName = wrapper.getName(); if ("/".equals(contextPath)) { contextPath = ""; } String version = ((Context) wrapper.getParent()).getWebappVersion(); String hostName = wrapper.getParent().getParent().getName(); String[] mappings = wrapper.findMappings(); for (String mapping : mappings) { mapper.removeWrapper(hostName, contextPath, version, mapping); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterWrapper", wrapperName, contextPath, connector)); } }
/** * Unregister wrapper. */ private void unregisterWrapper(Wrapper wrapper) { String contextPath = ((Context) wrapper.getParent()).getPath(); String wrapperName = wrapper.getName(); if ("/".equals(contextPath)) { contextPath = ""; } String version = ((Context) wrapper.getParent()).getWebappVersion(); String hostName = wrapper.getParent().getParent().getName(); String[] mappings = wrapper.findMappings(); for (String mapping : mappings) { mapper.removeWrapper(hostName, contextPath, version, mapping); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterWrapper", wrapperName, contextPath, connector)); } }
/** * Unregister wrapper. */ private void unregisterWrapper(Wrapper wrapper) { String contextPath = ((Context) wrapper.getParent()).getPath(); String wrapperName = wrapper.getName(); if ("/".equals(contextPath)) { contextPath = ""; } String version = ((Context) wrapper.getParent()).getWebappVersion(); String hostName = wrapper.getParent().getParent().getName(); String[] mappings = wrapper.findMappings(); for (String mapping : mappings) { mapper.removeWrapper(hostName, contextPath, version, mapping); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.unregisterWrapper", wrapperName, contextPath, connector)); } }