Hi JJ,
Thanks your clarification and I see.
--Tang
JJ Snyder wrote:
> Hi Tang,
> In the integration with the new Bean Validator 1.1 we ran into a case
> where the wrong beans.xml was being loaded. It happens where there are
> more than 1 beans.xml in the classpath and using the ContextClassLoader
> was returning the first one that it found which is not necessarily the
> one in the archive that was being processed. This happened when running
> glassfish in embedded mode.
>
> The ReadableArchive does not have methods for returning URLs for the
> entries only Strings. So to make sure that we get the beans.xml from the
> archive we created the temporary class loader for the archive and then
> get the URL for the beans.xml resource.
>
> JJ
>
> On 12/05/2012 08:18 PM, Tang Yong wrote:
>> Hi JJ Snyder,
>> CC: siva,
>>
>> Today, I found that GLASSFISH-19406 has been fixed, and fixing way is to
>> use a customized URLClassLoader to load beans.xml rather than using
>> current thread's context classLoader.
>>
>> I want to ask that whether having some scenes to cause the issue or not?
>> Because on contributing OSGi/CDI, weld-integration is also as a part of
>> hybrid bundle scene, so, once any code in weld-integration has changed,
>> I want to know reason.
>>
>> Thanks
>> --Tang
>