public static synchronized ServletServicesConfig loadConfig(ServletContext context, ServicesConfig servicesConfig) { ServletServicesConfig servletServicesConfig = new ServletServicesConfig(context, servicesConfig); context.setAttribute(SERVICES_CONFIG_KEY, servletServicesConfig); return servletServicesConfig; } }
public static synchronized ServicesConfig loadConfig(ServletContext context) throws ServletException { return loadConfig(context, false); }
serviceConfigurator.configureServices(context); else ServletServicesConfig.loadConfig(context); GraniteMBeanInitializer.registerMBeans(context, ServletGraniteConfig.getServletConfig(context), ServletServicesConfig.getServletConfig(context));
public void init(FilterConfig config) throws ServletException { this.config = config; this.graniteConfig = ServletGraniteConfig.loadConfig(config.getServletContext()); this.servicesConfig = ServletServicesConfig.loadConfig(config.getServletContext()); closeStreams = ServletParams.get(config, "closeStreams", Boolean.TYPE, true); inputBufferSize = ServletParams.get(config, "inputBufferSize", Integer.TYPE, null); outputBufferSize = ServletParams.get(config, "outputBufferSize", Integer.TYPE, null); if (inputBufferSize != null && inputBufferSize <= 0) throw new ServletException("Illegal value for inputBufferSize=" + inputBufferSize + " (should be > 0, fix your web.xml)"); if (outputBufferSize != null && outputBufferSize <= 0) throw new ServletException("Illegal value for outputBufferSize=" + outputBufferSize + " (should be > 0, fix your web.xml)"); log.info("Using configuration: {closeStreams=%s, inputBufferSize=%s, outputBufferSize=%s}", closeStreams, inputBufferSize, outputBufferSize); jmfSharedContext = GraniteConfigListener.getSharedContext(config.getServletContext()); }
ServicesConfig servicesConfig = new ServicesConfig(is, configuration, skipScan ? false : graniteConfig.getScan()); servletServicesConfig = loadConfig(context, servicesConfig);
graniteConfig.setSharedContext(GraniteConfigListener.getSharedContext(context)); ServicesConfig servicesConfig = ServletServicesConfig.loadConfig(context);
protected void init(ServletContext servletContext, String configPath) throws IOException, SAXException { String path = configuration.getGraniteConfig(); if (path == null) path = GRANITE_CONFIG_DEFAULT; InputStream is = servletContext.getResourceAsStream(path); if (is == null) { log.warn("Could not load custom granite-config.xml: %s (file does not exists)", path); path = null; } this.graniteConfig = new GraniteConfig(configPath, is, null, null); ServletGraniteConfig.loadConfig(servletContext, graniteConfig); path = configuration.getFlexServicesConfig(); if (path == null) path = SERVICES_CONFIG_DEFAULT; is = servletContext.getResourceAsStream(path); if (is == null) { log.warn("Could not load custom services-config.xml: %s (file does not exists)", path); path = null; } this.servicesConfig = new ServicesConfig(is, null, false); ServletServicesConfig.loadConfig(servletContext, servicesConfig); }
public void configureServices(ServletContext servletContext) throws ServletException { GraniteConfig graniteConfig = ServletGraniteConfig.loadConfig(servletContext); ServicesConfig servicesConfig = ServletServicesConfig.loadConfig(servletContext, true);
public void configureGravityServices(ServletContext servletContext) throws ServletException { ServicesConfig servicesConfig = ServletServicesConfig.loadConfig(servletContext);