Package org.apache.catalina

Examples of org.apache.catalina.Host.addChild()


        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        Service service = getService(pname);
        Engine engine = (Engine) service.getContainer();
        Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
        host.addChild(context);

        // Return the corresponding MBean name
        ObjectName oname =
            MBeanUtils.createObjectName(pname.getDomain(), context);
        return (oname.toString());
View Full Code Here


        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        Service service = getService(pname);
        Engine engine = (Engine) service.getContainer();
        Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
        host.addChild(context);

        // Return the corresponding MBean name
        ObjectName oname =
            MBeanUtils.createObjectName(pname.getDomain(), context);
        return (oname.toString());
View Full Code Here

        ObjectName pname = new ObjectName(parent);
        Server server = ServerFactory.getServer();
        Service service = server.findService(pname.getKeyProperty("service"));
        Engine engine = (Engine) service.getContainer();
        Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
        host.addChild(context);

        // Return the corresponding MBean name
        ManagedBean managed = registry.findManagedBean("StandardContext");
        ObjectName oname =
            MBeanUtils.createObjectName(managed.getDomain(), context);
View Full Code Here

        Service service = server.findService(pname.getKeyProperty("service"));
        Engine engine = (Engine) service.getContainer();
        Host host = (Host) engine.findChild(pname.getKeyProperty("host"));

        // Add context to the host
        host.addChild(context);
       
        // Return the corresponding MBean name
        ManagedBean managed = registry.findManagedBean("StandardContext");

        ObjectName oname =
View Full Code Here

        Host host = embedded.createHost("localhost", home + "/webapps");
        engine.addChild(host);

        Context root = embedded.createContext("", home + "/webapps/ROOT");
        host.addChild(root);

        Context examples = embedded.createContext("/examples",
                                                  home + "/webapps/examples");
        customize(examples);    // Special customization for this web-app
        host.addChild(examples);
View Full Code Here

        host.addChild(root);

        Context examples = embedded.createContext("/examples",
                                                  home + "/webapps/examples");
        customize(examples);    // Special customization for this web-app
        host.addChild(examples);

        // As an alternative to the three lines above, there is also a very
        // simple method to deploy a new application that has default values
        // for all context properties:
        //   String contextPath = ... context path for this app ...
View Full Code Here

        } else {
            log.warn("Deployer not found for "+pname.getKeyProperty("host"));
            Service service = getService(pname);
            Engine engine = (Engine) service.getContainer();
            Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
            host.addChild(context);
        }

        // Return the corresponding MBean name
        ObjectName oname = context.getJmxName();
View Full Code Here

                final ContextInfo contextInfo = addContextInfo(host, standardContext);
                contextInfo.appInfo = info;
                contextInfo.host = theHost;
            }

            theHost.addChild(standardContext);
        }
    }

    public synchronized ContextInfo standaAloneWebAppInfo(final File file) {
        for (final ContextInfo info : infos.values()) {
View Full Code Here

        } else {
            log.warn("Deployer not found for "+pname.getKeyProperty("host"));
            Service service = getService(pname);
            Engine engine = (Engine) service.getContainer();
            Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
            host.addChild(context);
        }

        // Return the corresponding MBean name
        ObjectName oname = context.getJmxName();
View Full Code Here

        } else {
            log.warn("Deployer not found for "+pname.getKeyProperty("host"));
            Service service = getService(pname);
            Engine engine = (Engine) service.getContainer();
            Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
            host.addChild(context);
        }

        // Return the corresponding MBean name
        ObjectName oname = context.getJmxName();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.