This content has been marked as final.
Show 2 replies
-
1. Re: Injecting pre-CDI class
th.janssen May 24, 2011 5:47 AM (in response to bhiles)As described in http://docs.jboss.org/weld/reference/1.1.0.Final/en-US/html_single/#bean-definition the beans.xml is required in each archive which contains beans that shall be injected somewhere else.
-
2. Re: Injecting pre-CDI class
jharting May 24, 2011 8:21 AM (in response to bhiles)The spec says:
Note that this second bean exists—and may be enabled and available for injection—even if the first bean is disabled, as defined by Section 5.1.2, “Enabled and disabled beans”, or if the bean class is deployed outside of a bean archive, as defined in Section 12.1, “Bean archives”, and is therefore not discovered during the bean discovery process defined in Chapter 12, Packaging and deployment. The container discovers @New qualified beans by inspecting injection points of other enabled beans.Therefore, you can inject any bean from a no-beans-xml archive using @New.