glassfish
  1. glassfish
  2. GLASSFISH-1465

StandardHostValve has expensive classloader processing

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.1pe
    • Fix Version/s: 9.1pe_dev
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,465
    • Status Whiteboard:
      Hide

      fixed-pwc12

      Show
      fixed-pwc12

      Description

      In StandardHostValve.postInvoke:

      Thread.currentThread().setContextClassLoader(StandardHostValve.class.getClassLoader())

      Getting the classloader is an expensive operation; that value should be a static
      instance variable.

        Activity

        Hide
        jluehe added a comment -

        Thanks, Scott!
        There is similar code in org.apache.catalina.core.StandardContext, which also
        needs to be fixed.

        Show
        jluehe added a comment - Thanks, Scott! There is similar code in org.apache.catalina.core.StandardContext, which also needs to be fixed.
        Hide
        jluehe added a comment -

        Save classloader in static variable for reuse:

        Checking in core/StandardContext.java;
        /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/StandardContext.java,v
        <-- StandardContext.java
        new revision: 1.28; previous revision: 1.27
        done
        Checking in core/StandardHostValve.java;
        /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/StandardHostValve.java,v
        <-- StandardHostValve.java
        new revision: 1.16; previous revision: 1.15
        done
        Checking in mbeans/MBeanUtils.java;
        /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/mbeans/MBeanUtils.java,v
        <-- MBeanUtils.java
        new revision: 1.5; previous revision: 1.4
        done
        Checking in startup/Catalina.java;
        /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/startup/Catalina.java,v
        <-- Catalina.java
        new revision: 1.5; previous revision: 1.4
        done

        Show
        jluehe added a comment - Save classloader in static variable for reuse: Checking in core/StandardContext.java; /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/StandardContext.java,v <-- StandardContext.java new revision: 1.28; previous revision: 1.27 done Checking in core/StandardHostValve.java; /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/StandardHostValve.java,v <-- StandardHostValve.java new revision: 1.16; previous revision: 1.15 done Checking in mbeans/MBeanUtils.java; /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/mbeans/MBeanUtils.java,v <-- MBeanUtils.java new revision: 1.5; previous revision: 1.4 done Checking in startup/Catalina.java; /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/startup/Catalina.java,v <-- Catalina.java new revision: 1.5; previous revision: 1.4 done
        Hide
        kmeduri added a comment -

        Merged the fix to PWC12Dev_Branch:

        Checking in appserv-webtier/src/java/org/apache/catalina/core/StandardContext.java;
        /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/StandardContext.java,v
        <-- StandardContext.java
        new revision: 1.22.6.2; previous revision: 1.22.6.1
        done
        Checking in
        appserv-webtier/src/java/org/apache/catalina/core/StandardHostValve.java;
        /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/StandardHostValve.java,v
        <-- StandardHostValve.java
        new revision: 1.12.12.2; previous revision: 1.12.12.1
        done

        Show
        kmeduri added a comment - Merged the fix to PWC12Dev_Branch: Checking in appserv-webtier/src/java/org/apache/catalina/core/StandardContext.java; /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/StandardContext.java,v <-- StandardContext.java new revision: 1.22.6.2; previous revision: 1.22.6.1 done Checking in appserv-webtier/src/java/org/apache/catalina/core/StandardHostValve.java; /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/StandardHostValve.java,v <-- StandardHostValve.java new revision: 1.12.12.2; previous revision: 1.12.12.1 done

          People

          • Assignee:
            jluehe
            Reporter:
            Scott Oaks
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: