Package org.openeai.config

Examples of org.openeai.config.AppConfig

Directory Server Example:

Web Server Example:

File system Example:

@author Tod Jackson (tod@openeai.org) @author Steve Wheat (steve@openeai.org) @version 3.0 - 28 January 2003


  public GenericAppRunner(String[] args) {
    new ReleaseTag();
    try {
      String propFileName = args[0];
      Properties props = new Properties();
      AppConfig aConfig = null;
      InputStream in = null;

      // try it as a URL first, if that doens't work,
      // try it as a file.
      boolean isUrl = false;
      java.net.URL url = null;
      try {
        url = new java.net.URL(propFileName);
        isUrl = true;
      }
      catch (Exception e) {
        isUrl = false;
      }
      if (isUrl) {
        in = url.openStream();
      }
      else {
        in = new FileInputStream(propFileName);
      }
      props.load(in);
      in.close();
      aConfig = new AppConfig(props);
    }
    catch (Exception e) {
      logger.fatal("GenericAppRunner:  Error initializing AppConfig.  Exception: " + e.getMessage());
      System.exit(-1);
    }
View Full Code Here


        System.out.println(errMsg);
      }
      // Initialize an AppConfig using the initial properties.
      appConfig = null;
      try {
        appConfig = new AppConfig(initProps);
      }
      catch (EnterpriseConfigurationObjectException ecoe) {
        String errMsg = "["+this.getClass().getSimpleName()+"] Error initializing AppConfig. " +
          "The exception is: " + ecoe.getMessage();
        System.out.println(errMsg);
View Full Code Here

        System.out.println(errMsg);
      }
      // Initialize an AppConfig using the initial properties.
      appConfig = null;
      try {
        appConfig = new AppConfig(initProps);
      }
      catch (EnterpriseConfigurationObjectException ecoe) {
        String errMsg = "["+this.getClass().getSimpleName()+"] Error initializing AppConfig. " +
          "The exception is: " + ecoe.getMessage();
        System.out.println(errMsg);
View Full Code Here

      }

      // Initialize an AppConfig using the initial properties.
      appConfig = null;
      try {
        appConfig = new AppConfig(initProps);
      }
      catch (EnterpriseConfigurationObjectException ecoe) {
        String errMsg = "["+portletName+"] Error initializing AppConfig. " +
          "The exception is: " + ecoe.getMessage();
        throw new PortletException(errMsg);
View Full Code Here

      }

      // Initialize an AppConfig using the initial properties.
      appConfig = null;
      try {
        appConfig = new AppConfig(initProps);
      }
      catch (EnterpriseConfigurationObjectException ecoe) {
        String errMsg = "["+portletName+"] Error initializing AppConfig. " +
          "The exception is: " + ecoe.getMessage();
        throw new PortletException(errMsg);
View Full Code Here

TOP

Related Classes of org.openeai.config.AppConfig

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.