[jsr342-experts] Re: Proposal for global CDI enablement
- From: Pete Muir <pmuir@...>
- To: jsr342-experts@...
- Subject: [jsr342-experts] Re: Proposal for global CDI enablement
- Date: Thu, 20 Dec 2012 10:43:11 +0000
On 20 Dec 2012, at 01:22, Bill Shannon wrote:
> Pete Muir wrote on 12/19/12 04:57:
>>> I wouldn't want the container to know the name of beans.xml, nor the
>>> of beans.xml. I hope the container asks Weld to "load the configuration
>>> information for this module" and Weld does all the detection of beans.xml,
>>> parsing, etc., and then after that is prepared to answer the container's
>>> question of "what level of scanning do I need to do for this module?"
>> Kinda, except that it's the container responsibility to load the beans.xml
>> file. There is no portable scanning api in Java/Java EE to allow us to
>> such files.
> Wouldn't the container just need to export a "getResource" method that
> Weld can use, if Class.getResource isn't good enough?
No, WEB-INF/beans.xml is not on the classpath, you must do a Jar level scan.
Anyway, we can review this architecture, it should really move to
weld-dev@... though for any discussions.
I personally like the architecture we have today, and have had no complaints
from integrators about this approach.