[cdi-dev] API for dispatching of async events

arjan tijms arjan.tijms at gmail.com
Sun Mar 15 13:46:37 EDT 2015


On Sun, Mar 15, 2015 at 11:21 AM, Martin Fryč <martin at fryc.eu> wrote:

> If async events will be processed in similar way as async EJB methods -
> usually implemented in app servers as one shared thread pool with limited
> application control (discard policy, ...), both of these events will share
> one thread pool and some type of events could fully blocked it and "stop"
> application.

Indeed, especially if it will be possible to wait for all async events to
have completed, the risk for deadlock is very real.

This was explained in some more detail here:

Kind regards,
Arjan Tijms

> If threre will be some policy API like:
> java.util.concurrent.ExecutorService dispatch(T event, Annotation...
> qualifiers)
> it will allow application to decide which thread pool should be used for
> which type of event.
> In EE environment, it must be ManagedExecutorService looked it up from
> JNDI, in SE environment it could be ExecutorService created for
> applications needs.
> Martin
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150315/b2c1d0ae/attachment.html 

More information about the cdi-dev mailing list