Package org.apache.catalina.startup

Examples of org.apache.catalina.startup.HostConfig.lifecycleEvent()


        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


        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);
    }

    private static org.apache.catalina.Container[] webapps() {
        return TomcatHelper.getServer().findService("Tomcat").getContainer().findChild("localhost").findChildren();
View Full Code Here

        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

        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);
    }

    private static org.apache.catalina.Container[] webapps() {
        return TomcatHelper.getServer().findService("Tomcat").getContainer().findChild("localhost").findChildren();
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.