Uploaded image for project: 'Commons Logging'
  1. Commons Logging
  2. LOGGING-51

[logging] Memory leaks in JBoss due to LogFactory cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.4
    • 1.1.0
    • None
    • Operating System: All
      Platform: All

    • 31286

    Description

      LogFactory.java maintains a static cache (Hashtable) of LogFactories, keyed by
      context ClassLoader. In JBoss, and may be in many other J2EE containers, each
      hot-redeployment of a J2EE application makes a new class loader for the
      application, destroying all references to the old one. However, commons-logging.
      jar is loaded by a parent classloader which is common for all applications, and
      still maintains hard references to would-be-dead ClassLoaders of undeployed
      applications. This leads to significant memory leaks, because all static members
      of all classes of the undeployed applications do not become a subject for GC. It
      would be excellent if this LogFactory caching could be disabled through a config
      or a WeakHashMap is used instead of Hashtable.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--JCL-guide.diff
          9 kB
          Brian Stansberry
        2. ASF.LICENSE.NOT.GRANTED--LogFactory.diff
          2 kB
          Brian Stansberry
        3. ASF.LICENSE.NOT.GRANTED--LogFactoryTest.diff
          15 kB
          Brian Stansberry
        4. ASF.LICENSE.NOT.GRANTED--memoryleaktest.zip
          5 kB
          Brian Stansberry
        5. ASF.LICENSE.NOT.GRANTED--patch.txt
          9 kB
          Brian Stansberry
        6. ASF.LICENSE.NOT.GRANTED--WeakHashtable_javadoc.txt
          3 kB
          Brian Stansberry
        7. ASF.LICENSE.NOT.GRANTED--WeakHashtable.java
          21 kB
          Brian Stansberry

        Activity

          People

            Unassigned Unassigned
            ayud@mail.ru Alexey Yudichev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: