Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-555

Do not use package-private methods in CDI beans

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6
    • 0.7
    • None
    • None

    Description

      The usage of package private methods for CDI beans leads to the situation that proxies for this bean must be definied in the same classloader that loads the bean class.
      In certain environments (where lifetime of classloaders defining CDI beans >> lifecycle of the CDI context) causes really bad memory leaks (a longer discussion of the general problem can be found here: https://issues.apache.org/jira/browse/OWB-931). Mitigation is only possible if the proper classloader is chosen - but this breaks if there are package-private methods to be proxied.
      Therefor I would suggest to completely refrain from defining package private methods.

      So far I have only found
      org.apache.deltaspike.jsf.impl.injection.AbstractBeanStorage.add()
      to be such a method.

      Attachments

        Activity

          People

            gpetracek Gerhard Petracek
            mbechler Moritz Bechler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: