[cdi-dev] [JBoss JIRA] (CDI-577) Non-Dependent scope specified on Decorator

Tomas Remes (JIRA) issues at jboss.org
Thu Feb 11 05:07:01 EST 2016


    [ https://issues.jboss.org/browse/CDI-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161591#comment-13161591 ] 

Tomas Remes commented on CDI-577:
---------------------------------

https://github.com/cdi-spec/cdi/pull/275

> Non-Dependent scope specified on Decorator
> ------------------------------------------
>
>                 Key: CDI-577
>                 URL: https://issues.jboss.org/browse/CDI-577
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Decorators
>    Affects Versions: 1.0, 1.2.Final
>            Reporter: Emily Jiang
>            Priority: Minor
>             Fix For: 2.0 (proposed)
>
>
> In CDI specification, there lacks a clarification about what will happen if a scope other than Dependent specified on Decorators/Interceptors. 
> At the moment, if the RequestScoped is specified on a decorator, Weld throws NPE. I talked to Martin. Martin logged https://issues.jboss.org/browse/WELD-2085 to fix this. It is better for the spec to clearly define the behaviour.
> Obviously, the lifecycle of interceptors/decorators are dependent on the bean instance they decorate. The spec should specify clearly what should happen if a scope other than Dependent is specified on decorators/interceptors. How about add the following on the spec:
> If an interceptor or decorator specifies any scope other than Dependent, the container automatically detects the problem and threats as a definition error. 



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the cdi-dev mailing list