Package com.caucho.config

Examples of com.caucho.config.ConfigException


      target.postConstruct(protocol);

      setProtocol(protocol);
    }
    else
      throw new ConfigException(L.l("protocol requires either a class"));
   
    super.init();
  }
View Full Code Here


                        ManagerClient managerClient)
  {
    String pattern = args.getArg("-pattern");

    if (pattern == null)
      throw new ConfigException(L.l(
        "-pattern is required for jmx-set command"));

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

    String attribute = args.getArg("-attribute");

    if (attribute == null)
      throw new ConfigException(L.l(
        "-attribute is required for jmx-set command"));

    String value = args.getDefaultArg();

    if (value == null)
      throw new ConfigException(L.l(
        "jmx-set requires <value> parameter be specified"));

    String result = managerClient.setJmx(pattern, attribute, value);

    System.out.println(result);
View Full Code Here

  @PostConstruct
  public void init()
    throws ConfigException
  {
    if (_allowNetworkList == null && _denyNetworkList == null)
      throw new ConfigException(L.l("<ip-constraint> either '<allow>' or '<deny>' or both are expected"));

    if (_allowNetworkList != null)
      _allowNetworkList.trimToSize();

    if (_denyNetworkList != null)
View Full Code Here

        || "FORWARD".equals(type)
        || "INCLUDE".equals(type)) {
      _dispatcherTypes.add(type);
    }
    else
      throw new ConfigException(L.l("'{0} is an unknown dispatcher-type.  Valid types are 'REQUEST', 'FORWARD', and 'INCLUDE'",
                                    type));
  }
View Full Code Here

      AdminService service = annotated.getAnnotation(AdminService.class);

      Server server = Server.getCurrent();

      if (server == null) {
        throw new ConfigException(L
            .l("@AdminService requires an active Resin Server."));
      }

      if (!server.isWatchdog()) {
        HempBroker broker = (HempBroker) server.getAdminBroker();
View Full Code Here

   */
  @Configurable
  public void setThreadMax(int max)
  {
    if (max < 0)
      throw new ConfigException(L.l("<thread-max> ({0}) must be greater than zero.",
                                    max));

    _threadMax = max;
  }
View Full Code Here

  public void init()
  {
    if (_threadIdleMax > 0
        && _threadMax > 0
        && _threadMax < _threadIdleMax)
      throw new ConfigException(L.l("<thread-idle-max> ({0}) must be less than <thread-max> ({1})",
                                    _threadIdleMax, _threadMax));

    if (_threadIdleMin > 0
        && _threadIdleMax > 0
        && _threadIdleMax < _threadIdleMin)
      throw new ConfigException(L.l("<thread-idle-min> ({0}) must be less than <thread-idle-max> ({1})",
                                    _threadIdleMin, _threadIdleMax));

    if (_threadMax > 0
        && _threadExecutorTaskMax > 0
        && _threadMax < _threadExecutorTaskMax)
      throw new ConfigException(L.l("<thread-executor-task-max> ({0}) must be less than <thread-max> ({1})",
                                    _threadExecutorTaskMax, _threadMax));

    ThreadPool threadPool = ThreadPool.getThreadPool();

    if (_threadMax > 0)
View Full Code Here

     */
    public void addJava(Path path)
      throws ConfigException
    {
      if (! path.canRead())
        throw new ConfigException(L.l("<java> module {0} must be a valid path.",
                                      path));
     
      _javaModules.add(path);
    }
View Full Code Here

      if (! _resinConf.exists() && _resinHome != null)
        _resinConf = _resinHome.lookup(resinConf);

      if (! _resinConf.exists())
        throw new ConfigException(L().l("Resin/{0} can't find configuration file '{1}'", VersionFactory.getVersion(), _resinConf.getNativePath()));
    }
  }
View Full Code Here

    ResinScalingClient scalingClient = getScalingClient(args, client);

    String server = args.getDefaultArg();

    if (server == null)
      throw new ConfigException("server is not specified");

    CloudServerState state = scalingClient.enable(server);

    scalingClient.close();
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.