[JBoss JIRA] (CDI-541) Ordering of async observers (vs sync observers) is not specified
by Tomas Remes (JIRA)
[ https://issues.jboss.org/browse/CDI-541?page=com.atlassian.jira.plugin.sy... ]
Tomas Remes updated CDI-541:
----------------------------
Fix Version/s: 2.0 .Final
(was: TBD)
> Ordering of async observers (vs sync observers) is not specified
> ----------------------------------------------------------------
>
> Key: CDI-541
> URL: https://issues.jboss.org/browse/CDI-541
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Events
> Affects Versions: 2.0-EDR1
> Reporter: Tomas Remes
> Fix For: 2.0 .Final
>
>
> I think this needs to be specified. E.g. what happens if I fire async event and have more matching sync and async observers? Are all sync observes called first in given order with no regard to async observers priority?
> For example:
> {{event.fireAsync(new Message());}}
> {code}
> public class First {
>
> void observeMessage(@Observes @Priority(2000) Message message){}
> }
> {code}
> {code}
> public class Second {
>
> void observeMessage(@ObservesAsync @Priority(2100) Message message){}
> }
> {code}
> {code}
> public class Third {
>
> void observeMessage(@Observes @Priority(2200) Message message){}
> }
> {code}
> {code}
> public class Fourth {
>
> void observeMessage(@ObservesAsync @Priority(2300) Message message){}
> }
> {code}
> What will be the order in this case? First, Third, Second, Fourth?
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
Clarify AnnotatedTypeConfigurator.remove(Annotation annotation)
by Martin Kouba
Hi all,
while working on https://issues.jboss.org/browse/CDI-646 I figured out
that all "AnnotatedX.remove(Annotation annotation)" methods declare the
following javadoc:
"Remove annotations with (a) the same type and (b) the same annotation
member value for each member which is not annotated {@link Nonbinding}.
The container calls the {@link Object#equals(Object)} method of the
annotation member value to compare values."
I don't think this is correct. @Nonbinding is only used for interceptors
bindings and qualifiers whereas the purpose of AnnotatedType SPI is more
general.
I believe those remove() methods should simply use
java.lang.annotation.Annotation.equals(Object) to identify annotations
to remove.
What do you think?
Thanks,
Martin
8 years, 1 month
[JBoss JIRA] (CDI-609) Clarify behaviour of ObserverMethodConfigurator<T> read
by Tomas Remes (JIRA)
[ https://issues.jboss.org/browse/CDI-609?page=com.atlassian.jira.plugin.sy... ]
Tomas Remes updated CDI-609:
----------------------------
Comment: was deleted
(was: I think this could marked as resolved once https://github.com/cdi-spec/cdi/pull/340 is merged.)
> Clarify behaviour of ObserverMethodConfigurator<T> read
> -------------------------------------------------------
>
> Key: CDI-609
> URL: https://issues.jboss.org/browse/CDI-609
> Project: CDI Specification Issues
> Issue Type: Clarification
> Affects Versions: 2.0-EDR2
> Reporter: Tomas Remes
>
> It's not clear what should happen in case if you are using ObserverMethodConfigurator and attempting to read from a method ({{Method}}, {{AnnotatedMethod}}) which doesn't have any parameter annotated @Observes. E.g something like this in ABD lifecycle event ("observesMelon" doesn't have any @Observes):
> {code}
> Method melonMethod = FruitObserver.class.getMethod("observesMelon", Melon.class);
> abd.addObserverMethod().read(melonMethod)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (CDI-655) Allow CDIProvider to specify the priority
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/CDI-655?page=com.atlassian.jira.plugin.sy... ]
Martin Kouba updated CDI-655:
-----------------------------
Description: Right now, the CDI class takes the first provider whose {{javax.enterprise.inject.spi.CDIProvider.getCDI()}} does not return null. It might be useful to allow the CDIProvider authors to specify a priority (either by @Priority or by Prioritized) and sort the discovered providers so that those with higher priority are taken first. (was: Right now, the CDI class takes the first provider whose {{javax.enterprise.inject.spi.CDIProvider.getCDI()}} does not return null. It might be useful to allow the CDIProvider authors to specify a priority (either by @Priority or by Prioritized) and sort the implementations so that providers with higher priority are taken first.)
> Allow CDIProvider to specify the priority
> ------------------------------------------
>
> Key: CDI-655
> URL: https://issues.jboss.org/browse/CDI-655
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Martin Kouba
>
> Right now, the CDI class takes the first provider whose {{javax.enterprise.inject.spi.CDIProvider.getCDI()}} does not return null. It might be useful to allow the CDIProvider authors to specify a priority (either by @Priority or by Prioritized) and sort the discovered providers so that those with higher priority are taken first.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (CDI-655) Allow CDIProvider to specify the priority
by Martin Kouba (JIRA)
Martin Kouba created CDI-655:
--------------------------------
Summary: Allow CDIProvider to specify the priority
Key: CDI-655
URL: https://issues.jboss.org/browse/CDI-655
Project: CDI Specification Issues
Issue Type: Feature Request
Reporter: Martin Kouba
Right now, the CDI class takes the first provider whose {{javax.enterprise.inject.spi.CDIProvider.getCDI()}} does not return null. It might be useful to allow the CDIProvider authors to specify a priority (either by @Priority or by Prioritized) and sort the implementations so that providers with higher priority are taken first.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (CDI-439) ProcessBean event section - make a reference to AfterBeanDiscovery#addBean()
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/CDI-439?page=com.atlassian.jira.plugin.sy... ]
Martin Kouba commented on CDI-439:
----------------------------------
Also note that for a custom bean {{javax.enterprise.inject.spi.ProcessBean.getAnnotated()}} may only return null or an empty impl.
> ProcessBean event section - make a reference to AfterBeanDiscovery#addBean()
> ----------------------------------------------------------------------------
>
> Key: CDI-439
> URL: https://issues.jboss.org/browse/CDI-439
> Project: CDI Specification Issues
> Issue Type: Clarification
> Affects Versions: 1.2.Final
> Reporter: Martin Kouba
> Priority: Minor
> Fix For: 2.0 .Final
>
>
> Right now, "11.5.10. ProcessBean event" does not state anything about the fact that {{AfterBeanDiscovery#addBean()}} fires an event of type {{ProcessBean}} (no subtype as the info is not available for custom Bean implementation).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month