Package com.caucho.config

Examples of com.caucho.config.ConfigException


  {
    if (_resin.isWatchdogManagerConfig())
      return;
     
    if (_resin.findClient(config.getId()) != null)
      throw new ConfigException(L.l("<server id='{0}'> is a duplicate server.  servers must have unique ids.",
                                    config.getId()));
     
    _resin.addServer(config);
    _resin.addClient(new WatchdogClient(_system, _resin, config));
  }
View Full Code Here


  {
    String []trailingArgs = args.getTrailingArgs(options);

    String pattern = args.getArg("-pattern");
    if (pattern == null)
      throw new ConfigException(L.l("jmx-call must specify -pattern"));

    try {
      ObjectName.getInstance(pattern);
    } catch (MalformedObjectNameException e) {
      throw new ConfigException(L.l("incorrect pattern `{0}' :`{`}'",
                                    pattern,
                                    e.getMessage()));
    }

    String operation = args.getArg("-operation");
    if (operation == null)
      throw new ConfigException(L.l("jmx-call must specify -operation"));

    int operationIndex = -1;
    if (operation.contains(":")) {
      int i = operation.indexOf(':');
      String name = operation.substring(0, i);
View Full Code Here

  @PostConstruct
  public void init()
  {
    if (_name == null)
      throw new ConfigException(L.l("'name' is a required attribute for {0}",
                                    getClass().getSimpleName()));
  }
View Full Code Here

  @PostConstruct
  public void init()
  {
    if (_name == null)
      throw new ConfigException(L.l("'name' is a required attribute for {0}",
                                    getClass().getSimpleName()));
  }
View Full Code Here

  public LoadBalanceRule createLoadBalance()
  {
    WebApp webApp = getRewriteDispatch().getWebApp();

    if (webApp == null)
      throw new ConfigException(L.l("<load-balance> requires a web-app.  Host-based <rewrite-dispatch> can not use <load-balance>."));

    return new LoadBalanceRule(getRewriteDispatch(), webApp);
  }
View Full Code Here

  public ProxyRule createProxy()
  {
    WebApp webApp = getRewriteDispatch().getWebApp();

    if (webApp == null)
      throw new ConfigException(L.l("<proxy> requires a web-app.  Host-based <rewrite-dispatch> can not use <proxy>."));

    return new ProxyRule(getRewriteDispatch(), webApp);
  }
View Full Code Here

  @PostConstruct
  public void init()
  {
    if (_method == null)
      throw new ConfigException(L.l("'method' is a required attribute for {0}",
                                    getClass().getSimpleName()));
  }
View Full Code Here

      }
      else if (_authMethod.equalsIgnoreCase("form")) {
        login = new FormLogin();

        if (_formLoginConfig == null)
          throw new ConfigException(L.l("'form' authentication requires form-login"));

        _formLoginConfig.configure(login);
      }
      else
        throw new ConfigException(L.l("'{0}' is an unknown auth-type.",
                                       _authMethod));

      if (_authenticator != null)
        login.setAuthenticator(_authenticator);
View Full Code Here

  //  @Override
  public void init()
    throws ConfigException
  {
    if (_value == null) {
      throw new ConfigException(L.l("'value' is a required attribute of '{0}'.",
                                    getClass().getSimpleName()));
    }
  }
View Full Code Here

    // #4333 - check watchdog-manager.log can be written
    WriteStream testOut = logPath.openAppend();
    testOut.close();
   
    if (! logPath.canWrite()) {
      throw new ConfigException("Cannot open " + logPath.getNativePath()
                                + " required for Resin start. Please check permissions");
    }

    RotateStream logStream = RotateStream.create(logPath);
    logStream.setRolloverSize(64L * 1024 * 1024);
 
View Full Code Here

TOP

Related Classes of com.caucho.config.ConfigException

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.