/** * Attempts to automatically initialize the framework by reading the configuration parameters * from a resource. The name of the resource depends on the name of the current backend. If * such resource is not found, a default fenix-framework.properties will still be attempted. If * neither a backend specific nor a default properties file is found, then the auto * initialization process gives up. */ private static void tryAutoInit() { /* first load the default configuration if it exists */ Properties props = loadProperties(FENIX_FRAMEWORK_CONFIG_RESOURCE_DEFAULT, new Properties()); logger.debug("Fenix Framework properties after reading default config file:" + props.toString()); /* look up current backend's name */ String currentBackEndName = BackEndId.getBackEndId().getBackEndName(); logger.debug("CurrentBackEndName = " + currentBackEndName); /* then override with the backend-specific config file */ props = loadProperties(FENIX_FRAMEWORK_CONFIG_RESOURCE_PREFIX + currentBackEndName + FENIX_FRAMEWORK_CONFIG_RESOURCE_SUFFIX, props); logger.debug("Fenix Framework properties after reading backend config file:" + props.toString()); /* finally, enforce any system properties */ props = loadSystemProperties(props); logger.debug("Fenix Framework properties after enforcing system properties:" + props.toString()); // try auto init for the given properties. If none exists just skip if (props.isEmpty() || !tryAutoInit(props)) { logger.info("Skipping configuration by convention."); } }