Beispiel #1
0
  /** Start an ear */
  public void startEarDeploy(String name) {
    clearCache();

    _earDeploy.update();
    EarDeployController entry = _earDeploy.update(name);

    if (entry != null) entry.start();

    clearCache();
  }
Beispiel #2
0
  /** Updates an ear deploy */
  public void updateEarDeploy(String name) throws Throwable {
    clearCache();

    _earDeploy.update();
    EarDeployController entry = _earDeploy.update(name);

    if (entry != null) {
      entry.start();

      Throwable configException = entry.getConfigException();

      if (configException != null) throw configException;
    }

    clearCache();
  }
Beispiel #3
0
  public void addWebApp(WebAppSingleDeployGenerator deployGenerator) {
    deployGenerator.deploy();

    _appDeploy.add(deployGenerator);

    clearCache();
  }
Beispiel #4
0
  /** Adds an webApp. */
  public void addWebApp(WebAppConfig config) {
    if (config.getURLRegexp() != null) {
      DeployGenerator<WebAppController> deploy =
          new WebAppRegexpDeployGenerator(_appDeploySpi, this, config);
      _appDeploy.add(deploy);

      clearCache();
      return;
    }

    // server/10f6
    /*
    WebAppController oldEntry
      = _appDeploy.findController(config.getContextPath());

    if (oldEntry != null && oldEntry.getSourceType().equals("single")) {
      throw new ConfigException(L.l("duplicate web-app '{0}' forbidden.",
                                    config.getId()));
    }
    */

    WebAppSingleDeployGenerator deployGenerator = createDeployGenerator(config);

    addWebApp(deployGenerator);
  }
Beispiel #5
0
  /** Updates a WebApp deploy */
  public void updateWebAppDeploy(String name) throws Throwable {
    _appDeploy.update();
    WebAppController controller = _appDeploy.update(name);

    clearCache();

    if (controller != null) {
      Throwable configException = controller.getConfigException();

      if (configException != null) throw configException;
    }
  }
Beispiel #6
0
  /** Removes an webApp. */
  void removeWebApp(WebAppController entry) {
    _appDeploy.remove(entry.getContextPath());

    clearCache();
  }