Package org.infinispan.commons

Examples of org.infinispan.commons.CacheConfigurationException


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


   }

   @Override
   public void validate() {
      if (connectionUrl == null) {
         throw new CacheConfigurationException("A connectionUrl has not been specified");
      }
   }
View Full Code Here

   }

   @Override
   public void validate() {
      if (connectionUrl == null) {
         throw new CacheConfigurationException("Missing connectionUrl parameter");
      }
   }
View Full Code Here

      this.jndiUrl = jndiUrl;
   }

   @Override
   public void validate() {
      throw new CacheConfigurationException("The jndiUrl has not been specified");
   }
View Full Code Here

         Constructor<C> constructor = klass.getDeclaredConstructor(AbstractJdbcCacheStoreConfigurationBuilder.class);
         C builder = constructor.newInstance(this);
         this.connectionFactory = (ConnectionFactoryConfigurationBuilder<ConnectionFactoryConfiguration>) builder;
         return builder;
      } catch (Exception e) {
         throw new CacheConfigurationException("Could not instantiate loader configuration builder '" + klass.getName() + "'", e);
      }
   }
View Full Code Here

   @Override
   public void validate() {
      super.validate();
      if (connectionFactory == null) {
         throw new CacheConfigurationException("A ConnectionFactory has not been specified for the Store");
      }
   }
View Full Code Here

            } finally {
               connectionFactory.releaseConnection(connection);
            }
         }
         if (databaseType == null) {
            throw new CacheConfigurationException("Unable to detect database type from JDBC driver name or connection metadata.  Please provide this manually using the 'databaseType' property in your configuration.  Supported database type strings are " + Arrays.toString(DatabaseType.values()));
         } else {
            log.debugf("Guessing database type as '%s'.  If this is incorrect, please specify the correct type using the 'databaseType' property in your configuration.  Supported database type strings are %s", databaseType, Arrays.toString(DatabaseType.values()));
         }
      }
      return databaseType;
View Full Code Here

         throw new NullPointerException("The cache parameter passed in is null");
      }

      // If invocationBatching is not enabled, throw a new configuration exception.
      if (!cache.getCacheConfiguration().invocationBatching().enabled()) {
         throw new CacheConfigurationException("invocationBatching is not enabled for cache '" +
               cache.getName() + "'. Make sure this is enabled by" +
               " calling configurationBuilder.invocationBatching().enable()");
      }

      return new TreeCacheImpl<K, V>(cache);
View Full Code Here

   }

   public TreeCacheImpl(AdvancedCache<?, ?> cache) {
      super(cache, cache.getBatchContainer());
      if (cache.getCacheConfiguration().indexing().index().isEnabled())
         throw new CacheConfigurationException("TreeCache cannot be used with a Cache instance configured to use indexing!");
      assertBatchingSupported(cache.getCacheConfiguration());
      createRoot();
   }
View Full Code Here

    */
   public static <T> Class<T> loadClass(String classname, ClassLoader cl) {
      try {
         return loadClassStrict(classname, cl);
      } catch (ClassNotFoundException e) {
         throw new CacheConfigurationException("Unable to instantiate class " + classname, e);
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.commons.CacheConfigurationException

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.