I can't get servlet re-loading to work in TC4b3. Looking at the code -

Loader creates a thread that sleeps until the time set in server.xml
expires. This thread calls StandardClassLoader.modified

The modified call checks the classCache to see if there are any entries
(code is here)

if (classCache.size() < 1)
{
    return (false);
}

Checking through the code classes are added to the cache in the loadClass
function.

Near the end of that function is this code

try
{
    File file = new File(pathname);
    if (file.exists() && file.canRead())
    {
        if (debug >= 3)
        {
            log("    Caching from '" + file.getAbsolutePath() +
                "' modified '" +
                (new java.sql.Timestamp(file.lastModified())) +
                "'");
        }
        classCache.put(name, new ClassCacheEntry(clazz, file,
file.lastModified()));
    }
} catch(AccessControlException ace)

Printing out the value of 'pathname' just before this code executes gives

"jndi:/localhost/AddressBook/WEB-INF/classes\com\develop\ewebjava\lab\Browse
.class",

which means that the 'file' doesn't exist and so doesn't get added to the
cache.

Should that 'jndi:/localhost' be there ?

This is with the latest nightly build BTW,

Kevin Jones
DevelopMentor
www.develop.com

Reply via email to