Package org.infinispan.config

Examples of org.infinispan.config.ConfigurationException


         }

         globalComponentRegistry = new GlobalComponentRegistry(this.globalConfiguration, this, reflectionCache, caches.keySet());
         cacheCreateLock = new ReentrantLock();
      } catch (RuntimeException re) {
         throw new ConfigurationException(re);
      }

      if (start)
         start();
   }
View Full Code Here


      // test location
      File location = new File(locationStr);
      if (!location.exists()) {
         boolean created = location.mkdirs();
         if (!created)
            throw new ConfigurationException("Unable to create cache loader location " + location);
      }
      if (!location.isDirectory()) {
         throw new ConfigurationException("Cache loader location [" + location + "] is not a directory!");
      }

      try {
         openDatabase(new File(location, cacheDbName));
      } catch (Exception e) {
         throw new ConfigurationException(e);
      }

      log.debug("cleaning up expired entries...");
      purgeInternal();
View Full Code Here

   @Start(priority = 15)
   public void setCacheStore() {
      store = clm == null ? null : clm.getCacheStore();
      if (store == null)
         throw new ConfigurationException("passivation can only be used with a CacheLoader that implements CacheStore!");
   }
View Full Code Here

      root = new File(location);
      if (!root.mkdirs()) {
         log.warn("Problems creting the directory: " + root)
      }
      if (!root.exists()) {
         throw new ConfigurationException("Directory " + root.getAbsolutePath() + " does not exist and cannot be created!");
      }
      streamBufferSize = config.getStreamBufferSize();
   }
View Full Code Here

               InfinispanConfiguration.resolveSchemaPath(),
               new ConfigurationValidatingVisitor());

         initialize(configuration);
      } catch (RuntimeException re) {
         throw new ConfigurationException(re);
      }
      if (start)
         start();
   }
View Full Code Here

                                                                                                    new ConfigurationValidatingVisitor());
         initialize(configuration);
      } catch (ConfigurationException ce) {
         throw ce;
      } catch (RuntimeException re) {
         throw new ConfigurationException(re);
      }
      if (start) start();
   }
View Full Code Here

   @Override
   public CacheLoaderConfig unmarshal(AbstractCacheStoreConfig storeConfig) throws Exception {
      String clClass = storeConfig.getCacheLoaderClassName();
      if (clClass == null || clClass.length()==0)
         throw new ConfigurationException("Missing 'class'  attribute for cache loader configuration");

      CacheLoaderConfig clc;
      try {
         clc = instantiateCacheLoaderConfig(clClass, storeConfig.getClassLoader());
      } catch (Exception e) {
         throw new ConfigurationException("Unable to instantiate cache loader or configuration", e);
      }
     
      clc.setCacheLoaderClassName(clClass);

      Properties props = storeConfig.getProperties();                
View Full Code Here

         if (!root.mkdirs()) {
            log.problemsCreatingDirectory(root);
         }
      }
      if (!root.exists()) {
         throw new ConfigurationException("Directory " + root.getAbsolutePath() + " does not exist and cannot be created!");
      }
      streamBufferSize = config.getStreamBufferSize();

      switch(config.getFsyncMode()) {
         case DEFAULT :
View Full Code Here

    */
   public static Class loadClass(String classname) {
      try {
         return loadClassStrict(classname);
      } catch (Exception e) {
         throw new ConfigurationException("Unable to instantiate class " + classname, e);
      }
   }
View Full Code Here

   @SuppressWarnings("unchecked")
   public static <T> T getInstance(Class<T> clazz) {
      try {
         return getInstanceStrict(clazz);
      } catch (IllegalAccessException iae) {
         throw new ConfigurationException("Unable to instantiate class " + clazz.getName(), iae);
      } catch (InstantiationException ie) {
         throw new ConfigurationException("Unable to instantiate class " + clazz.getName(), ie);
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.config.ConfigurationException

Copyright © 2018 www.massapicom. 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.