private static RuntimeDelegate createRuntimeInstanceFromConfigurationFile() { RuntimeDelegate result=null; File configFile = getConfigurationFile(); if(configFile.canRead()) { InputStream is=null; try { is=new FileInputStream(configFile); Properties configProperties=new Properties(); configProperties.load(is); String delegateClassName=configProperties.getProperty(LDP4J_APPLICATION_SPI_PROPERTY); if(delegateClassName!=null) { result=createRuntimeInstanceForClassName(delegateClassName); } if(delegateClassName==null && LOGGER.isWarnEnabled()) { LOGGER.warn("Configuration file '"+configFile.getAbsolutePath()+"' does not define a delegate class name"); } } catch(FileNotFoundException e) { if(LOGGER.isDebugEnabled()) { LOGGER.debug("Could not find runtime instance configuration file '"+configFile.getAbsolutePath()+"'",e); } } catch(IOException e) { if(LOGGER.isWarnEnabled()) { LOGGER.warn("Could not load runtime instance configuration file '"+configFile.getAbsolutePath()+"'",e); } } finally { closeQuietly(is, "Could not close configuration properties"); } } return result; }