[cdi-dev] Portable decorable Bean<T> instances
arjan.tijms at gmail.com
Tue Jul 10 05:30:54 EDT 2018
When adding a manually constructed Bean<T> instance using
AfterBeanDiscovery.addBean(Bean<?>), or using the
AfterBeanDiscovery.addBean() method and the BeanConfigurator, the resulting
bean can't be decorated.
This is because seemingly CDI expects the create() method of Bean<T> to
locate the decorators itself and apply them to the instance it returns.
Using BeanManager.resolveDecorators one can obtain the Decorator<T>
instances, but am I right that there's no portable way to actually apply
those decorators to the bean instance?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cdi-dev