Difficult to explain my issue In ear packaging, I have : 1 ejb module ocelot.ejb.jar with beans.xml and bean-discovery-mode="all" 1 war module ocelot.web.war with beans.xml and bean-discovery-mode="all" 1 jar librairy ocelot-core.jar with beans.xml and bean-discovery-mode="all" I try to get Bean from a class cls in ocelot-core.jar (lib) using CDI.current().select(cls).get(); That work's for classes in jar library in lib of ear but if the class is in ejb module or war module, the class is unsatisfied. However if I try to do cls.newInstance(); That's work. But of course it's not a bean cdi, no injection inside. I do something wrong ?
|