Example #1
0
 private Map<PropertyKey, String> readConf(boolean isDef) throws SystemCoreException {
   InputStream in = null;
   try {
     if (isDef) in = findNodeDefConfStream();
     else in = findNodeConfStream();
     if (in == null) {
       if (!isDef)
         SystemLogger.info(
             "Server configuration provider could not find any '"
                 + SERVER_CONF
                 + "' file inconfiguration directory or in class path; Using default only.");
       return null;
     } else {
       Properties props = new Properties();
       props.load(in);
       loadSystemProperties(props);
       return MapConfiguration.convert(props);
     }
   } catch (IOException e) {
     throw new SystemCoreException(
         "Server configuration provider failed to read configuration; Received message: "
             + e.getMessage(),
         e);
   } finally {
     IoUtil.safeClose(in);
   }
 }