Package org.apache.catalina.startup

Examples of org.apache.catalina.startup.HostConfig$DeployWar


       
        StandardHost host = new StandardHost();
        host.setAppBase(appBase);
        host.setName(name);

        host.addLifecycleListener(new HostConfig());

        // Add host aliases
        if ((aliases != null) && !("".equals(aliases))) {
            StringTokenizer tok = new StringTokenizer(aliases, ", ");
            while (tok.hasMoreTokens()) {
View Full Code Here


        host.setUnpackWARs(unpackWARs);
        host.setXmlNamespaceAware(xmlNamespaceAware);
        host.setXmlValidation(xmlValidation);
 
        // add HostConfig for active reloading
        HostConfig hostConfig = new HostConfig();
        host.addLifecycleListener(hostConfig);

        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        Service service = getService(pname);
View Full Code Here

            try {
                // Register with the Engine
                ObjectName serviceName=new ObjectName(domain +
                                        ":type=Engine");

                HostConfig deployer = new HostConfig();
                addLifecycleListener(deployer);               
                if( mserver.isRegistered( serviceName )) {
                    if(log.isDebugEnabled())
                        log.debug("Registering "+ serviceName +" with the Engine");
                    mserver.invoke( serviceName, "addChild",
View Full Code Here

    @Test
    public void justAContextStop() throws Exception {
        container.start();
        assertEquals(0, webapps().length);
        final StandardHost standardHost = StandardHost.class.cast(TomcatHelper.getServer().findService("Tomcat").getContainer().findChild("localhost"));
        final HostConfig listener = new HostConfig(); // not done in embedded but that's the way autodeploy works in normal tomcat
        standardHost.addLifecycleListener(listener);
        createWebapp(new File(WORK_DIR, "tomee/webapps/my-webapp"));
        listener.lifecycleEvent(new LifecycleEvent(standardHost, Lifecycle.START_EVENT, standardHost));
        assertEquals(1, webapps().length);
        webapps()[0].stop();
        assertEquals(1, webapps().length);
        webapps()[0].start();
        assertEquals(1, webapps().length);
View Full Code Here

    @Test
    public void tomcatLifecycle() throws Exception {
        container.start();
        assertEquals(0, webapps().length);
        final StandardHost standardHost = StandardHost.class.cast(TomcatHelper.getServer().findService("Tomcat").getContainer().findChild("localhost"));
        final HostConfig listener = new HostConfig(); // not done in embedded but that's the way autodeploy works in normal tomcat
        standardHost.addLifecycleListener(listener);
        createWebapp(new File(WORK_DIR, "tomee/webapps/my-webapp"));
        listener.lifecycleEvent(new LifecycleEvent(standardHost, Lifecycle.START_EVENT, standardHost));
        assertEquals(1, webapps().length);
    }
View Full Code Here

            try {
                // Register with the Engine
                ObjectName serviceName=new ObjectName(domain +
                                        ":type=Engine");

                HostConfig deployer = null;
                try {
                    String hostConfigClassname = getHostConfigClass();
                    if (hostConfigClassname != null) {
                        Class clazz = Class.forName(hostConfigClassname);
                        deployer = (HostConfig) clazz.newInstance();
                    } else {
                        deployer = new HostConfig();
                    }
                } catch (Exception e) {
                    log.warn("Error creating HostConfig for host " + name, e);
                    throw e;
                }
View Full Code Here

            try {
                // Register with the Engine
                ObjectName serviceName=new ObjectName(domain +
                                        ":type=Engine");

                HostConfig deployer = new HostConfig();
                addLifecycleListener(deployer);               
                if( mserver.isRegistered( serviceName )) {
                    if(log.isDebugEnabled())
                        log.debug("Registering "+ serviceName +" with the Engine");
                    mserver.invoke( serviceName, "addChild",
View Full Code Here

       
        StandardHost host = new StandardHost();
        host.setAppBase(appBase);
        host.setName(name);

        host.addLifecycleListener(new HostConfig());

        // Add host aliases
        if ((aliases != null) && !("".equals(aliases))) {
            StringTokenizer tok = new StringTokenizer(aliases, ", ");
            while (tok.hasMoreTokens()) {
View Full Code Here

        host.setDeployOnStartup(deployOnStartup);
        host.setDeployXML(deployXML);
        host.setUnpackWARs(unpackWARs);
   
        // add HostConfig for active reloading
        HostConfig hostConfig = new HostConfig();
        host.addLifecycleListener(hostConfig);

        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        Service service = getService(pname);
View Full Code Here

        try {
            contained = (Container)Class.forName(type).newInstance();
            contained.setName(name);
           
            if(contained instanceof StandardHost){
                HostConfig config = new HostConfig();
                contained.addLifecycleListener(config);
            } else if(contained instanceof StandardContext){
                ContextConfig config = new ContextConfig();
                contained.addLifecycleListener(config);
            }
View Full Code Here

TOP

Related Classes of org.apache.catalina.startup.HostConfig$DeployWar

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.