Java 类org.apache.catalina.ha.context.ReplicatedContext 实例源码

项目:tomcat7    文件:TestTomcat.java   
@Test
public void testGetCustomContextPerAddWebappWithNullHost() {
    Tomcat tomcat = getTomcatInstance();
    Host host = tomcat.getHost();
    if (host instanceof StandardHost) {
        ((StandardHost) host).setContextClass(ReplicatedContext.class
                .getName());
    }

    File appFile = new File("test/deployment/context.war");
    Context context = tomcat.addWebapp(null, "/test",
            appFile.getAbsolutePath());

    assertEquals(ReplicatedContext.class.getName(), context.getClass()
            .getName());
}
项目:tomcat7    文件:TestTomcat.java   
@Test
public void testGetCustomContextPerAddWebappWithHost() {
    Tomcat tomcat = getTomcatInstance();
    Host host = tomcat.getHost();
    if (host instanceof StandardHost) {
        ((StandardHost) host).setContextClass(ReplicatedContext.class
                .getName());
    }

    File appFile = new File("test/deployment/context.war");
    Context context = tomcat.addWebapp(host, "/test",
            appFile.getAbsolutePath());

    assertEquals(ReplicatedContext.class.getName(), context.getClass()
            .getName());
}
项目:apache-tomcat-7.0.73-with-comment    文件:TestTomcat.java   
@Test
public void testGetCustomContextPerAddWebappWithNullHost() {
    Tomcat tomcat = getTomcatInstance();
    Host host = tomcat.getHost();
    if (host instanceof StandardHost) {
        ((StandardHost) host).setContextClass(ReplicatedContext.class
                .getName());
    }

    File appFile = new File("test/deployment/context.war");
    Context context = tomcat.addWebapp(null, "/test",
            appFile.getAbsolutePath());

    assertEquals(ReplicatedContext.class.getName(), context.getClass()
            .getName());
}
项目:apache-tomcat-7.0.73-with-comment    文件:TestTomcat.java   
@Test
public void testGetCustomContextPerAddWebappWithHost() {
    Tomcat tomcat = getTomcatInstance();
    Host host = tomcat.getHost();
    if (host instanceof StandardHost) {
        ((StandardHost) host).setContextClass(ReplicatedContext.class
                .getName());
    }

    File appFile = new File("test/deployment/context.war");
    Context context = tomcat.addWebapp(host, "/test",
            appFile.getAbsolutePath());

    assertEquals(ReplicatedContext.class.getName(), context.getClass()
            .getName());
}
项目:tomcat7    文件:TestTomcat.java   
@Test
public void testGetCustomContextPerAddContextWithHost() {
    Tomcat tomcat = getTomcatInstance();
    Host host = tomcat.getHost();
    if (host instanceof StandardHost) {
        ((StandardHost) host).setContextClass(ReplicatedContext.class
                .getName());
    }

    // No file system docBase required
    Context ctx = tomcat.addContext(host, "", null);
    assertEquals(ReplicatedContext.class.getName(), ctx.getClass()
            .getName());
}
项目:apache-tomcat-7.0.73-with-comment    文件:TestTomcat.java   
@Test
public void testGetCustomContextPerAddContextWithHost() {
    Tomcat tomcat = getTomcatInstance();
    Host host = tomcat.getHost();
    if (host instanceof StandardHost) {
        ((StandardHost) host).setContextClass(ReplicatedContext.class
                .getName());
    }

    // No file system docBase required
    Context ctx = tomcat.addContext(host, "", null);
    assertEquals(ReplicatedContext.class.getName(), ctx.getClass()
            .getName());
}