Examples of parseMainConfig()


Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      FileConfigurationParser parser = new FileConfigurationParser();
     
      String configStr = firstPart + lastPart;
      ByteArrayInputStream input = new ByteArrayInputStream(configStr.getBytes("UTF-8"));
     
      Configuration config = parser.parseMainConfig(input);
     
      String clusterPassword = config.getClusterPassword();
     
      assertEquals(ConfigurationImpl.DEFAULT_CLUSTER_PASSWORD, clusterPassword);
     
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      //if we add cluster-password, it should be default plain text
      String clusterPasswordPart = "<cluster-password>helloworld</cluster-password>";
     
      configStr = firstPart + clusterPasswordPart + lastPart;
     
      config = parser.parseMainConfig(new ByteArrayInputStream(configStr.getBytes("UTF-8")));
     
      assertEquals("helloworld", config.getClusterPassword());

      //if we add mask, it should be able to decode correctly
      DefaultSensitiveStringCodec codec = new DefaultSensitiveStringCodec();
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      String maskPasswordPart = "<mask-password>true</mask-password>";
      clusterPasswordPart = "<cluster-password>" + mask + "</cluster-password>";
     
      configStr = firstPart + clusterPasswordPart + maskPasswordPart + lastPart;
     
      config = parser.parseMainConfig(new ByteArrayInputStream(configStr.getBytes("UTF-8")));
     
      assertEquals("helloworld", config.getClusterPassword());
     
      //if we change key, it should be able to decode correctly
      codec = new DefaultSensitiveStringCodec();
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      String codecPart = "<password-codec>" + "org.hornetq.utils.DefaultSensitiveStringCodec" +
                         ";key=newkey</password-codec>";
     
      configStr = firstPart + clusterPasswordPart + maskPasswordPart + codecPart + lastPart;
     
      config = parser.parseMainConfig(new ByteArrayInputStream(configStr.getBytes("UTF-8")));
     
      assertEquals("newpassword", config.getClusterPassword());
   }

   private static String firstPart =
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      FileConfigurationParser parser = new FileConfigurationParser();

      String configStr = firstPart + lastPart;
      ByteArrayInputStream input = new ByteArrayInputStream(configStr.getBytes("UTF-8"));

      Configuration config = parser.parseMainConfig(input);

      String clusterPassword = config.getClusterPassword();

      assertEquals(ConfigurationImpl.DEFAULT_CLUSTER_PASSWORD, clusterPassword);
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      //if we add cluster-password, it should be default plain text
      String clusterPasswordPart = "<cluster-password>helloworld</cluster-password>";

      configStr = firstPart + clusterPasswordPart + lastPart;

      config = parser.parseMainConfig(new ByteArrayInputStream(configStr.getBytes("UTF-8")));

      assertEquals("helloworld", config.getClusterPassword());

      //if we add mask, it should be able to decode correctly
      DefaultSensitiveStringCodec codec = new DefaultSensitiveStringCodec();
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      String maskPasswordPart = "<mask-password>true</mask-password>";
      clusterPasswordPart = "<cluster-password>" + mask + "</cluster-password>";

      configStr = firstPart + clusterPasswordPart + maskPasswordPart + lastPart;

      config = parser.parseMainConfig(new ByteArrayInputStream(configStr.getBytes("UTF-8")));

      assertEquals("helloworld", config.getClusterPassword());

      //if we change key, it should be able to decode correctly
      codec = new DefaultSensitiveStringCodec();
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      String codecPart = "<password-codec>" + "org.hornetq.utils.DefaultSensitiveStringCodec" +
                         ";key=newkey</password-codec>";

      configStr = firstPart + clusterPasswordPart + maskPasswordPart + codecPart + lastPart;

      config = parser.parseMainConfig(new ByteArrayInputStream(configStr.getBytes("UTF-8")));

      assertEquals("newpassword", config.getClusterPassword());
   }

   private static String firstPart =
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      xml = XMLUtil.replaceSystemProps(xml);
      Element e = org.hornetq.utils.XMLUtil.stringToElement(xml);
     
      FileConfigurationParser parser = new FileConfigurationParser();

      parser.parseMainConfig(e, this);

      started = true;

   }
View Full Code Here

Examples of org.hornetq.core.deployers.impl.FileConfigurationParser.parseMainConfig()

      // https://jira.jboss.org/browse/HORNETQ-478 - We only want to validate AIO when
      //     starting the server
      //     and we don't want to do it when deploying hornetq-queues.xml which uses the same parser and XML format
      parser.setValidateAIO(true);

      parser.parseMainConfig(e, this);

      started = true;

   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.