Examples of ConfigurationLoader


Examples of mx4j.tools.config.ConfigurationLoader

              "        <call refobjectid=\"url\" method=\"getHost\" />" +
              "      </arg>" +
              "    </call>" +
              "  </startup>" +
              "</configuration>";
      ConfigurationLoader loader = new ConfigurationLoader(server);
      loader.startup(new StringReader(config));

      ArrayList list = MBeanServerFactory.findMBeanServer(null);
      assertEquals(list.size(), 1);
      MBeanServer mbs = (MBeanServer)list.get(0);
      assertEquals(mbs.getDefaultDomain(), domain);
View Full Code Here

Examples of mx4j.tools.config.ConfigurationLoader

              "      </arg>" +
              "    </call>" +
              "  </startup>" +
              "</configuration>" +
              "";
      ConfigurationLoader loader = new ConfigurationLoader(server);
      Reader reader = new BufferedReader(new StringReader(config));
      loader.startup(reader);

      ArrayList list = MBeanServerFactory.findMBeanServer(null);
      assertEquals(list.size(), 1);
      MBeanServer mbs = (MBeanServer)list.get(0);
      String id = (String)server.getAttribute(new ObjectName(name), "MBeanServerId");
View Full Code Here

Examples of mx4j.tools.config.ConfigurationLoader

              "  <shutdown>" +
              "    <call objectname=\"" + name + "\" operation=\"stop\" />" +
              "  </shutdown>" +
              "</configuration>" +
              "";
      ConfigurationLoader loader = new ConfigurationLoader(server);
      Reader reader = new BufferedReader(new StringReader(config));
      loader.startup(reader);

      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
      env.put(Context.PROVIDER_URL, "rmi://localhost");
      InitialContext ctx = new InitialContext(env);
View Full Code Here

Examples of mx4j.tools.config.ConfigurationLoader

              "  <shutdown>" +
              "    <call objectname=\"" + name + "\" operation=\"stop\" />" +
              "  </shutdown>" +
              "</configuration>" +
              "";
      ConfigurationLoader loader = new ConfigurationLoader(server);
      Reader reader = new BufferedReader(new StringReader(config));
      loader.startup(reader);

      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
      env.put(Context.PROVIDER_URL, "rmi://localhost:" + port);
      InitialContext ctx = new InitialContext(env);
View Full Code Here

Examples of org.exolab.jms.config.ConfigurationLoader

     */
    private static final Log _log = LogFactory.getLog(AdminMgr.class);


    public AdminMgr(String path) throws Exception {
        _config = new ConfigurationLoader().load(path);
        initComponents(path);
        pack();
    }
View Full Code Here

Examples of org.exolab.jms.config.ConfigurationLoader

                String configFile = cmdline.value("config");
                if (configFile == null) {
                    String home = getOpenJMSHome();
                    configFile = home + "/config/openjms.xml";
                }
                Configuration config = new ConfigurationLoader().load(configFile);
                String path = config.getLoggerConfiguration().getFile();
                if (path != null) {
                    DOMConfigurator.configure(path);
                }
                AdminConfiguration adminConfig = null;
View Full Code Here

Examples of org.exolab.jms.config.ConfigurationLoader

     * @throws ServerException if the server cannot be created
     */
    public JmsServer(String file) throws ServerException {
        version();

        ConfigurationLoader loader = new ConfigurationLoader();
        try {
            _config = loader.load(file);
        } catch (Exception exception) {
            throw new ServerException("Failed to read configuration: " + file,
                                      exception);
        }
    }
View Full Code Here

Examples of org.grouplens.lenskit.config.ConfigurationLoader

            String name = attr.getKey();
            if (!name.equals("name") && !name.equals("preload")) {
                setAttribute(name, attr.getValue());
            }
        }
        ConfigurationLoader loader = new ConfigurationLoader(getProject().getClassLoader());
        LenskitConfigScript script = loader.loadScript(file);
        script.configure(getConfig());
        return this;
    }
View Full Code Here

Examples of org.grouplens.lenskit.config.ConfigurationLoader

public class AlgorithmInstanceBuilderDelegate extends LenskitConfigDSL {
    private AlgorithmInstanceBuilder builder;

    public AlgorithmInstanceBuilderDelegate(AlgorithmInstanceBuilder builder) {
        // FIXME Use the correct classpath
        super(new ConfigurationLoader(), builder.getConfig());
        this.builder = builder;
    }
View Full Code Here

Examples of org.grouplens.lenskit.config.ConfigurationLoader

    public List<LenskitConfiguration> loadConfigurations(List<File> files) throws IOException, RecommenderConfigurationException {
        if (files == null || files.isEmpty()) {
            return Collections.emptyList();
        }

        ConfigurationLoader loader = new ConfigurationLoader(getClassLoader());
        // FIXME Make properties available

        List<LenskitConfiguration> configs = Lists.newArrayListWithCapacity(files.size());
        for (File file: files) {
            configs.add(loader.load(file));
        }

        return configs;
    }
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.