DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25528>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25528

WebappClassloader does not register with RMI codebase cache





------- Additional Comments From [EMAIL PROTECTED]  2003-12-16 08:51 -------
The getURLs() method is called too often in tomcat 4. The 
sun.rmi.server.LoaderHandler class has a piece of code like this:

        ClassLoader classloader = class1.getClassLoader();
        if(classloader == null || codebaseLoaders.containsKey(classloader))
            return codebase;
        String s1 = null;
        if(classloader instanceof Loader)
            s1 = ((Loader)classloader).getClassAnnotation();
        else
        if(classloader instanceof URLClassLoader)
            try
            {
                URL aurl[] = ((URLClassLoader)classloader).getURLs();
(...)

You see; it checks to see if the classloader is 'known', if so this method 
getClassAnnotation returns the codebase directly. If not, it calls the getURLs
() method for EVERY class deserialization! That is because the codeBaseLoaders 
cache does not contain the WebappClassLoader for Tomcat 4.

I still think it's a bug that should be fixed in version 4; or at least made 
known to people because it has high performance impact for all use or RMI with 
tomcat 4 (see usenet for a lot of people with the same problems)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to