Package org.jgroups.conf

Examples of org.jgroups.conf.XmlConfigurator


                Element cfg = (Element) tmp_config;
                tmp=cfg.getNodeName();
                if(!CONFIG.equals(tmp))
                    throw new IOException("invalid configuration: didn't find a \"" + CONFIG + "\" element under \"" + STACK + "\"");

                XmlConfigurator conf=XmlConfigurator.getInstance(cfg);
                // fixes http://jira.jboss.com/jira/browse/JGRP-290
                ConfiguratorFactory.substituteVariables(conf); // replace vars with system props
                String val=conf.getProtocolStackString();
                if(replace) {
                    stacks.put(st_name, val);
                    if(log.isTraceEnabled())
                        log.trace("added config '" + st_name + "'");
                }
View Full Code Here


                Element cfg = (Element) tmp_config;
                tmp=cfg.getNodeName();
                if(!CONFIG.equals(tmp))
                    throw new IOException("invalid configuration: didn't find a \"" + CONFIG + "\" element under \"" + STACK + "\"");

                XmlConfigurator conf=XmlConfigurator.getInstance(cfg);
                // fixes http://jira.jboss.com/jira/browse/JGRP-290
                ConfiguratorFactory.substituteVariables(conf); // replace vars with system props
                String val=conf.getProtocolStackString();
                this.stacks.put(st_name, val);
            }
            //System.out.println(" - OK");
        }
//        System.out.println("stacks: ");
View Full Code Here

    */
   public static String getClusterConfigFromFile(URL url)
   {
      try
      {
         XmlConfigurator conf = XmlConfigurator.getInstance(url);
         String tmp = conf.getProtocolStackString();
         // parse this string for ${} substitutions
         // Highly crappy approach!!
         tmp = tmp.replace("${jgroups.udp.mcast_addr:228.10.10.10}", "228.10.10.10");
         tmp = tmp.replace("${jgroups.udp.mcast_port:45588}", "45588");
         tmp = tmp.replace("${jgroups.udp.ip_ttl:2}", "2");
View Full Code Here

    Assert.notNull(resource, "no XML resource with JGroups configuration");

    InputStream stream = resource.getInputStream();

    XmlConfigurator configurator = XmlConfigurator.getInstance(stream);

    return configurator;
  }
View Full Code Here

                Element cfg = (Element) tmp_config;
                tmp=cfg.getNodeName();
                if(!CONFIG.equals(tmp))
                    throw new IOException("invalid configuration: didn't find a \"" + CONFIG + "\" element under \"" + STACK + "\"");

                XmlConfigurator conf=XmlConfigurator.getInstance(cfg);
                // fixes http://jira.jboss.com/jira/browse/JGRP-290
                ConfiguratorFactory.substituteVariables(conf); // replace vars with system props
                String val=conf.getProtocolStackString();
                if(replace) {
                    stacks.put(st_name, val);
                    if(log.isTraceEnabled())
                        log.trace("added config '" + st_name + "'");
                }
View Full Code Here

TOP

Related Classes of org.jgroups.conf.XmlConfigurator

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.