开发者

How to cascade dependency resolution w/ CDI (WELD)

开发者 https://www.devze.com 2023-01-03 23:38 出处:网络
I would like to have a central weld container that holds all my services and so on. This container would however be wrapped by a second con开发者_C百科tainer which contains local settings. The goal is

I would like to have a central weld container that holds all my services and so on. This container would however be wrapped by a second con开发者_C百科tainer which contains local settings. The goal is if a dependency cannot be found in the outer container then I would like to then search the inner container.

How can I achieve this? I would prefer to do things in a standlike manner, without reverting to use of non standard WELD extensions.


I don't think you can do this. There is one BeanManager, which resolves dependencies by looking if any if its Contexts (related to scopes) contains the desired dependency.

0

精彩评论

暂无评论...
验证码 换一张
取 消