[cdi-dev] Exploring the interest of mutating bean manager at runtime
antoine at sabot-durand.net
Thu Aug 27 15:19:03 EDT 2015
Yes, I guess it's the same limitation raised by JAX-RS regarding CDI
integration: when they are up, it's too late. Now perhaps this use case
could be addressed by adding a way to wait for servlet initialization
before triggering AfterDeploymentValidation event.
Le jeu. 27 août 2015 à 20:55, arjan tijms <arjan.tijms at gmail.com> a écrit :
> On Thu, Aug 27, 2015 at 5:56 PM, Antoine Sabot-Durand
> <antoine at sabot-durand.net> wrote:
> > This topic (modifying bean meta data at runtime) has been coming and
> > since CDI 1.0.
> Does this also mean that Bean<T> instances can be registered at runtime?
> If so, there's maybe one common use, although it's a pretty restricted
> version of "runtime"; the ability to register a Bean<T> and/or do
> other things extensions typically do from a ServletContainerListener.
> The reason to do those things from a ServletContainerListener is that
> the ServletContext is available then, which in turn allows one to read
> WEB-INF/web.xml. There are a number of requests to have the
> ServletContext made available in extensions, but that's clearly very
> difficult to do.
> So if the ServletContext can't come to extensions, maybe extensions
> can be brought to the ServletContext via this way?
> Kind regards,
> Arjan Tijms
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cdi-dev