Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1137

PermGen errors through WrapperFactory (javassist)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: core-1.8.0
    • Fix Version/s: 1.9.0
    • Component/s: Core
    • Labels:
      None

      Description

      as per Oscar's report on the mailing list, see http://markmail.org/message/ilow6jkg5iuxbzis

      Looking at the code, it does seem that we are leaking memory by not holding the ProxyFactory class [1] (we create a new instance each time).

      The Javadoc [2] does suggest that these should be cached (it is the deafult).

      One subtlety: the ProxyFactory is per class being enhanced. So we actually need to hold a cache of these. But at least then we will only get one extra enhanced class in the permgen per type, rather than per instance (as at the moment).

      ~~~
      While we are here, we should probably delete the cglib support, and do some inlining of redundant interfaces.

      [1] https://github.com/apache/isis/blob/dec670567ce96fa96fe89c8111c6dbca35b3ed3b/core/wrapper/src/main/java/org/apache/isis/core/wrapper/proxy/ProxyInstantiatorForJavassist.java#L62
      [2] http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/html/javassist/util/proxy/ProxyFactory.html

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              danhaywood Dan Haywood
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: