tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Servlet reloading?
Date Sat, 12 Feb 2000 16:48:16 GMT

> I really don't understand the need to serialize and then deserialize
> everything. If your class loaded caches classes into a Hashtable, and this
> Hashtable is passed to the next instance of the ClassLoader, then the class
> is the same. The second class loader can then invalidate classes in the
> cache that are older than the existing class files. In this way, session
> data can be preserved across ClassLoaders. I've included an example
> ClassLoader that demonstrates what I mean. The output is

In your example the classes are loaded by the System loader ( super ).
You get ClassCastEx if you do load using your loader ( the "loader" is the
one that calls "defineClass"). When you call super.loadClass() you don't
set the loader.


View raw message