Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-254

Custom Decorator Support

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              marius.bogoevici Marius Bogoevici (Inactive)
              marius.bogoevici Marius Bogoevici (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: