Package org.apache.catalina.core

Examples of org.apache.catalina.core.StandardHost


        Container container = service.getContainer();
        if (container instanceof StandardEngine) {
          StandardEngine engine = (StandardEngine) container;
          for (Container child : engine.findChildren()) {
            if (child instanceof StandardHost) {
              StandardHost host = (StandardHost) child;
              final File hostDir = hostDir(catalinaBase, host.getAppBase());

              openEjbWar = findOpenEjbWar(hostDir);
              if (openEjbWar != null) {
                return openEjbWar;
              } else {
View Full Code Here


                contextListener.destroy(standardContext);
            } else if (Lifecycle.CONFIGURE_START_EVENT.equals(type)) {
                contextListener.configureStart(standardContext);
            }
        } else if (source instanceof StandardHost) {
            StandardHost standardHost = (StandardHost) source;
            String type = event.getType();
            if (Lifecycle.PERIODIC_EVENT.equals(type)) {
                contextListener.checkHost(standardHost);
            }
        } else if (source instanceof StandardServer) {
View Full Code Here

     */
    private void engineAdded(StandardEngine engine) {
        addContextListener(engine);
        for (Container child : engine.findChildren()) {
            if (child instanceof StandardHost) {
                StandardHost host = (StandardHost) child;
                hostAdded(host);
            }
        }
    }
View Full Code Here

     * @param engine tomcat engine
     */
    private void engineRemoved(StandardEngine engine) {
        for (Container child : engine.findChildren()) {
            if (child instanceof StandardHost) {
                StandardHost host = (StandardHost) child;
                hostRemoved(host);
            }
        }
    }
View Full Code Here

            try {
                StandardContext ctx=(StandardContext)this.getContainer();
                Engine eng=(Engine)ctx.getParent().getParent();
                domain=ctx.getEngineName();
                distributable = ctx.getDistributable();
                StandardHost hst=(StandardHost)ctx.getParent();
                String path = ctx.getPath();
                if (path.equals("")) {
                    path = "/";
                }  
                oname=new ObjectName(domain + ":type=Manager,path="
                + path + ",host=" + hst.getName());
                Registry.getRegistry(null, null).registerComponent(this, oname, null );
            } catch (Exception e) {
                log.error("Error registering ",e);
            }
        }
View Full Code Here

    private HashMap<String, Host> hostMap = new HashMap<>();

    private synchronized Host createHost(String name) {
        Host host = hostMap.get(name);
        if (host == null) {
            host = new StandardHost();
            host.setName(name);
            hostMap.put(name, host);
        }
        return host;
    }
View Full Code Here

    for (Service service : server.findServices()) {
      if (service.getContainer() instanceof Engine) {
        Engine engine = (Engine) service.getContainer();
        for (Container engineChild : engine.findChildren()) {
          if (engineChild instanceof StandardHost) {
            StandardHost host = (StandardHost) engineChild;
            webappBuilder.checkHost(host);
          }
        }
            }
    }
View Full Code Here

            try {
                StandardContext ctx=(StandardContext)this.getContainer();
                Engine eng=(Engine)ctx.getParent().getParent();
                domain=ctx.getEngineName();
                distributable = ctx.getDistributable();
                StandardHost hst=(StandardHost)ctx.getParent();
                String path = ctx.getPath();
                if (path.equals("")) {
                    path = "/";
                }  
                oname=new ObjectName(domain + ":type=Manager,path="
                + path + ",host=" + hst.getName());
                Registry.getRegistry(null, null).registerComponent(this, oname, null );
            } catch (Exception e) {
                log.error("Error registering ",e);
            }
        }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        app2 = new File(getClass().getResource("/app2").toURI());
        File baseDir = new File(app2, "../../tomcat").getCanonicalFile();
        setupTomcat(baseDir, new StandardHost());
        engine.start();
    }
View Full Code Here

            try {
                StandardContext ctx=(StandardContext)this.getContainer();
                Engine eng=(Engine)ctx.getParent().getParent();
                domain=ctx.getEngineName();
                distributable = ctx.getDistributable();
                StandardHost hst=(StandardHost)ctx.getParent();
                String path = ctx.getPath();
                if (path.equals("")) {
                    path = "/";
                }  
                oname=new ObjectName(domain + ":type=Manager,path="
                + path + ",host=" + hst.getName());
                Registry.getRegistry(null, null).registerComponent(this, oname, null );
            } catch (Exception e) {
                log.error("Error registering ",e);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.catalina.core.StandardHost

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.