-
1. Re: Relying on ClassLoader.getResource results in unexpected
flavia.rainone May 15, 2008 10:03 AM (in response to flavia.rainone)I haven't found any Javassist documentation in this regard.
This issue is mentioned, however, in an apache mail list:
http://mail-archives.apache.org/mod_mbox/hivemind-user/200501.mbox/%3CBAY19-DAV18C274CB134A3F6CF85A30D5870@phx.gbl%3EThe given class loader must have both getResourceAsStream() and
getResource(). -
2. Re: Relying on ClassLoader.getResource results in unexpected
dmlloyd May 15, 2008 10:40 AM (in response to flavia.rainone)I don't know of any other way to either verify the existence (well, potential loadability) of a class without loading it, or getting the actual class bytes, than using the getResource methods. I know that we (in the Remoting project) also use the getResource methods to get the class bytes to transmit when using remote classloading. I think it's reasonable to require the user to implement at least getResource(URL) in their custom classloader.
-
3. Re: Relying on ClassLoader.getResource results in unexpected
flavia.rainone May 15, 2008 11:32 AM (in response to flavia.rainone)David,
I agree with you. But, in this case, I think I'll add an observation to the JBoss AOP docs, to avoid this type of confusion. There is no way the final user could guess that s/he has to overwite those methods without knowing the innerworkings of bytecode instrumentation (unless I'm missing something here). -
4. Re: Relying on ClassLoader.getResource results in unexpected
flavia.rainone May 15, 2008 1:49 PM (in response to flavia.rainone)I have created a jira issue for setting this requirement in the documentation:
http://jira.jboss.com/jira/browse/JBAOP-574