[cdi-dev] [JBoss JIRA] (CDI-278) Clarify scope of Stateless and Singleton EJB's
Jozef Hartinger (JIRA)
jira-events at lists.jboss.org
Thu Nov 8 10:41:18 EST 2012
[ https://issues.jboss.org/browse/CDI-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732814#comment-12732814 ]
Jozef Hartinger commented on CDI-278:
-------------------------------------
With Pete and Stuart we discussed that introducing @StatelessScoped might be the right approach for SLSB. This scope would act in two roles:
1.) It would be the scope of a SLSB - implicit for every SLSB so that a user does not have to define both @Stateless and @StatelessScoped on the same class.
2.) For other types of CDI beans @StatelessScoped would guarantee that every method invocation on the bean is executed on a new instance of a given Bean (Bean.create() is invoked for every invocation). That would allow the manager pattern (Solder's @Unwraps) to be used applications.
> Clarify scope of Stateless and Singleton EJB's
> ----------------------------------------------
>
> Key: CDI-278
> URL: https://issues.jboss.org/browse/CDI-278
> Project: CDI Specification Issues
> Issue Type: Bug
> Reporter: Stuart Douglas
> Fix For: 1.1 (Proposed)
>
>
> At the moment Stateless and Singleton beans are classified as @Dependent scope by default, which is not really very useful, as a lot of the rules for dependent scoped beans simple do not apply to them (they violate pretty much every rule for dependent scoped beans in 6.4).
> I think we need to define a new scope for these beans, or at least clarify their behaviour when they are @Dependent scoped.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list