You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Moritz Bechler (JIRA)" <ji...@apache.org> on 2014/04/01 14:54:14 UTC
[jira] [Created] (DELTASPIKE-555) Do not use package-private
methods in CDI beans
Moritz Bechler created DELTASPIKE-555:
-----------------------------------------
Summary: Do not use package-private methods in CDI beans
Key: DELTASPIKE-555
URL: https://issues.apache.org/jira/browse/DELTASPIKE-555
Project: DeltaSpike
Issue Type: Wish
Affects Versions: 0.6
Reporter: Moritz Bechler
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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)