Package anvil.server

Examples of anvil.server.ConfigurationError


    SessionContainerPreferences prefs = zone.getSessionContainerPreferences();
    String hostname = prefs.getPreference("host", "localhost").toString();
    try {
      _address = InetAddress.getByName(hostname);
    } catch (UnknownHostException e) {
       throw new ConfigurationError("Unknown host '"+hostname+"'");
    }
    _port = prefs.getIntPreference("port", 9000);
    _cleaner = new SessionCleaner("Cleaner-"+_port, prefs.getCheckoutFrequency());
    _cleaner.setDaemon(true);
    _cleaner.start();
View Full Code Here


          } else if (tag.equals("message")) {
            list.add(new Integer(FMT_MESSAGE));
          } else if (tag.equals("exception")) {
            list.add(new Integer(FMT_EXCEPTION));
          } else {
            throw new ConfigurationError("Invalid log format tag '{"+tag+"}'");
          }
          text.setLength(0);
        }
      } else {
        text.append(ch);
View Full Code Here

        _layout = (LogLayout)Class.forName(s).newInstance();
      } catch (ConfigurationError e) {
        e.fillInStackTrace();
        throw e;
      } catch (Throwable t) {
        throw new ConfigurationError("Couldn't create log layout: "+s+", reason: "+t.toString());
      }
    } else {
      throw new ConfigurationError("Unknown log layout '"+_layout+"'");
    }
   
    _target = prefs.getTarget();
   
    if (_target.equals("stderr")) {   
      _output = System.err;
      _flush = false;
     
    } else if (_target.equals("stdout")) {   
      _output = System.out;
      _flush = false;
     
    } else {
      try {
        _output = new BufferedOutputStream(new FileOutputStream(_target));
      } catch (IOException e) {
        throw new ConfigurationError("Couldn't open log file '"+_target+"'");
      }
    }
  }
View Full Code Here

  {
    _name = prefs.getName();
    _zone = prefs.getParent();
    String dir = (String)prefs.getPreference("dir");
    if (dir == null) {
      throw new ConfigurationError("Required parameter 'dir' missing from realm preferences");
    }
    _dir = new File(dir);
    _index = new File(_dir, "index");
    _copyonget = prefs.getBooleanPreference("copyonget", false);
    _copyonset = prefs.getBooleanPreference("copyonset", false);
View Full Code Here

  public void initialize(Zone zone, NamespacePreferences prefs)
  {
    String filename = (String)prefs.getPreference("file");
    if (filename == null) {
      throw new ConfigurationError("PersistentFileNamespace requires existends of property 'file'");
    }
    File file = new File(filename);
    _name = prefs.getName();
    _file = file;
    _zone = zone;
View Full Code Here

TOP

Related Classes of anvil.server.ConfigurationError

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.