Package org.jboss.cache.config

Examples of org.jboss.cache.config.ConfigurationException


      {
         return componentType.cast(buildInterceptorChain());
      }
      catch (Exception e)
      {
         throw new ConfigurationException("Unable to build interceptor chain", e);
      }
   }
View Full Code Here


      if (list == null || list.getLength() == 0)
      {
         // try looking for a QUALIFIED_CONFIG_ROOT
         list = root.getElementsByTagName(QUALIFIED_CONFIG_ROOT);
         if (list == null || list.getLength() == 0)
            throw new ConfigurationException("Can't find " + CONFIG_ROOT + " or " + QUALIFIED_CONFIG_ROOT + " tag");
      }

      Map<String, Configuration> result = new HashMap<String, Configuration>();

      for (int i = 0; i < list.getLength(); i++)
      {
         Node node = list.item(i);
         if (node.getNodeType() != Node.ELEMENT_NODE)
         {
            continue;
         }

         Element element = (Element) node;
         String name = element.getAttribute(CONFIG_NAME);
         if (name == null || name.trim().length() == 0)
            throw new ConfigurationException("Element " + element + " has no name attribute");

         XmlConfigurationParser parser = new XmlConfigurationParser();
         Configuration c;
         if (parser.isValidElementRoot(element))
         {
View Full Code Here

         case OPTIMISTIC:
            return componentType.cast(new OptimisticNodeFactory());
         case PESSIMISTIC:
            return componentType.cast(new PessimisticNodeFactory());
         default:
            throw new ConfigurationException("Unknown locking scheme " + configuration.getNodeLockingScheme());
      }
   }
View Full Code Here

            return componentType.newInstance();
         }
      }
      catch (Exception e)
      {
         throw new ConfigurationException("Unable to create component " + componentType, e);
      }
   }
View Full Code Here

         case OPTIMISTIC:
            return componentType.cast(new OptimisticCommandsFactoryImpl());
         case PESSIMISTIC:
            return componentType.cast(new PessimisticCommandsFactoryImpl());
      }
      throw new ConfigurationException("Unknown locking scheme " + configuration.getNodeLockingScheme());
   }
View Full Code Here

         {
            setter.invoke(configuration.getRuntimeConfig(), component);
         }
         catch (Exception e)
         {
            throw new ConfigurationException("Unable to put newly constructed component of type " + componentType + " in the RuntimeConfig", e);
         }
      }
      return component;
   }
View Full Code Here

      boolean canConstruct = false;
      for (Class c : ableToConstruct)
      {
         canConstruct = canConstruct || requestedType.isAssignableFrom(c);
      }
      if (!canConstruct) throw new ConfigurationException("Don't know how to construct " + requestedType);
   }
View Full Code Here

               Class clazz = cl.loadClass(configuration.getTransactionManagerLookupClass());
               lookup = (TransactionManagerLookup) clazz.newInstance();
            }
            catch (Exception e)
            {
               throw new ConfigurationException("Problems looking up transaction manager", e);
            }
         }

         try
         {
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

   protected void handleRemovedAttributes(ParsedAttributes attributes)
   {
      String evictionPolicy = attributes.stringAttribs.remove("EvictionPolicyClass");
      if (evictionPolicy != null)
      {
         throw new ConfigurationException("XmlConfigurationParser does not " +
               "support the JBC 1.x attribute EvictionPolicyClass. Set the default " +
               "eviction policy via the policyClass element in the EvictionConfig section");
      }
      String multiplexerService = attributes.stringAttribs.remove("MultiplexerService");
      if (multiplexerService != null)
      {
         throw new ConfigurationException("XmlConfigurationParser does not " +
               "support the JBC 1.x attribute MultiplexerService. Inject the " +
               "multiplexer directly using Configuration.getRuntimeConfig().setMuxChannelFactory()");
      }
      String serviceName = attributes.stringAttribs.remove("ServiceName");
      if (serviceName != null)
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.