public LdapDicomConfiguration() throws ConfigurationException { this(ResourceManager.getInitialEnvironment()); }
public static Properties getInitialEnvironment() throws ConfigurationException { ClassLoader cl = getContextClassLoader(); synchronized (propertiesCache) { Properties props = propertiesCache.get(cl); if (props != null) return props; props = new Properties(); InputStream is = getResourceAsStream(cl, APP_RESOURCE_FILE_NAME); if (is == null) { throw new ConfigurationException( "Failed to access resource: " + APP_RESOURCE_FILE_NAME); } try { props.load(is); } catch (IOException e) { throw new ConfigurationException( "Failed to parse resource: " + APP_RESOURCE_FILE_NAME); } finally { SafeClose.close(is); } propertiesCache.put(cl, props); return props; } }
public static Properties getInitialEnvironment() throws ConfigurationException { ClassLoader cl = getContextClassLoader(); synchronized (propertiesCache) { Properties props = propertiesCache.get(cl); if (props != null) return props; props = new Properties(); InputStream is = getResourceAsStream(cl, APP_RESOURCE_FILE_NAME); if (is == null) { throw new ConfigurationException( "Failed to access resource: " + APP_RESOURCE_FILE_NAME); } try { props.load(is); } catch (IOException e) { throw new ConfigurationException( "Failed to parse resource: " + APP_RESOURCE_FILE_NAME); } finally { SafeClose.close(is); } propertiesCache.put(cl, props); return props; } }
public LdapDicomConfiguration() throws ConfigurationException { this(ResourceManager.getInitialEnvironment()); }