[cdi-dev] [JBoss JIRA] (CDI-547) Resolving sync/async observer methods
Martin Kouba (JIRA)
issues at jboss.org
Thu Sep 17 09:26:00 EDT 2015
[ https://issues.jboss.org/browse/CDI-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109994#comment-13109994 ]
Martin Kouba commented on CDI-547:
----------------------------------
So we have three options:
* add overloaded {{resolveObserverMethods()}} with an extra {{boolean}} param to distinguish between {{fire()}} and {{fireAsync()}}, the original method follows {{fire()}} semantics
* add a new method, e.g. something like {{resolveObserverMethodsForFireAsync()}}
* do not add any methods, and let a consumer filter out sync/async observers as needed, i.e. sync + async observers for {{fireAsync()}} and sync for {{fire()}}
The other question is ordering. IMO this depends on the result of CDI-541. I.e. if async observers would not honor ordering the set does not have to be "ordered" at all.
> Resolving sync/async observer methods
> -------------------------------------
>
> Key: CDI-547
> URL: https://issues.jboss.org/browse/CDI-547
> Project: CDI Specification Issues
> Issue Type: Clarification
> Reporter: Jozef Hartinger
>
> There's the [BeanManager.resolveObserverMethods()|http://docs.jboss.org/cdi/api/2.0.EDR1/javax/enterprise/inject/spi/BeanManager.html#resolveObserverMethods-T-java.lang.annotation.Annotation...-] method for resolving observer methods.
> With addition of sync/async events and observers it is not unclear what the semantics of this methods are. We'll most likely need to add new or overloaded methods to make it possible to resolve observers for sync/async events.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the cdi-dev
mailing list