tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: How to hot swap classes?
Date Tue, 19 May 2009 18:52:26 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 5/19/2009 12:37 PM, Caldarale, Charles R wrote:
>> From: Dola Woolfe [mailto:dolachin@yahoo.com] Subject: How to hot
>> swap classes?
>> 
>> When developing a web application I change my classes all the time
>> and therefore need to restart tomcat every time.
> 
> No, you only need to restart the webapp; there's no need to restart
> Tomcat.
> 
>> Could it hot swap the new class in?
> 
> No, but it's something that some of us have talked about.
> 
>> (It does somehow hot swap recompiled .jsp's doesn't it?)
> 
> There's a separate classloader for each JSP, but just one classloader
> for the rest of the webapp.

Did you mean "a separate ClassLoader for all the JSPs"?

I ran jmap -histo while loading several JSP files that had never been
loaded (I know, because I copied them into the webapp's deployment
directory just for this test) and no additional ClassLoaders were allocated:

jmap -histo 1430 | grep ClassLoader
 125:            22           1232  sun.reflect.DelegatingClassLoader
 314:             1            160
org.apache.catalina.loader.WebappClassLoade
 340:             4            128  java.lang.ClassLoader$NativeLibrary
 437:             1             72  sun.misc.Launcher$ExtClassLoader
 443:             1             72
org.apache.catalina.loader.StandardClassLoader
 447:             1             72  sun.misc.Launcher$AppClassLoader
 495:             1             56  java.util.ResourceBundle$RBClassLoader
 522:             3             48
com.sun.jmx.mbeanserver.ClassLoaderRepositorySupport$LoaderEntry
 564:             2             40
[Lcom.sun.jmx.mbeanserver.ClassLoaderRepositorySupport$LoaderEntry;
 650:             1             24
com.sun.jmx.mbeanserver.ClassLoaderRepositorySupport
 723:             1             16
com.sun.jmx.mbeanserver.SecureClassLoaderRepository
 805:             1              8  java.net.URLClassLoader$7

None of those numbers increased as I loaded more JSPs.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoS/+oACgkQ9CaO5/Lv0PBR9gCgg/uLYLCgYaHc53DxQMwQ62zE
FGAAoK7kSZMzQuJN8RoKsXhEdvYKY0ln
=V4Z4
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message