Thanks Kevin ... I think it's safe to assume that Beta 4 still has this
issue :-(.
But, other than efficiency concerns, it should still work if the
particular class is *only* found in WEB-INF/classes and *not* in any of
the WEB-INF/lib/*.jar files, right?
NOTE: automatic reloading is currently supported only for unpacked
classes in WEB-INF/lib.
Craig
On Fri, 11 May 2001, Kevin Jones wrote:
> Sorry it's taken me a week to get back to you on this. Class-reloading is
> not working in the latest nightly build. I know why, but don't know what the
> fix is.
>
> The problem is in StandardClassLoader::loadClass. This method checks that
> the class exists, if it does it wants to add it to the classCache HashMap.
> To do this loadCLass has a loop that loops around all the 'repositories'
> These repositories are the .jar files in the web-inf lib directory. In the
> loop it does this
>
> classCache.put(name, new ClassCacheEntry
> (clazz, classUrl,
> classUrlConnection.getLastModified()));
>
> but the loop never breaks, so if you have 4 jars in your lib directory code
> loops 5 times (once for the classes sub dir and once for each jar) and the
> 'last' jar in wins. So the classes in my classes directory get added as
>
> "jar:jndi:/localhost/AddressBook/WEB-INF/lib/xerces.jar!/com/develop/ewebjav
> a/lab/Browse.class"
>
> The code should check which 'repository' the class is in and only add that
> entry to the directory. Of course removing all the jars or putting a break
> after the first loop (a brutal but effective solution in my case) fixes the
> problem.
>
> Hope this helps,
>
> Kevin Jones
> DevelopMentor
> www.develop.com
>
>