glassfish
  1. glassfish
  2. GLASSFISH-18682

Configure clearReferencesStatic in WebappClassLoader through context.xml

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_b35
    • Component/s: web_container
    • Labels:
      None

      Description

      In v3, one can configure clearReferencesStatic through java system property: org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES

      In Tomcat 7, the system property has been removed. Instead, it is configured in context.xml as follows:

      <Context clearReferencesStatic="true">
      

      GlassFish should also configure it this way as it is more flexible.

        Activity

        Hide
        Shing Wai Chan added a comment -

        The runtime is handled as in Tomcat.
        For the deployment time, additional logic is added for pre-parsing the context.xml.

        Sending web/war-util/src/main/java/com/sun/enterprise/glassfish/web/WarHandler.java
        Sending web/war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java
        Sending web/war-util/src/main/resources/com/sun/logging/enterprise/system/container/web/LogStrings.properties
        Transmitting file data ...
        Committed revision 53785.

        Show
        Shing Wai Chan added a comment - The runtime is handled as in Tomcat. For the deployment time, additional logic is added for pre-parsing the context.xml. Sending web/war-util/src/main/java/com/sun/enterprise/glassfish/web/WarHandler.java Sending web/war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java Sending web/war-util/src/main/resources/com/sun/logging/enterprise/system/container/web/LogStrings.properties Transmitting file data ... Committed revision 53785.
        Hide
        Shing Wai Chan added a comment -

        fix FindBugs issue MF_CLASS_MASKS_FIELD introduced by the fix above.

        Sending src/main/java/com/sun/enterprise/glassfish/web/WarHandler.java
        Transmitting file data .
        Committed revision 53824.

        Show
        Shing Wai Chan added a comment - fix FindBugs issue MF_CLASS_MASKS_FIELD introduced by the fix above. Sending src/main/java/com/sun/enterprise/glassfish/web/WarHandler.java Transmitting file data . Committed revision 53824.

          People

          • Assignee:
            Shing Wai Chan
            Reporter:
            Shing Wai Chan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: