[JBoss JIRA] (CDI-320) Clarify whether ProcessAnnotatedType should be fired for annotations
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-320?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand commented on CDI-320:
------------------------------------------
Thanks [~rsmeral]. In fact the discussion wen on in the PR. The last version I proposed is :
{quote}
The container must fire an event, before it processes a type, for:
* every Java class, interface (that is not an annotation) or enum discovered
* each Java class, interface or enum that must be delivered to a ProcessAnnotatedType observer, where the event parameter
is annotated with @WithAnnotations.
{quote}
The same mention was added in 12.4. Check the PR to see it in situ : https://github.com/cdi-spec/cdi/pull/219.
Thanks for pointing the Javadoc as well. I'll port our modification (and enum addition) as soon as we'll have a final version in the spec.
> Clarify whether ProcessAnnotatedType should be fired for annotations
> --------------------------------------------------------------------
>
> Key: CDI-320
> URL: https://issues.jboss.org/browse/CDI-320
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Portable Extensions
> Reporter: Ron Šmeral
> Assignee: Antoine Sabot-Durand
> Labels: CDI_spec_chge, Ready_to_fix
> Fix For: 1.2 Proposed
>
>
> It should be stated clearly whether {{ProcessAnnotatedType}} should be fired for annotations.
> Currently, *11.5.6 ProcessAnnotatedType event* says:
> {quote}
> The container must fire an event, before it processes a type, for each:
> * Java class, interface or enum in a bean archive,
> {quote}
> The word "annotation" has been introduced into the above line and later reverted.
> {quote}
> * Annotated type added by {{BeforeBeanDiscovery.addAnnotatedType()}},
> {quote}
> The wording used here, however, doesn't exclude the option of the annotated type being an Annotation.
--
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
10 years, 9 months
[JBoss JIRA] (CDI-320) Clarify whether ProcessAnnotatedType should be fired for annotations
by Ron Šmeral (JIRA)
[ https://issues.jboss.org/browse/CDI-320?page=com.atlassian.jira.plugin.sy... ]
Ron Šmeral commented on CDI-320:
--------------------------------
The quoted text is from pre-1.1 spec snapshot, so it's indeed outdated.
However, the current wording is getting quite confusing again, IMHO, and several points should be made clear:
* the third point, which deals with {{@WithAnnotations}} doesn't seem to belong to the paragraph, as the paragraph talks about what the container must fire, not about what the observers must handle. The point seems redundant because the set of _every Java class, interface or enum discovered_ fully includes the set of _annotated_ Java classes, interfaces or enums discovered.
* the second point says _"every AnnotatedType representing a Java class, interface or enum"_, but the javadoc for {{AnnotatedType}} says that it _Represents a Java class or interface._ (no {{enum}}). Maybe this should be made consistent, either by modifying the javadoc or the spec.
That said, I hope my understanding of the purpose and implementation of {{@WithAnnotations}} is correct.
Several minor issues:
* there's a typo in the proposed new point: _AferTypeDiscovery_ instead of _AfterTypeDiscovery_.
* also, the quantifiers "every" and "each" should be unified to just one of those. I suppose there's no difference in meaning;
* maybe also add commas (or semicolons?) at ends of lines/points.
> Clarify whether ProcessAnnotatedType should be fired for annotations
> --------------------------------------------------------------------
>
> Key: CDI-320
> URL: https://issues.jboss.org/browse/CDI-320
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Portable Extensions
> Reporter: Ron Šmeral
> Assignee: Antoine Sabot-Durand
> Labels: CDI_spec_chge, Ready_to_fix
> Fix For: 1.2 Proposed
>
>
> It should be stated clearly whether {{ProcessAnnotatedType}} should be fired for annotations.
> Currently, *11.5.6 ProcessAnnotatedType event* says:
> {quote}
> The container must fire an event, before it processes a type, for each:
> * Java class, interface or enum in a bean archive,
> {quote}
> The word "annotation" has been introduced into the above line and later reverted.
> {quote}
> * Annotated type added by {{BeforeBeanDiscovery.addAnnotatedType()}},
> {quote}
> The wording used here, however, doesn't exclude the option of the annotated type being an Annotation.
--
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
10 years, 9 months
Back on bean defining annotations
by Antoine Sabot-Durand
Hi all,
Im’ back with the main subject of this MR.
To resolve CDI-377 we decided to exclude from the « Bean defining annotations » set, all Pseudo Scope type (scope annotation having the meta annotation @Scope) except @Dependent.
So all normal scope annotation (built-in and user defined) are Bean Defining Annotation.
Now what about a normal scope added with :
1) BeforeBeanDiscovery.addScope(MyFirstScope.class,true,<true | false>) ?
And a pseudo scope added with :
2) BeforeBeanDiscovery.addScope(MySecondScope.class,false,<true | false>) ?
For me MyFirstScope (defined in 1) should be a bean defining annotation while MySecondScope shouldn’t.
Any thought ?
Antoine
10 years, 9 months
[JBoss JIRA] (CDI-428) Qualifying behavior for events and Observes is very different than qualifying beans and Injection Point
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-428?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand updated CDI-428:
-------------------------------------
Labels: CDI_spec_chge Ready_to_fix (was: CDI_spec_chge)
> Qualifying behavior for events and Observes is very different than qualifying beans and Injection Point
> -------------------------------------------------------------------------------------------------------
>
> Key: CDI-428
> URL: https://issues.jboss.org/browse/CDI-428
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Events
> Affects Versions: 1.1.Final
> Reporter: Antoine Sabot-Durand
> Labels: CDI_spec_chge, Ready_to_fix
> Fix For: 1.2 Proposed
>
>
> It should be more explicit that these behaves differently. The beginning of this possibility of confusion started with CDI-7. During CDI-422 resolution there was discussion about misunderstanding of these behavior.
> Everybody agree with the current way it's working but the specification obviously of precision about these differences.
--
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
10 years, 9 months
[JBoss JIRA] (CDI-428) Qualifying behavior for events and Observes is very different than qualifying beans and Injection Point
by Antoine Sabot-Durand (JIRA)
Antoine Sabot-Durand created CDI-428:
----------------------------------------
Summary: Qualifying behavior for events and Observes is very different than qualifying beans and Injection Point
Key: CDI-428
URL: https://issues.jboss.org/browse/CDI-428
Project: CDI Specification Issues
Issue Type: Clarification
Components: Events
Affects Versions: 1.1.Final
Reporter: Antoine Sabot-Durand
Fix For: 1.2 Proposed
It should be more explicit that these behaves differently. The beginning of this possibility of confusion started with CDI-7. During CDI-422 resolution there was discussion about misunderstanding of these behavior.
Everybody agree with the current way it's working but the specification obviously of precision about these differences.
--
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
10 years, 9 months
[JBoss JIRA] (CDI-320) Clarify whether ProcessAnnotatedType should be fired for annotations
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-320?page=com.atlassian.jira.plugin.sy... ]
Work on CDI-320 started by Antoine Sabot-Durand.
> Clarify whether ProcessAnnotatedType should be fired for annotations
> --------------------------------------------------------------------
>
> Key: CDI-320
> URL: https://issues.jboss.org/browse/CDI-320
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Portable Extensions
> Reporter: Ron Šmeral
> Assignee: Antoine Sabot-Durand
> Labels: CDI_spec_chge, Ready_to_fix
> Fix For: 1.2 Proposed
>
>
> It should be stated clearly whether {{ProcessAnnotatedType}} should be fired for annotations.
> Currently, *11.5.6 ProcessAnnotatedType event* says:
> {quote}
> The container must fire an event, before it processes a type, for each:
> * Java class, interface or enum in a bean archive,
> {quote}
> The word "annotation" has been introduced into the above line and later reverted.
> {quote}
> * Annotated type added by {{BeforeBeanDiscovery.addAnnotatedType()}},
> {quote}
> The wording used here, however, doesn't exclude the option of the annotated type being an Annotation.
--
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
10 years, 9 months
[JBoss JIRA] (CDI-320) Clarify whether ProcessAnnotatedType should be fired for annotations
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-320?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand reassigned CDI-320:
----------------------------------------
Assignee: Antoine Sabot-Durand
> Clarify whether ProcessAnnotatedType should be fired for annotations
> --------------------------------------------------------------------
>
> Key: CDI-320
> URL: https://issues.jboss.org/browse/CDI-320
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Portable Extensions
> Reporter: Ron Šmeral
> Assignee: Antoine Sabot-Durand
> Labels: CDI_spec_chge, Ready_to_fix
> Fix For: 1.2 Proposed
>
>
> It should be stated clearly whether {{ProcessAnnotatedType}} should be fired for annotations.
> Currently, *11.5.6 ProcessAnnotatedType event* says:
> {quote}
> The container must fire an event, before it processes a type, for each:
> * Java class, interface or enum in a bean archive,
> {quote}
> The word "annotation" has been introduced into the above line and later reverted.
> {quote}
> * Annotated type added by {{BeforeBeanDiscovery.addAnnotatedType()}},
> {quote}
> The wording used here, however, doesn't exclude the option of the annotated type being an Annotation.
--
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
10 years, 9 months
[JBoss JIRA] (CDI-381) Additional implementations of Request Context
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-381?page=com.atlassian.jira.plugin.sy... ]
Work on CDI-381 started by Antoine Sabot-Durand.
> Additional implementations of Request Context
> ---------------------------------------------
>
> Key: CDI-381
> URL: https://issues.jboss.org/browse/CDI-381
> Project: CDI Specification Issues
> Issue Type: Clarification
> Reporter: Joseph Snyder
> Assignee: Antoine Sabot-Durand
> Priority: Minor
> Labels: CDI_api_chge, Ready_to_fix
> Fix For: 1.2 Proposed
>
>
> Suppose another spec wanted to define when @RequestScoped applied to its
> operations, how would it do that? The javadocs for @RequestScoped seem to
> be an exhaustive list, not allowing the scope to be used in other contexts.
> The javadocs need to indicate that the scope can be active at other
> times beyond what the spec describes. It can be tricky to do that in a
> way that doesn't allow people to implement the currently defined scopes
> incorrectly.
--
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
10 years, 9 months
[JBoss JIRA] (CDI-320) Clarify whether ProcessAnnotatedType should be fired for annotations
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-320?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand commented on CDI-320:
------------------------------------------
Your quote of the spec seems a bit old.
The current spec says
{quote}
The container must fire an event, before it processes a type, for:
• every Java class, interface or enum discovered
• each Java class, interface or enum that must be delivered to a ProcessAnnotatedType observer, where the event parameter
is annotated with @WithAnnotations.
{quote}
I think the use case of adding an annotation thru an {{AnnotatedType}} in {{BeforeBeanDiscovery.addAnnotatedType()}} or {{AferTypeDiscovery.addAnnotatedType()}} is very unlikely, but we could change the previous wording by
{quote}
The container must fire an event, before it processes a type, for:
• every Java class, interface or enum discovered
• *every {{AnnotatedType}} representing a Java class, interface or enum added by {{BeforeBeanDiscovery.addAnnotatedType()}} or {{AferTypeDiscovery.addAnnotatedType()}}*
• each Java class, interface or enum that must be delivered to a ProcessAnnotatedType observer, where the event parameter
is annotated with @WithAnnotations.
{quote}
Wdyt ?
> Clarify whether ProcessAnnotatedType should be fired for annotations
> --------------------------------------------------------------------
>
> Key: CDI-320
> URL: https://issues.jboss.org/browse/CDI-320
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Portable Extensions
> Reporter: Ron Šmeral
> Labels: CDI_spec_chge, Ready_to_fix
> Fix For: 1.2 Proposed
>
>
> It should be stated clearly whether {{ProcessAnnotatedType}} should be fired for annotations.
> Currently, *11.5.6 ProcessAnnotatedType event* says:
> {quote}
> The container must fire an event, before it processes a type, for each:
> * Java class, interface or enum in a bean archive,
> {quote}
> The word "annotation" has been introduced into the above line and later reverted.
> {quote}
> * Annotated type added by {{BeforeBeanDiscovery.addAnnotatedType()}},
> {quote}
> The wording used here, however, doesn't exclude the option of the annotated type being an Annotation.
--
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
10 years, 9 months