Package org.jboss.cache.config.parsing

Examples of org.jboss.cache.config.parsing.XmlConfigurationParser


  @BeforeMethod(alwaysRun = true)
   public void setUp() throws Exception
   {
     UnitTestCacheFactory<String, String> instance = new UnitTestCacheFactory<String, String>();
     cache = (CacheSPI) instance.createCache(new XmlConfigurationParser().parseFile("configs/local-passivation.xml"), false, getClass());
     cache.getConfiguration().getEvictionConfig().setWakeupInterval(0);
     cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
     Object listener = new TestCacheListener();
     cache.getConfiguration().getCacheLoaderConfig().getFirstCacheLoaderConfig().setClassName(DummyInMemoryCacheLoader.class.getName());
     cache.start();
View Full Code Here


   }

   private void initCaches()
   {
      UnitTestCacheFactory<String, String> instance = new UnitTestCacheFactory<String, String>();
      cache = (CacheSPI) instance.createCache(new XmlConfigurationParser().parseFile("configs/local-passivation.xml"), false, getClass());
      cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
      cache.getConfiguration().getCacheLoaderConfig().getFirstCacheLoaderConfig().setClassName(DummyInMemoryCacheLoader.class.getName());
      cache.start();
   }
View Full Code Here

      {
// loop through all elements in XML.
         if (stream == null) throw new ConfigurationException("Input stream for configuration xml is null!");

         Element root = XmlConfigHelper.getDocumentRoot(stream);
         XmlConfigurationParser parser = new XmlConfigurationParser();
         confCache = parser.parseElement(root);
         if (confCache == null) throw new NullPointerException("Null conf cache!!");

         Element list = (Element) root.getElementsByTagNameNS("*", "protocol_stacks").item(0);
         NodeList stacks = list.getElementsByTagNameNS("*", "stack");

View Full Code Here

      {
         // loop through all elements in XML.
         if (stream == null) throw new ConfigurationException("Input stream for configuration xml is null!");

         Element root = XmlConfigHelper.getDocumentRoot(stream);
         XmlConfigurationParser parser = new UnitTestXmlConfigurationParser();
         Configuration conf = parser.parseElement(root);

         Element list = (Element) root.getElementsByTagNameNS("*","protocol_stacks").item(0);
         NodeList stacks = list.getElementsByTagNameNS("*", "stack");

         for (int i = 0; i < stacks.getLength(); i++)
View Full Code Here

         c.setEvictionConfig(ec);
         doTest(c);
      }
      else
      {
         doTest(new XmlConfigurationParser().parseElement(XmlConfigHelper.stringToElementInCoreNS(xml)));
      }
   }
View Full Code Here

      return createCache(configFileName, true);
   }

   public Cache<K, V> createCache(String configFileName, boolean start) throws ConfigurationException
   {
      XmlConfigurationParser parser = new XmlConfigurationParser();
      Configuration c;
      try
      {
         c = parser.parseFile(configFileName);
      }
      catch (ConfigurationException e)
      {
         XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
         c = oldParser.parseFile(configFileName);
View Full Code Here

      this.defaultClassLoader = loader;
   }

   public Cache<K, V> createCache(InputStream is) throws ConfigurationException
   {
      XmlConfigurationParser parser = new XmlConfigurationParser();
      Configuration c = null;
      try
      {
         c = parser.parseStream(is);
      }
      catch (ConfigurationException e)
      {
         XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
         c = oldParser.parseStream(is);
View Full Code Here

      return createCache(c);
   }

   public Cache<K, V> createCache(InputStream is, boolean start) throws ConfigurationException
   {
      XmlConfigurationParser parser = new XmlConfigurationParser();
      Configuration c = parser.parseStream(is);
      return createCache(c, start);
   }
View Full Code Here

      return createCache(configFileName, true);
   }

   public Cache<K, V> createCache(String configFileName, boolean start) throws ConfigurationException
   {
      XmlConfigurationParser parser = new XmlConfigurationParser();
      Configuration c;
      try
      {
         c = parser.parseFile(configFileName);
      }
      catch (ConfigurationException e)
      {
         XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
         c = oldParser.parseFile(configFileName);
View Full Code Here

      this.defaultClassLoader = loader;
   }

   public Cache<K, V> createCache(InputStream is) throws ConfigurationException
   {
      XmlConfigurationParser parser = new XmlConfigurationParser();
      Configuration c = null;
      try
      {
         c = parser.parseStream(is);
      }
      catch (ConfigurationException e)
      {
         XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
         c = oldParser.parseStream(is);
View Full Code Here

TOP

Related Classes of org.jboss.cache.config.parsing.XmlConfigurationParser

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.