I see ThomasD already applied my patch to 5_0:
Modified: branches/Branch_5_0/system-jmx/src/main/org/jboss/system/deployers/ServiceDeployer.java Log: [JBAS-6425] full hirarcy search for RealClassLoader
And I doubt (I actually know he didn't :-)) he ran all the tests
or waited for Hudson to puke some error.
Ccccc Thomas ... too global change to not let it pass some testing before commit. ;-)
The hierarchy search is just a hack for lazy users.
Thomas should be passing in the RealClassLoader in the first place,
i.e. the (sub-)deployment classloader.
The one he was actually passing in is the wrapper ejb classloader which
has other side affects like it is associated with the EJB's enc when used as the context classloader.
This "fix" corrects the problem for JMX but not for other uses of that "deployment"