Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2232

Mappings in TypeDesc can't be GC'ed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The TypeDesc class holds a static Hashtable of class -> TypeDesc mappings. This is fine if Axis is loaded into the only the same classloader as the app itself (like when it's embedded in a webapp), but if axis is loaded into the parent classloader of all webapps, the hashtable will prevent those children classloaders from being garbage collected as it holds references to classes in those children classloaders.

      This patch 1) creates a Hashtable of class->TypeDesc for each classloader and 2) stores those hashtables in a WeakHashMap so they can be garbage collected when the child classloaders are garbage collected.

      Attachments

        1. SingleWeakHashMap.patch
          5 kB
          Kevan Lee Miller
        2. TypeDesc.java.patch
          5 kB
          David Blevins

        Issue Links

          Activity

            People

              dims Davanum Srinivas
              dblevins David Blevins
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: