Examples of lookupFile()


Examples of org.infinispan.util.FileLookup.lookupFile()

      this.asyncExecutorFactory = asyncExecutorFactory;
   }

   public void setHotRodClientPropertiesFile(String hotRodClientPropertiesFile) {
      FileLookup fileLookup = FileLookupFactory.newInstance();
      InputStream inputStream = fileLookup.lookupFile(hotRodClientPropertiesFile, getClassLoader());
      try {
         hotRodClientProperties.load(inputStream);
      } catch (IOException e) {
         log.error("Issues while loading properties from file " + hotRodClientPropertiesFile, e);
         throw new CacheException(e);
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

      this.hotRodClientProperties.putAll(props);
   }

   public void setHotRodClientPropertiesFile(String hotRodClientProperties) {
      FileLookup fileLookup = new FileLookup();
      InputStream inputStream = fileLookup.lookupFile(hotRodClientProperties, getClassLoader());
      try {
         this.hotRodClientProperties.load(inputStream);
      } catch (IOException e) {
         log.error("Issues while loading properties from file", e);
         throw new CacheException(e);
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

      this.hotRodClientProperties.putAll(props);
   }

   public void setHotRodClientPropertiesFile(String hotRodClientProperties) {
      FileLookup fileLookup = FileLookupFactory.newInstance();
      InputStream inputStream = fileLookup.lookupFile(hotRodClientProperties, getClassLoader());
      try {
         this.hotRodClientProperties.load(inputStream);
      } catch (IOException e) {
         log.error("Issues while loading properties from file", e);
         throw new CacheException(e);
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

      //1. resolve given path
      FileLookup fileLookup = new FileLookup();
      InputStream is = null;
      if (localPathToSchema != null) {
         is = fileLookup.lookupFile(localPathToSchema);
         if (is != null) {
            log.debug("Using schema " + localPathToSchema);
            return is;
         }
         log.debug("Could not find schema on path " + localPathToSchema + ", resolving "
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

         log.debug("Could not find schema on path " + localPathToSchema + ", resolving "
                 + SCHEMA_SYSTEM_PROPERTY + " to " + schemaPath());
      }

      //2. resolve local schema path in infinispan distro
      is = fileLookup.lookupFile(schemaPath());
      if (is != null) {
         log.debug("Using schema " + schemaPath());
         return is;
      }
      log.debug("Could not find schema on path " + schemaPath() + ", resolving "
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

   private static InputStream findInputStream(String fileName) throws FileNotFoundException {
      if (fileName == null)
         throw new NullPointerException("File name cannot be null!");
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(fileName);
      if (is == null)
         throw new FileNotFoundException("File " + fileName
                 + " could not be found, either on the classpath or on the file system!");
      return is;
   }
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

      }
   }

   public ConfigurationBuilderHolder parseFile(String filename) throws IOException {
      FileLookup fileLookup = FileLookupFactory.newInstance();
      InputStream is = fileLookup.lookupFile(filename, cl.get());
      if(is==null) {
         throw new FileNotFoundException(filename);
      }
      try {
         return parse(is);
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

      this.asyncExecutorFactory = asyncExecutorFactory;
   }

   public void setHotRodClientPropertiesFile(String hotRodClientPropertiesFile) {
      FileLookup fileLookup = FileLookupFactory.newInstance();
      InputStream inputStream = fileLookup.lookupFile(hotRodClientPropertiesFile, getClassLoader());
      try {
         hotRodClientProperties.load(inputStream);
      } catch (IOException e) {
         log.error("Issues while loading properties from file " + hotRodClientPropertiesFile, e);
         throw new CacheException(e);
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

   }

   private String findConfigFile(String configFile) {
      FileLookup fl = FileLookupFactory.newInstance();
      if (configFile != null) {
         InputStream inputStream = fl.lookupFile(configFile, Thread.currentThread().getContextClassLoader());
         try {
            if (inputStream != null)
               return configFile;
         } finally {
            Util.close(inputStream);
View Full Code Here

Examples of org.infinispan.util.FileLookup.lookupFile()

   }

   public void initialize(String fileName) throws IOException {
      if (fileName == null) throw new NullPointerException("File name cannot be null!");
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(fileName);
      if (is == null)
         throw new FileNotFoundException("File " + fileName + " could not be found, either on the classpath or on the file system!");
      initialize(is);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.