Package com.caucho.config

Examples of com.caucho.config.ConfigException


        serverId = args.getDynamicServerId();

      WatchdogChild watchdog = _watchdogMap.get(serverId);

      if (watchdog == null)
        throw new ConfigException(L().l("No matching <server> found for -server '{0}' in '{1}'",
                                        serverId, _args.getResinConf()));

      watchdog.start();
    }
  }
View Full Code Here


  {
    synchronized (_watchdogMap) {
      WatchdogChild watchdog = _watchdogMap.get(serverId);

      if (watchdog == null)
        throw new ConfigException(L().l("No matching <server> found for -server '{0}' in {1}",
                                        serverId, _args.getResinConf()));

      watchdog.stop();
    }
  }
View Full Code Here

    // no synchronization because kill must avoid blocking

    WatchdogChild watchdog = _watchdogMap.get(serverId);

    if (watchdog == null)
      throw new ConfigException(L().l("No matching <server> found for -server '{0}' in {1}",
                                      serverId, _args.getResinConf()));

    watchdog.kill();
  }
View Full Code Here

      int port = args.getDynamicPort();

      BootClusterConfig cluster = resin.findCluster(clusterId);

      if (cluster == null) {
        throw new ConfigException(L().l("'{0}' is an unknown cluster",
                                      clusterId));
      }

      server = cluster.createServer();
      serverId = args.getDynamicServerId();
      server.setId(serverId);
      server.setAddress(address);
      server.setPort(port);
      cluster.addServer(server);
    }
    else {
      WatchdogClient client = resin.findClient(serverId);

      if (client != null)
        server = client.getConfig();
      else
        server = resin.findServer(serverId);
    }

    WatchdogChild watchdog = _watchdogMap.get(server.getId());

    if (watchdog != null) {
      if (watchdog.isActive()) {
        throw new ConfigException(L().l("server '{0}' cannot be started because a running instance already exists.  stop or restart the old server first.",
                                        server.getId()));
      }

      watchdog = _watchdogMap.remove(server.getId());
View Full Code Here

      HostConfig hostConfig = new HostConfig();
      _server.addHost(hostConfig);
      _host = _server.getHost("", 0);

      if (_host == null) {
        throw new ConfigException(L.l("ResinEmbed requires a <host> to be configured in the resin.xml, because the webapps must belong to a host."));
      }

      thread.setContextClassLoader(_host.getClassLoader());

      for (WebAppEmbed webApp : _webAppList) {
View Full Code Here

    }
   
    CloudSystem cloudSystem = TopologyService.getCurrent().getSystem();

    if (cloudSystem.getClusterList().length == 0)
      throw new ConfigException(L.l("Resin needs at least one defined <cluster>"));

    String clusterId = cloudSystem.getClusterList()[0].getId();

    _cluster = cloudSystem.findCluster(clusterId);

    if (_cluster.getPodList().length == 0)
      throw new ConfigException(L.l("Resin needs at least one defined <server> or <cluster-pod>"));

    if (_cluster.getPodList()[0].getServerList().length == 0)
      throw new ConfigException(L.l("Resin needs at least one defined <server>"));

    CloudServer cloudServer = _cluster.getPodList()[0].getServerList()[0];
    // _clusterServer = cloudServer.getData(ClusterServer.class);
   
    if (cloudServer != null)
View Full Code Here

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

  @PostConstruct
  public void init()
    throws Exception
  {
    if ("jdbc".equals(_type) && _dataSource == null)
      throw new ConfigException(L.l("'jdbc' persistent-store requires a data-source"));
   
    if (_dataSource != null) {
      DistCacheSystem system = DistCacheSystem.getCurrent();

      system.setJdbcDataSource(_dataSource);
View Full Code Here

      throw ConfigException.create(ex);
    }
    catch (ClassNotFoundException e) {
      log.log(Level.FINER, e.toString(), e);

      throw new ConfigException(L.l("load-balance requires Resin Professional"));
    }
  }
View Full Code Here

  }

  public void init()
  {
    if (_actorClass == null)
      throw new ConfigException(L.l("JmtpServlet requires an actor"));
  }
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.