Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      we can cache the created proxy class and simply give each instance a
      new handler...

      -igor

      On Tue, Feb 26, 2008 at 10:26 AM, James Carman
      <james@carmanconsulting.com> wrote:
      > Have you tried this out using load testing? You are creating a new
      > class every time you create a model. Have you run out of permgen
      > space?

        Activity

        Hide
        James Carman added a comment -

        Commons Proxy does this automatically. So, if we change it to use Proxy, then you get this for free.

        Show
        James Carman added a comment - Commons Proxy does this automatically. So, if we change it to use Proxy, then you get this for free.
        Hide
        Martin Grigorov added a comment -

        What exactly should be improved here ?
        JDK proxy classes are already cached - java.lang.reflect.Proxy#newProxyInstance() calls java.lang.reflect.Proxy#getProxyClass() which supports caching.

        I'm not sure what is the state in CGLIB.

        Show
        Martin Grigorov added a comment - What exactly should be improved here ? JDK proxy classes are already cached - java.lang.reflect.Proxy#newProxyInstance() calls java.lang.reflect.Proxy#getProxyClass() which supports caching. I'm not sure what is the state in CGLIB.
        Hide
        Martin Grigorov added a comment -

        JDK Proxy classes are cached by default.
        CGLIB also caches the classes by default (we do not use Enhancer#setUseCache(false) in LazyInitProxyFactory).

        Please comment if I understood wrongly the task and I'll reopen it again.

        Show
        Martin Grigorov added a comment - JDK Proxy classes are cached by default. CGLIB also caches the classes by default (we do not use Enhancer#setUseCache(false) in LazyInitProxyFactory). Please comment if I understood wrongly the task and I'll reopen it again.

          People

          • Assignee:
            Unassigned
            Reporter:
            Igor Vaynberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development