Package org.jboss.cache.config

Examples of org.jboss.cache.config.ConfigurationException


   @Override
   public void validate() throws ConfigurationException
   {
      if (getMaxNodes() < 0)
      {
         throw new ConfigurationException("maxNodes must be must be " +
               "configured to a value greater than or equal to 0");
      }
   }
View Full Code Here


   public void startBatch()
   {
      if (!configuration.isInvocationBatchingEnabled())
      {
         throw new ConfigurationException("Invocation batching not enabled in current configuration!  Please use the <invocationBatching /> element.");
      }
      batchContainer.startBatch();
   }
View Full Code Here

   public void endBatch(boolean successful)
   {
      if (!configuration.isInvocationBatchingEnabled())
      {
         throw new ConfigurationException("Invocation batching not enabled in current configuration!  Please use the <invocationBatching /> element.");
      }
      batchContainer.endBatch(successful);
   }
View Full Code Here

      // scan to be sure the _default_ region isn't added twice
      boolean setDefault = false;
      for (EvictionRegionConfig erc : ercs)
      {
         Fqn fqn = erc.getRegionFqn();
         if (fqn == null) throw new ConfigurationException("Regions cannot be configured with a null region fqn.  If you configured this region programmatically, ensure that you set the region fqn in EvictionRegionConfig");
         if (trace) log.trace("Creating eviction region " + fqn);

         if (fqn.equals(DEFAULT_REGION) || fqn.isRoot())
         {
            if (setDefault)
            {
               throw new ConfigurationException("A default region for evictions has already been set for this cache");
            }
            if (trace) log.trace("Applying settings for default region to Fqn.ROOT");
            fqn = Fqn.ROOT;
            setDefault = true;
         }
View Full Code Here

   private void sanityCheckJGroupsStack(JChannel channel)
   {
      if (channel.getProtocolStack().findProtocol(STREAMING_STATE_TRANSFER.class) == null)
      {
         throw new ConfigurationException("JGroups channel does not use STREAMING_STATE_TRANSFER!  This is a requirement for non-blocking state transfer.  Either make sure your JGroups configuration uses STREAMING_STATE_TRANSFER or disable non-blocking state transfer.");
      }
   }
View Full Code Here

   {
      if (isInLocalMode || !nonBlockingStateTransfer || !fetchStateOnStart) return; // don't care about these cases!

      if (configuration.getNodeLockingScheme() != NodeLockingScheme.MVCC)
      {
         throw new ConfigurationException("Non-blocking state transfer is only supported with the MVCC node locking scheme.  Please change your node locking scheme to MVCC or disable non-blocking state transfer.");
      }

      if (isUsingBuddyReplication)
      {
         throw new ConfigurationException("Non-blocking state transfer cannot be used with buddy replication at this time.  Please disable either buddy replication or non-blocking state transfer.");
      }
   }
View Full Code Here

         root.normalize();
         return root;
      }
      catch (Exception e)
      {
         throw new ConfigurationException("Could not parse the config file", e);
      }
   }
View Full Code Here

      }

      private void logAndThrowException(SAXParseException exception)
      {
         log.error("Configuration warning: " + exception.getMessage());
         throw new ConfigurationException("Incorrect configuration file. Use '-Djbosscache.config.validate=false' to disable validation.", exception);
      }
View Full Code Here

   public Configuration parseFile(String filename)
   {
      InputStream is = new FileLookup().lookupFile(filename);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + filename + " either in classpath or on the filesystem!");
      }
      return parseStream(is);
   }
View Full Code Here

     
      if (!ignoreRoot &&
            (!"jbosscache".equals(root.getLocalName()) || !isAllowedCoreNamespace(coreNamespace))
         )
      {
            throw new ConfigurationException("Expected root element <jbosscache />" + (isValidating() ? " in either of " + getAllowedCoreNamespaces()
                  + " namespaces" : ""));
      }

      try
      {
         configureLocking(getSingleElement("locking"));
         configureTransaction(getSingleElement("transaction"));
         configureClustering(getSingleElement("clustering"));
         configureSerialization(getSingleElement("serialization"));
         configureInvalidation(getSingleElement("invalidation"));
         configureStartup(getSingleElement("startup"));
         configureShutdown(getSingleElement("shutdown"));
         configureJmxStatistics(getSingleElement("jmxStatistics"));
         configureEviction(getSingleElement("eviction"));
         configureCacheLoaders(getSingleElement("loaders"));
         configureCustomInterceptors(getSingleElement("customInterceptors"));
         configureListeners(getSingleElement("listeners"));
         configureInvocationBatching(getSingleElement("invocationBatching"));
      }
      catch (Exception e)
      {
         throw new ConfigurationException("Unexpected exception while parsing the configuration file", e);
      }
      return config;
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.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.