【发布时间】:2014-02-05 11:01:42
【问题描述】:
我想自动从 EJB 容器中查找 EJB 实例并将其注入到列表中。示例:
@EJBs
List<MyCommonInterface> beans;
或
List<MyCommonInterface> beans;
public MyClass() {
beans = (List<MyCommonInterface>) context.findBeansByInterface(MyCommonInterface.class);
}
这可能吗?
【问题讨论】:
标签: java jakarta-ee dependency-injection ejb jndi