[JBoss JIRA] (CDI-710) Require default event ExecutorService to be managed on Java EE

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JBoss JIRA] (CDI-710) Require default event ExecutorService to be managed on Java EE

JIRA issues@jboss.org

    [ https://issues.jboss.org/browse/CDI-710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448342#comment-13448342 ]

Matej Novotny commented on CDI-710:
-----------------------------------

ATM the only async operation in CDI are async events. It seems like a bit of an overkill to enforce this requirement.
Besides, what would be the gain? As it stands, you can [define your own executor|https://github.com/cdi-spec/cdi/blob/master/api/src/main/java/javax/enterprise/event/NotificationOptions.java#L48] for async event notification so you can even use the one from Concurrency utilities.

I might be missing some pieces, but I see no harm in leaving this up to integrator/impl. This way, a CDI implementation can (for instance) provide an SPI through which an integrator will supply the default executor services. So the integrator has the power to choose if Conc. utils suffice, or if they prefer something else.

> Require default event ExecutorService to be managed on Java EE
> --------------------------------------------------------------
>
>                 Key: CDI-710
>                 URL: https://issues.jboss.org/browse/CDI-710
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Events
>            Reporter: Guillermo González de Agüero
>
> When running on a Java EE environment, CDI should use a managed executor service by default for asynchronous operations.
> This is already required by the JAX-RS 2.1 spec (http://download.oracle.com/otndocs/jcp/jaxrs-2_1-pfd-spec/index.html), section 5.8:
> {quote}In an environment that supports the Concurrency Utilities for Java EE [13], such as the Java EE Full Profile, implementations MUST use ManagedExecutorService and ManagedScheduledExecutorService, respectively. The reader is referred to the Javadoc of ClientBuilder for more information about executor services.{quote}
> Containers will presumably offer monitoring features and thread pool configuration options for managed executor services.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)

_______________________________________________
cdi-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/cdi-dev

Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.