[cdi-dev] [JBoss JIRA] (CDI-420) add a bean-discovery-mode 'scoped'
Mark Struberg (JIRA)
issues at jboss.org
Sun Sep 25 03:51:00 EDT 2016
[ https://issues.jboss.org/browse/CDI-420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13298149#comment-13298149 ]
Mark Struberg commented on CDI-420:
2 weeks passed and no better idea. So I assume that we stick with:
In which case I would love to add this to DeltaSpike and do some advanced testing with it. I will add this to OWB and I assume Martin will also enhance Weld to support it. In which case we have already get very good feedback from real world projects.
> add a bean-discovery-mode 'scoped'
> Key: CDI-420
> URL: https://issues.jboss.org/browse/CDI-420
> Project: CDI Specification Issues
> Issue Type: Bug
> Components: Packaging and Deployment
> Affects Versions: TBD
> Reporter: Mark Struberg
> Labels: F2F2016
> Fix For: 2.0 (proposed)
> This is for some future CDI release.
> We currently only have 3 bean-discovery-modes
> * none
> * all
> * annotated
> The spec also currently says that ProcessAnnotatedType will only get fired (12.4) for
> • each Java class, interface or enum deployed in an explicit bean archive, and
> • each Java class with a bean defining annotation in an implicit bean archive.
> • each session bean
> Which means that we do not get the ProcessAnnotatedType (PAT) event for any class in an 'annotated' or 'implicit' BDA which does _not_ have a bean defining annotation.
> It might be useful to fire the ProcessAnnotatedType for all classes, but do not pick them up as Beans if they (after PAT) do not have a valid scope. Effectively doing the processing but not make them @Dependent automatically if there is no scope annotation at the end of the PAT processing.
> I'm not yet 100% sure how important this distinction is in practice. Just writing this up to not forget about the idea...
This message was sent by Atlassian JIRA
More information about the cdi-dev