如何在EJB 3中调用来自不同jar的CDI注入

时间:2015-03-11 08:11:51

标签: java java-ee glassfish cdi ejb-3.1

如何从EJB3容器(jar1)中调用来自不同jar(jar2)的CDI注入?

当我尝试在Glassfish 4.1上部署应用程序时,我收到以下错误消息:

Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type **** with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject private ****
  at ....

当我将EJB(jar1)放入CDI pojo(jar1)并尝试在EJB中调用它时,它将起作用。当我尝试在非EJB容器(jar3)中从(jar2)调用CDI pojo时也是如此

0 个答案:

没有答案