tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chon-Chon Tang" <>
Subject RE: WEB-INF classloading and on the fly compilation
Date Thu, 14 Sep 2000 22:50:40 GMT
> That's a problem related to the compiler, relying on files instead on
> classes loaded by the classloaders... I know that at Olliance they're
> thinking about distributing WEB-APPs on a set of different servlet
> engines (a some sort of load balancing but with more guts :). This will
> surely add lots of hacks in class-loading mechanisms, since WEB-APPs
> WARs will be loaded from the network and so on...
> If the compiler relies on files on the disk, then, we're screwed,
> because we cannot possibly have a portable servlet using on-the-fly
> compilation...

Maybe I'm missing something, but there's absolutely no need for the
compiler to see the 'final' class that will be loaded at run-time
(possibly through any strange implementation of a classloader).
If you wish to do on-the-fly compilation (presumably to take 
advantage of execution traces?), it just needs to preserve binary
compatibility with the class that the using class was compiled

I don't see how that will be a significant problem.  Presumably the
using code is using the class through some well-defined 'interface'
(not necessarily Java interface) that will remain static, regardless
of where the underlying class implementation comes from.  If you 
must, define a stub class that defines this interface properly
and that is used during compilation.  When the class is loaded
at run-time through any mechanism you choose, it will be correctly
used as long as it preserves the various rules for binary 

View raw message