[jbosstools-issues] [JBoss JIRA] Resolved: (JBIDE-6146) Wrong default scope for CDI bean.
Max Rydahl Andersen (JIRA)
jira-events at lists.jboss.org
Mon Jun 14 07:24:02 EDT 2010
[ https://jira.jboss.org/browse/JBIDE-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Rydahl Andersen resolved JBIDE-6146.
----------------------------------------
Resolution: Done
> Wrong default scope for CDI bean.
> ---------------------------------
>
> Key: JBIDE-6146
> URL: https://jira.jboss.org/browse/JBIDE-6146
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: cdi (jsr-299)
> Affects Versions: 3.2.x
> Reporter: Alexey Kazakov
> Assignee: Viacheslav Kabanovich
> Fix For: 3.2.0.M1
>
>
> Following bean must have javax.enterprise.context.Dependent default scope:
> package org.jboss.jsr299.tck.tests.definition.scope;
> class Order{}
> org.jboss.tools.cdi.core.test.tck.ScopeDefinitionTest.testDefaultScope() must pass.
> See JSR-299 Spec:
> 2.4.4. Default scope
> When no scope is explicitly declared by annotating the bean class or producer method or field the scope of a bean is defaulted.
> The default scope for a bean which does not explicitly declare a scope depends upon its declared stereotypes:
> • If the bean does not declare any stereotype with a declared default scope, the default scope for the bean is @Dependent.
> • If all stereotypes declared by the bean that have some declared default scope have the same default scope, then that
> scope is the default scope for the bean.
> • If there are two different stereotypes declared by the bean that declare different default scopes, then there is no default
> scope and the bean must explicitly declare a scope. If it does not explicitly declare a scope, the container automatically
> detects the problem and treats it as a definition error.
> If a bean explicitly declares a scope, any default scopes declared by stereotypes are ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list