[GLASSFISH-19406] BeanDeploymentArchiveImpl using wrong class loader to resolve beans.xml Created: 05/Dec/12  Updated: 07/Dec/12  Resolved: 05/Dec/12

Status: Resolved
Project: glassfish
Component/s: cdi
Affects Version/s: 4.0_b65
Fix Version/s: None

Type: Bug Priority: Major
Reporter: jjsnyder83 Assignee: jjsnyder83
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Comment by jjsnyder83 [ 05/Dec/12 ]

Committed revision 57299

Comment by jjsnyder83 [ 07/Dec/12 ]

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.

Generated at Sat Oct 22 16:09:46 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.