Package java.util

Examples of java.util.Properties.stringPropertyNames()


            final List<String> jvmArgs = new LinkedList<String>();
            if (additionalArgs != null) {
                Collections.addAll(jvmArgs, additionalArgs.split(" "));
            }
            for (final String k : config.stringPropertyNames()) {
                if (k.startsWith("jvmArg.")) {
                    jvmArgs.add(config.getProperty(k));
                }
            }
View Full Code Here


        try {
            InputStream viewsStream = getClass().getResourceAsStream("/views.xml");
            Properties views = new Properties();
            views.loadFromXML(viewsStream);

            for (String idx : views.stringPropertyNames()) {
                LOG.debug("Creating view {}", views.get(idx).toString());

                try {
                    final String updateViews = views.get(idx).toString().replaceAll("\\n", " ");
                    statement = conn.prepareStatement(updateViews);
View Full Code Here

        try {
            InputStream indexesStream = getClass().getResourceAsStream("/indexes.xml");
            Properties indexes = new Properties();
            indexes.loadFromXML(indexesStream);

            for (String idx : indexes.stringPropertyNames()) {
                LOG.debug("Creating index {}", indexes.get(idx).toString());

                try {
                    final String updateIndexed = indexes.get(idx).toString();
                    statement = conn.prepareStatement(updateIndexed);
View Full Code Here

  public boolean process_stage1(String[] argv) {
    try {
      commandLine = new GnuParser().parse(options, argv);
      Properties confProps = commandLine.getOptionProperties("hiveconf");
      for (String propKey : confProps.stringPropertyNames()) {
        System.setProperty(propKey, confProps.getProperty(propKey));
      }

      Properties hiveVars = commandLine.getOptionProperties("define");
      for (String propKey : hiveVars.stringPropertyNames()) {
View Full Code Here

      for (String propKey : confProps.stringPropertyNames()) {
        System.setProperty(propKey, confProps.getProperty(propKey));
      }

      Properties hiveVars = commandLine.getOptionProperties("define");
      for (String propKey : hiveVars.stringPropertyNames()) {
        hiveVariables.put(propKey, hiveVars.getProperty(propKey));
      }

      Properties hiveVars2 = commandLine.getOptionProperties("hivevar");
      for (String propKey : hiveVars2.stringPropertyNames()) {
View Full Code Here

      for (String propKey : hiveVars.stringPropertyNames()) {
        hiveVariables.put(propKey, hiveVars.getProperty(propKey));
      }

      Properties hiveVars2 = commandLine.getOptionProperties("hivevar");
      for (String propKey : hiveVars2.stringPropertyNames()) {
        hiveVariables.put(propKey, hiveVars2.getProperty(propKey));
      }
    } catch (ParseException e) {
      System.err.println(e.getMessage());
      printUsage();
View Full Code Here

      return false;
    }

    if (commandLine.hasOption("hiveconf")) {
      Properties confProps = commandLine.getOptionProperties("hiveconf");
      for (String propKey : confProps.stringPropertyNames()) {
        ss.cmdProperties.setProperty(propKey, confProps.getProperty(propKey));
      }
    }

    return true;
View Full Code Here

   *
   * @return a copy of the properties specified in hiveconf
   */
  public Properties addHiveconfToSystemProperties() {
    Properties confProps = commandLine.getOptionProperties("hiveconf");
    for (String propKey : confProps.stringPropertyNames()) {
      if (verbose) {
        System.err.println(
            "hiveconf: " + propKey + "=" + confProps.getProperty(propKey));
      }
      System.setProperty(propKey, confProps.getProperty(propKey));
View Full Code Here

        assertEquals("20", yellow.activationProperties.get("maxSessions"));
        assertEquals("100", yellow.activationProperties.get("maxMessagesPerSessions"));
        assertEquals("javax.jms.Queue", yellow.activationProperties.get("destinationType"));
        assertEquals("OVERRIDDEN.QUEUE", yellow.activationProperties.get("destination"));

        for (final String n : properties.stringPropertyNames()) {
            systProps.remove(n);
        }
    }

    public void testMdbOverrideOpenejbJar() throws Exception {
View Full Code Here

    public Collection<String> getDeployedApplications() throws GlassFishException {
        try {
            CommandExecutorImpl executer = habitat.getComponent(CommandExecutorImpl.class);
            ActionReport report = executer.executeCommand("list-components");
            Properties props = report.getTopMessagePart().getProps();
            return new ArrayList<String>(props.stringPropertyNames());
        } catch (Exception e) {
            throw new GlassFishException(e);
        }
    }
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.