Coming roadmap for CDI 2.0
by Antoine Sabot-Durand
Hi All,
Just to remind you the coming step for CDI 2.0 specification:
- Nov 30th : feature freeze. After this date we'll only work on spec
clarification that have no impact on RI or TCK (unless an error is found in
specified new features). Name of added API may change after a full review
of new features
- Early December: release of CDI 2.0 Beta1 API
- Mid December: release of Weld 3.0.0 Beta1 and TCK beta
- Early January: start of the release process
Official release is still targeted to end of January as planned.
Antoine
7 years, 5 months
[JBoss JIRA] (CDI-650) Introduce asynchronous event notification options
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/CDI-650?page=com.atlassian.jira.plugin.sy... ]
Martin Kouba commented on CDI-650:
----------------------------------
The idea is to define "typesafe portable options" (only {{NotificationOptions.getExecutor()}} for CDI 2.0) and still allow the implementations to support non-portable/non-standardized options (by means of {{NotificationOptions.get()}}).
> Introduce asynchronous event notification options
> -------------------------------------------------
>
> Key: CDI-650
> URL: https://issues.jboss.org/browse/CDI-650
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Martin Kouba
> Assignee: Martin Kouba
> Fix For: 2.0 .Final
>
>
> Currently, it's only possible to provide a custom executor when firing an event asynchronously - see also {{javax.enterprise.event.Event.fireAsync(U, Executor)}}. It might be useful to provide other implementation-specific options, e.g. notification timeout.
> Therefore, I suggest to introduce {{NotificationOptions}} interface:
> {code:java}
> public interface NotificationOptions {
> Executor getExecutor();
> // Implementation-specific options
> Object get(String optionName);
> }
> {code}
> and change the method signature to:
> {code:java}
> <U extends T> CompletionStage<U> fireAsync(U event, NotificationOptions options);
> {code}
> In the future, if any implementation-specific configuration proves to be useful and worth standardizing, we may simply add a new method to {{NotificationOptions}}, e.g.
> {code:java}
> Duration getTimeout();
> {code}
> instead of adding more and more params to {{Event.fireAsync()}}.
> We could also introduce some convenient static methods on {{NotificationOptions}}, e.g.:
> {code:java}
> void fireEvents(Event event, Executor executor) {
> event.fireAsync(new Foo(), NotificationOptions.ofExecutor(executor));
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (CDI-650) Introduce asynchronous event notification options
by Emily Jiang (JIRA)
[ https://issues.jboss.org/browse/CDI-650?page=com.atlassian.jira.plugin.sy... ]
Emily Jiang commented on CDI-650:
---------------------------------
With the introduction of NotificationOptions, the emitter can put more info inside to instruct the container. We will have to spec for each individual properties, right? Otherwise, the application is not portable any more, as Weld might react different from OWB on treating the NotificationOptions info. I might totally misunderstand you.
> Introduce asynchronous event notification options
> -------------------------------------------------
>
> Key: CDI-650
> URL: https://issues.jboss.org/browse/CDI-650
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Martin Kouba
> Assignee: Martin Kouba
> Fix For: 2.0 .Final
>
>
> Currently, it's only possible to provide a custom executor when firing an event asynchronously - see also {{javax.enterprise.event.Event.fireAsync(U, Executor)}}. It might be useful to provide other implementation-specific options, e.g. notification timeout.
> Therefore, I suggest to introduce {{NotificationOptions}} interface:
> {code:java}
> public interface NotificationOptions {
> Executor getExecutor();
> // Implementation-specific options
> Object get(String optionName);
> }
> {code}
> and change the method signature to:
> {code:java}
> <U extends T> CompletionStage<U> fireAsync(U event, NotificationOptions options);
> {code}
> In the future, if any implementation-specific configuration proves to be useful and worth standardizing, we may simply add a new method to {{NotificationOptions}}, e.g.
> {code:java}
> Duration getTimeout();
> {code}
> instead of adding more and more params to {{Event.fireAsync()}}.
> We could also introduce some convenient static methods on {{NotificationOptions}}, e.g.:
> {code:java}
> void fireEvents(Event event, Executor executor) {
> event.fireAsync(new Foo(), NotificationOptions.ofExecutor(executor));
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (CDI-650) Introduce asynchronous event notification options
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/CDI-650?page=com.atlassian.jira.plugin.sy... ]
Martin Kouba commented on CDI-650:
----------------------------------
This info is not intended for observer methods (receiver part). This is merely a hint for the container, i.e. allows the event "emitter" to configure async events delivery. And right now, the only portable option is the {{Executor}} used for observer method execution.
A user can either use the convenient static methods ({{NotificationOptions.ofExecutor()}}, {{NotificationOptions.builder()}}) and the default impl or provide a custom impl.
> Introduce asynchronous event notification options
> -------------------------------------------------
>
> Key: CDI-650
> URL: https://issues.jboss.org/browse/CDI-650
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Martin Kouba
> Assignee: Martin Kouba
> Fix For: 2.0 .Final
>
>
> Currently, it's only possible to provide a custom executor when firing an event asynchronously - see also {{javax.enterprise.event.Event.fireAsync(U, Executor)}}. It might be useful to provide other implementation-specific options, e.g. notification timeout.
> Therefore, I suggest to introduce {{NotificationOptions}} interface:
> {code:java}
> public interface NotificationOptions {
> Executor getExecutor();
> // Implementation-specific options
> Object get(String optionName);
> }
> {code}
> and change the method signature to:
> {code:java}
> <U extends T> CompletionStage<U> fireAsync(U event, NotificationOptions options);
> {code}
> In the future, if any implementation-specific configuration proves to be useful and worth standardizing, we may simply add a new method to {{NotificationOptions}}, e.g.
> {code:java}
> Duration getTimeout();
> {code}
> instead of adding more and more params to {{Event.fireAsync()}}.
> We could also introduce some convenient static methods on {{NotificationOptions}}, e.g.:
> {code:java}
> void fireEvents(Event event, Executor executor) {
> event.fireAsync(new Foo(), NotificationOptions.ofExecutor(executor));
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (CDI-650) Introduce asynchronous event notification options
by Emily Jiang (JIRA)
[ https://issues.jboss.org/browse/CDI-650?page=com.atlassian.jira.plugin.sy... ]
Emily Jiang commented on CDI-650:
---------------------------------
On event receiving side, how an user can get hold of this NotificationOption, which is an interface? Will this be part of observation such as EventMetaData? After getting hold of it, what the receiver is supposed to do?
> Introduce asynchronous event notification options
> -------------------------------------------------
>
> Key: CDI-650
> URL: https://issues.jboss.org/browse/CDI-650
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Martin Kouba
> Assignee: Martin Kouba
> Fix For: 2.0 .Final
>
>
> Currently, it's only possible to provide a custom executor when firing an event asynchronously - see also {{javax.enterprise.event.Event.fireAsync(U, Executor)}}. It might be useful to provide other implementation-specific options, e.g. notification timeout.
> Therefore, I suggest to introduce {{NotificationOptions}} interface:
> {code:java}
> public interface NotificationOptions {
> Executor getExecutor();
> // Implementation-specific options
> Object get(String optionName);
> }
> {code}
> and change the method signature to:
> {code:java}
> <U extends T> CompletionStage<U> fireAsync(U event, NotificationOptions options);
> {code}
> In the future, if any implementation-specific configuration proves to be useful and worth standardizing, we may simply add a new method to {{NotificationOptions}}, e.g.
> {code:java}
> Duration getTimeout();
> {code}
> instead of adding more and more params to {{Event.fireAsync()}}.
> We could also introduce some convenient static methods on {{NotificationOptions}}, e.g.:
> {code:java}
> void fireEvents(Event event, Executor executor) {
> event.fireAsync(new Foo(), NotificationOptions.ofExecutor(executor));
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (CDI-651) Add convenient Instance.isResolvable()
by Martin Kouba (JIRA)
Martin Kouba created CDI-651:
--------------------------------
Summary: Add convenient Instance.isResolvable()
Key: CDI-651
URL: https://issues.jboss.org/browse/CDI-651
Project: CDI Specification Issues
Issue Type: Feature Request
Reporter: Martin Kouba
Assignee: Martin Kouba
Fix For: 2.0 .Final
Returns true if satisfied ({{Instance.isUnsatisfied() == false}}) and NOT ambiguous ({{Instance.isAmbiguous() == false}}).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months