private static void applyOverrides(final Properties properties) { final Properties system = SystemInstance.get().getProperties(); for (final Map.Entry<Object, Object> entry : system.entrySet()) { final String key = entry.getKey().toString(); if (key.startsWith("log4j.") && !key.equals("log4j.configuration")) { properties.put(key, entry.getValue()); } } }
private static void applyOverrides(Properties properties) { Properties system = SystemInstance.get().getProperties(); for (Map.Entry<Object, Object> entry : system.entrySet()) { String key = entry.getKey().toString(); if (key.startsWith("log4j.") && !key.equals("log4j.configuration")){ properties.put(key, entry.getValue()); } } }
@Override public synchronized String lookup(final String key) { String value = SystemInstance.get().getProperties().getProperty(key); if (value != null) { return value; } value = ENV.get(key); if (value != null) { return value; } return null; }
private static void applyOverrides(Properties properties) { Properties system = SystemInstance.get().getProperties(); for (Map.Entry<Object, Object> entry : system.entrySet()) { String key = entry.getKey().toString(); if (key.startsWith("log4j.") && !key.equals("log4j.configuration")){ properties.put(key, entry.getValue()); } } }
private static void applyOverrides(final Properties properties) { final Properties system = SystemInstance.get().getProperties(); for (final Map.Entry<Object, Object> entry : system.entrySet()) { final String key = entry.getKey().toString(); if (key.startsWith("log4j.") && !key.equals("log4j.configuration")) { properties.put(key, entry.getValue()); } } }
@Override public synchronized String lookup(final String key) { String value = SystemInstance.get().getProperties().getProperty(key); if (value != null) { return value; } value = ENV.get(key); if (value != null) { return value; } return null; }
public static void loadPropertiesDeclaredConfiguration(final Openejb openejb) { final Properties sysProps = new Properties(System.getProperties()); sysProps.putAll(SystemInstance.get().getProperties()); fillOpenEjb(openejb, sysProps); }
protected static Properties getSystemProperties(final String serviceId, final String serviceType) { // Override with system properties final Properties sysProps = new Properties(System.getProperties()); sysProps.putAll(SystemInstance.get().getProperties()); return getOverrides(sysProps, serviceId, serviceType); }
@Override public void validate(final AppModule appModule) { this.module = appModule; final Properties systemProperties = SystemInstance.get().getProperties(); final Iterator iterator = incorrectAndCorrectPropNames.entrySet().iterator(); while (iterator.hasNext()) { final Map.Entry<String, String> entry = (Map.Entry<String, String>) iterator.next(); if (systemProperties.containsKey(entry.getKey())) { warn(appModule.toString(), "incorrect.property.name", entry.getKey(), entry.getValue()); } } } }
@Override public void validate(final AppModule appModule) { this.module = appModule; final Properties systemProperties = SystemInstance.get().getProperties(); final Iterator iterator = incorrectAndCorrectPropNames.entrySet().iterator(); while (iterator.hasNext()) { final Map.Entry<String, String> entry = (Map.Entry<String, String>) iterator.next(); if (systemProperties.containsKey(entry.getKey())) { warn(appModule.toString(), "incorrect.property.name", entry.getKey(), entry.getValue()); } } } }
public LoggerCreator(final String channel) { name = channel; // force eager init if config overrided final Properties p = SystemInstance.get().getProperties(); final String levelName = p.getProperty("logging.level." + channel); if (levelName != null) { try { call(); } catch (final Exception e) { // no-op } } }
@Override public void init(final FilterConfig filterConfig) throws ServletException { final SystemInstance si = SystemInstance.isInitialized() ? SystemInstance.get() : null; final Properties config = si != null ? si.getProperties() : System.getProperties(); securityService = si != null ? si.getComponent(SecurityService.class) : null; active = Boolean.parseBoolean(config.getProperty("tomee.http.request.wrap", "true")); }
protected static Properties getSystemProperties(final String serviceId, final String serviceType) { // Override with system properties final Properties sysProps = new Properties(JavaSecurityManagers.getSystemProperties()); sysProps.putAll(SystemInstance.get().getProperties()); return getOverrides(sysProps, serviceId, serviceType); }
public static void loadPropertiesDeclaredConfiguration(final Openejb openejb) { final Properties sysProps = new Properties(JavaSecurityManagers.getSystemProperties()); sysProps.putAll(SystemInstance.get().getProperties()); fillOpenEjb(openejb, sysProps); }
public static String searchForConfiguration(String path) throws OpenEJBException { return ConfigUtils.searchForConfiguration(path, SystemInstance.get().getProperties()); }
@Override public AppModule deploy(final AppModule appModule) throws OpenEJBException { final Properties overrides = new Properties(); overrides.putAll(SystemInstance.get().getProperties()); overrides.putAll(appModule.getProperties()); for (final DeploymentModule module : appModule.getDeploymentModule()) { readProperties(module); applyOverrides(overrides, module); } return appModule; }
@Override public AppModule deploy(final AppModule appModule) throws OpenEJBException { final Properties overrides = new Properties(); overrides.putAll(SystemInstance.get().getProperties()); overrides.putAll(appModule.getProperties()); for (final DeploymentModule module : appModule.getDeploymentModule()) { readProperties(module); applyOverrides(overrides, module); } return appModule; }
public OptimizedLoaderService(final Properties appConfig) { this( is("openejb.cdi.ignore-not-loadable-extensions", appConfig, SystemInstance.get().getProperties(), "false") ? new FilterableServiceLoader() : new DefaultLoaderService(), appConfig); }
private static void initServer(final SystemInstance system) throws Exception { Server server = Server.getInstance(); server.init(system.getProperties()); system.setComponent(Server.class, server); server.start(); } }
private static void initServer() throws Exception { Server server = new Server(); server.init(SystemInstance.get().getProperties()); server.start(); } }