tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: [OT] Deleting URLClassloader Cached Jars/Classes
Date Mon, 02 Apr 2012 22:20:05 GMT
On 02/04/2012 22:33, Konstantin Kolinko wrote:
> 2012/4/3 Christopher Schultz <chris@christopherschultz.net>:
>>
>>> Is there a way to empty this cache, or disable caching all
>>> together?
>>
>> Not without implementing your own ClassLoader. You could read the code
>> for WebappClassLoader to see how it's done in there.
>>
> 
> +1. You need your own class loader.

You would need your own *quite sophisticated* classloader.

This kind of thing is usually achieved with Java Agents that can rewrite
bytecode on the fly, like JavaRebel for example.


p

> I would say org.apache.jasper.servlet.JasperLoader.  It is classloader
> that is used to load JSP pages.  If the page is updated you just throw
> classloader instance away together with the classes that it loaded.
> 
> In recent JVMs there is also an option to reload a class in memory
> (aka hot-swap). That is used by debuggers, when you debug your program
> in an IDE and want to continue with updated (edited) version of the
> class without restarting all over.
> 
> It is not something that you would use from inside the JVM though.
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


-- 

[key:62590808]


Mime
View raw message