Examples of JreMemoryLeakPreventionListener


Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

    }

    if (addDefaultListeners) {
      Server server = tomcat.getServer();
      server.addLifecycleListener(new JasperListener());
      server.addLifecycleListener(new JreMemoryLeakPreventionListener());
      server.addLifecycleListener(new ThreadLocalLeakPreventionListener());
    }

    for (ContextEnvironment env : contextEnvironments) {
      ctx.getNamingResources().addEnvironment(env);
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

    }

    if (addDefaultListeners) {
      Server server = tomcat.getServer();
      server.addLifecycleListener(new JasperListener());
      server.addLifecycleListener(new JreMemoryLeakPreventionListener());
      server.addLifecycleListener(new ThreadLocalLeakPreventionListener());
    }

    for (ContextEnvironment env : contextEnvironments) {
      ctx.getNamingResources().addEnvironment(env);
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

    }

    if (addDefaultListeners) {
      Server server = tomcat.getServer();
      server.addLifecycleListener(new JasperListener());
      server.addLifecycleListener(new JreMemoryLeakPreventionListener());
      server.addLifecycleListener(new ThreadLocalLeakPreventionListener());
    }

    for (ContextEnvironment env : contextEnvironments) {
      ctx.getNamingResources().addEnvironment(env);
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

    }

    if (addDefaultListeners) {
      Server server = tomcat.getServer();
      server.addLifecycleListener(new JasperListener());
      server.addLifecycleListener(new JreMemoryLeakPreventionListener());
      server.addLifecycleListener(new ThreadLocalLeakPreventionListener());
    }

    for (ContextEnvironment env : contextEnvironments) {
      ctx.getNamingResources().addEnvironment(env);
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

    if (addDefaultListeners) {
      Server server = tomcat.getServer();
      server.addLifecycleListener(new AprLifecycleListener());
      server.addLifecycleListener(new JasperListener());
      server.addLifecycleListener(new JreMemoryLeakPreventionListener());
      server.addLifecycleListener(new GlobalResourcesLifecycleListener());
      server.addLifecycleListener(new ThreadLocalLeakPreventionListener());
    }

    for (final ContextEnvironment env : contextEnvironments) {
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

      engine.setRealm(realm);
    }
  }

  private static void configureServer(Server server) {
    server.addLifecycleListener(new JreMemoryLeakPreventionListener());
    server.addLifecycleListener(new ThreadLocalLeakPreventionListener());
  }
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

    if (addDefaultListeners) {
      Server server = tomcat.getServer();
      server.addLifecycleListener(new AprLifecycleListener());
      server.addLifecycleListener(new JasperListener());
      server.addLifecycleListener(new JreMemoryLeakPreventionListener());
      server.addLifecycleListener(new GlobalResourcesLifecycleListener());
      server.addLifecycleListener(new ThreadLocalLeakPreventionListener());
    }

    for (ContextEnvironment env : contextEnvironments) {
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

        // The test fails if JreMemoryLeakPreventionListener is not
        // present. The listener affects the JVM, and thus not only the current,
        // but also the subsequent tests that are run in the same JVM. So it is
        // fair to add it in every test.
        tomcat.getServer().addLifecycleListener(
                new JreMemoryLeakPreventionListener());
    }
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

    public void testThreadLocalLeak1() throws Exception {

        Tomcat tomcat = getTomcatInstance();
        // Need to make sure we see a leak for the right reasons
        tomcat.getServer().addLifecycleListener(
                new JreMemoryLeakPreventionListener());

        // No file system docBase required
        Context ctx = tomcat.addContext("", null);

        Tomcat.addServlet(ctx, "leakServlet1",
View Full Code Here

Examples of org.apache.catalina.core.JreMemoryLeakPreventionListener

    public void testThreadLocalLeak2() throws Exception {

        Tomcat tomcat = getTomcatInstance();
        // Need to make sure we see a leak for the right reasons
        tomcat.getServer().addLifecycleListener(
                new JreMemoryLeakPreventionListener());

        // No file system docBase required
        Context ctx = tomcat.addContext("", null);

        Tomcat.addServlet(ctx, "leakServlet2",
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.