Using CDI in a websphere shared library

醉酒当歌 提交于 2019-12-08 02:09:56

问题


We use a shared library defined in the websphere admin console to share classes between several applications. I was wondering if it is possible to use CDI (Context and Dependecy Injection) in these classes? If so do I just need to put the beans.xml in the jar that is in the shared library, or are there further steps?

Note: I can't move away from using a shared library, as this would be too much refactoring work.


回答1:


No, classes included in a shared library are not considered as CDI beans. Only archives included in the application itself can be considered for CDI.



来源:https://stackoverflow.com/questions/15199929/using-cdi-in-a-websphere-shared-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!