Package com.caucho.server.host

Examples of com.caucho.server.host.HostConfig


        port.bindTo(_server);
      }

      _resin.start();
     
      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."));
View Full Code Here


      if (_httpPort >= 0) {
        HttpEmbed httpEmbed = new HttpEmbed(_httpPort);
        httpEmbed.bindTo(_server);
      }
     
      HostConfig hostConfig = new HostConfig();
      _server.addHost(hostConfig);
      _host = _server.getHost("", 0);
    } catch (RuntimeException e) {
      throw e;
    } catch (Throwable e) {
View Full Code Here

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();

    try {
      HostConfig hostConfig = new HostConfig();
      hostConfig.setHostName(new RawString(_hostName));
      hostConfig.setRootDirectory(new RawString("memory:/error/" + _hostName));
      hostConfig.setSkipDefaultConfig(true);
      hostConfig.setRedeployMode(DeployMode.MANUAL);

      WebAppConfig webAppConfig = new WebAppConfig();
      webAppConfig.setId("/");
      webAppConfig.setRootDirectory(new RawString("memory:/error/ROOT"));
      webAppConfig.setSkipDefaultConfig(true);
      webAppConfig.setRedeployMode(DeployMode.MANUAL);

      hostConfig.addPropertyProgram("web-app", webAppConfig);

      // host.addWebApp(webAppConfig);
     
      ServletMapping mapping = new ServletMapping();
      mapping.addURLPattern("/hmtp");
View Full Code Here

  }

  public HostConfig getHostConfig()
  {
    if (_hostConfig == null) {
      HostConfig hostConfig = new HostConfig();
      hostConfig.setId(HOST_NAME);
      /*
      if (_path != null) {
        hostConfig.setRootDirectory(new RawString(_path.getFullPath() + "/bogus-admin"));
      }
      else
        hostConfig.setRootDirectory(new RawString("/bogus-admin"));
      */
      hostConfig.setRootDirectory(new RawString("/bogus-admin"));

      hostConfig.setSkipDefaultConfig(true);

      hostConfig.init();

      try {
        if (_server == null)
          _server = _resin.getServer();

View Full Code Here

    if (_password == null) {
      log.warning(L.l("jmx-remote disabled.  jmx-remote requires at least one enabled management <user>"));
      return;
    }
   
    HostConfig hostConfig = _management.getHostConfig();

    WebAppConfig webAppConfig = new WebAppConfig();
    webAppConfig.setId(_serviceName);
    webAppConfig.setRootDirectory(new RawString("memory:/admin-dummy-root"));

    hostConfig.addBuilderProgram(new PropertyValueProgram("web-app", webAppConfig));

    ServletMapping servlet = new ServletMapping();

    servlet.setServletName(_serviceName);
    servlet.addURLPattern("/*");
 
View Full Code Here

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();

    try {
      HostConfig hostConfig = new HostConfig();
      hostConfig.setHostName(new RawString(_hostName));
      hostConfig.setRootDirectory(new RawString("error:" + _hostName));
      hostConfig.setSkipDefaultConfig(true);
      hostConfig.setRedeployMode("manual");

      WebAppConfig webAppConfig = new WebAppConfig();
      webAppConfig.setId("/");
      webAppConfig.setRootDirectory(new RawString("error:/ROOT"));
      webAppConfig.setSkipDefaultConfig(true);
      webAppConfig.setRedeployMode("manual");

      hostConfig.addPropertyProgram("web-app", webAppConfig);

      // host.addWebApp(webAppConfig);
     
      ServletMapping mapping = new ServletMapping();
      mapping.addURLPattern("/hmtp");
View Full Code Here

      _server = _resin.getServer();
     
      if (_httpPort >= 0)
        _server.createHttp().setPort(_httpPort);
     
      HostConfig hostConfig = new HostConfig();
      _server.addHost(hostConfig);
      _host = _server.getHost("", 0);
    } catch (RuntimeException e) {
      throw e;
    } catch (Throwable e) {
View Full Code Here

     
      for (PortEmbed port : _portList) {
        port.bindTo(_server);
      }

      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."));
View Full Code Here

    if (_password == null) {
      log.warning(L.l("jmx-remote disabled.  jmx-remote requires at least one enabled management <user>"));
      return;
    }
   
    HostConfig hostConfig = _management.getHostConfig();

    WebAppConfig webAppConfig = new WebAppConfig();
    webAppConfig.setId(_serviceName);
    webAppConfig.setRootDirectory(new RawString("memory:/admin-dummy-root"));

    hostConfig.addBuilderProgram(new PropertyValueProgram("web-app", webAppConfig));

    ServletMapping servlet = new ServletMapping();

    servlet.setServletName(_serviceName);
    servlet.addURLPattern("/*");
 
View Full Code Here

  }

  public HostConfig getHostConfig()
  {
    if (_hostConfig == null) {
      HostConfig hostConfig = new HostConfig();
      hostConfig.setId(HOST_NAME);
      /*
      if (_path != null) {
        hostConfig.setRootDirectory(new RawString(_path.getFullPath() + "/bogus-admin"));
      }
      else
        hostConfig.setRootDirectory(new RawString("/bogus-admin"));
      */
      hostConfig.setRootDirectory(new RawString("/bogus-admin"));

      hostConfig.setSkipDefaultConfig(true);

      hostConfig.init();

      try {
        if (_server == null)
          _server = _resin.getServer();

View Full Code Here

TOP

Related Classes of com.caucho.server.host.HostConfig

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.