[cdi-dev] Exploring the interest of mutating bean manager at runtime
arjan.tijms at gmail.com
Thu Aug 27 14:55:15 EDT 2015
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 going
> 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?
More information about the cdi-dev