-
Bug
-
Resolution: Done
-
Major
-
1.0.0.CR1
-
None
Weld should support the addition of custom decorators.
The mechanics of adding them is:
- an Extension will register a Decorator implementation (say MyDecoratorBean) via AfterBeanDiscovery.addBean()
- MyDecoratorBean.getBeanClass() will indicate what is the decorator class (to enable/disable via beans.xml)
- getDecoratedTypes(), getDelegateType() and getDelegateQualifiers() will tell what beans can be decorated, as well as what delegate will be injected into the bean
- it is the responsibility of the custom decorator (via create()) to inject all references correctly, including the delegate. To that extent, the container must handle BeanManager.getInjectableReference() correctly
Note: at least for the initial implementation. we can make an assumption that create() for a Decorator bean is invoked only during the creation of a decorator chain.
- is blocked by
-
WELD-253 BeanManager.getInjectableReferences() must handle delegates
- Closed
- is duplicated by
-
WELD-35 support afterBeanValidation.addBean(decorator);
- Closed
- relates to
-
CDITCK-107 Registration of a custom implementation of the Decorator interface fails
- Closed