2 Replies Latest reply on Jul 21, 2010 7:43 AM by Pete Muir

    Overview of howto register beans with Weld CDI

    Miroslav Pokorny Newbie

      I would like to use Weld to register fully formed beans programmatically where I create etc the beans in question and just add them. At a later stage I wish to pass classes with @inject, qualifiers etc to the container so an instance can be created. Note that each of these requests would result in a new instance being created and injected accordingly by weld. It mAy be necessary to replace instances in the pool which provides the source for dependency resolution. I'm leArning cdi so my comments most probably are wrong but cdi /weld seem focused on calculating and caching beans once at startup so my q about a dynamic container may be illadvised.


      However back to the original idea, can someone give me some pointers or an overview of how ( what classes ) I need to play with to achieve my goals ? Is it possible or sensible to try given cdi is mostly not modifiable once started ? I am hoping i dont need to recreate each time I need to replace a bean and so on...


      Tya...