You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mark Struberg (JIRA)" <de...@myfaces.apache.org> on 2011/02/19 16:06:38 UTC

[jira] Created: (EXTCDI-140) explicitely annotate @Dependent scoped beans and make them non-final

explicitely annotate @Dependent scoped beans and make them non-final
--------------------------------------------------------------------

                 Key: EXTCDI-140
                 URL: https://issues.apache.org/jira/browse/EXTCDI-140
             Project: MyFaces CODI
          Issue Type: Bug
            Reporter: Mark Struberg
            Assignee: Mark Struberg


Currently we have lots of Producers which are not annotated with any scope. That means they will be treated as @Dependent scoped beans by default.
I suggest to explicitly annotate them either @Dependent or @ApplicationScoped (if no state information is being used) because the automatic pickup as @Dependent has side effects which not all people are aware off.

I also suggest to _not_ declare any bean as _final_ because this prohibits the CDI container to create a proxy for such classes. This currently doesn't happen with @Dependent scoped beans, but this might get changed in future spec versions (auto serialisation support). It also makes it impossible to @Specializes such producers.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (EXTCDI-140) explicitely annotate @Dependent scoped beans and make them non-final

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/EXTCDI-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved EXTCDI-140.
----------------------------------

    Resolution: Fixed

> explicitely annotate @Dependent scoped beans and make them non-final
> --------------------------------------------------------------------
>
>                 Key: EXTCDI-140
>                 URL: https://issues.apache.org/jira/browse/EXTCDI-140
>             Project: MyFaces CODI
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.9.2
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 0.9.3
>
>
> Currently we have lots of Producers which are not annotated with any scope. That means they will be treated as @Dependent scoped beans by default.
> I suggest to explicitly annotate them either @Dependent or @ApplicationScoped (if no state information is being used) because the automatic pickup as @Dependent has side effects which not all people are aware off.
> I also suggest to _not_ declare any bean as _final_ because this prohibits the CDI container to create a proxy for such classes. This currently doesn't happen with @Dependent scoped beans, but this might get changed in future spec versions (auto serialisation support). It also makes it impossible to @Specializes such producers.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira