You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2014/05/04 09:02:19 UTC

[jira] [Closed] (DELTASPIKE-555) Do not use package-private methods in CDI beans

     [ https://issues.apache.org/jira/browse/DELTASPIKE-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek closed DELTASPIKE-555.
---------------------------------------


> 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
>            Assignee: Gerhard Petracek
>             Fix For: 0.7
>
>
> 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)