[jbosscache-dev] Injection Code Incompatible with AS and PCache Maven Run

Jason T. Greene jason.greene at redhat.com
Mon Jan 14 18:02:29 EST 2008


The injection design makes assumptions about the ClassLoader it is 
running in, which we can't do.

1. ClasspathScanner's constructor assumes that all ClassLoaders are 
URLClassLoader, this is not always true, and leads to CCE when it is not.

2. ClasspathScanner.getURLPathFromClassLoader expects only simple file 
based URLs (like those returned from URLClassLoader). This will not work 
with the AS5 VFS, which uses a custom URL type ("vfs").

3. ClasspathScanner.scan assumes that all URLS are on a local 
filesystem. This is also not the case. An AS can have http based 
deployments for example.

These problems not only prevent compatibility with AS5, they also cause 
problems with my maven testruns, since I have to have 
useSystemClassLoader set to true, which uses a manifest for constructing 
the classpath.

We should remove this scanning code in favor of either hardcoded 
constants, or a hardcoded registration process.

This is urgent because it prevents the CR3 release from going out.

-- 
Jason T. Greene
JBoss, a division of Red Hat



More information about the jbosscache-dev mailing list