[cdi-dev] [JBoss JIRA] (CDI-507) CDI support for Singleton Pseudo Scope

Martin Kouba (JIRA) issues at jboss.org
Wed Feb 17 07:54:00 EST 2016

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

Martin Kouba commented on CDI-507:

Well, the CDI spec does not mention the {{javax.inject.Singleton}} scope in the relevant section "1.2.4. Relationship to Dependency Injection for Java":
The Dependency Injection for Java specification defines a set of annotations for the declaring injected fields, methods and constructors of a bean. The dependency injection service makes use of these annotations.
On the other hand, all CDI implementations should pass JSR 330 TCK (see also [CDI TCK reference guide|https://docs.jboss.org/cdi/tck/reference/latest/en-US/html/introduction.html#d0e427]) and so it is defacto supported.

> CDI support for Singleton Pseudo Scope
> --------------------------------------
>                 Key: CDI-507
>                 URL: https://issues.jboss.org/browse/CDI-507
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>         Environment: --NA-- (documentation)
>            Reporter: Abhishek Gupta
> Section 2.4.1 states 5 built-in scope types including the pseudo scope @Dependent.
> As per the Weld documentation, CDI also supports an additional pseudo scope - @javax.inject.Singleton (see here --> http://red.ht/1D3qu97)
> Just wanted to confirm whether the CDI Specification document is missing this information or the content in the Weld documentation is incorrect?

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list