On 21/10/2011 12:22, Bob DeRemer wrote: > Hi Mark, > > With regard to using Tomcat in production, that was meant > sarcastically - the team has done a nice job on later Tomcat 6 and > Tomcat 7 32/64-bit installations - including Windows Service support, > etc. - nice work.
That comment was more aimed at the archives than you ;) > With regard to using YourKit, I have a licensed copy, but must be > missing something - where can I look to see what is holding a > reference to the JAR? I've used it for memory analysis and CPU > profiling - primarily, but I'm not sure where to look for JAR > references. File locks can be tricky to pin down. I usually do something along the lines of: 1. Take a memory snapshot 2. Switch to the object view 3. Search for the name of the JAR 4. Trace the GC roots of a promising looking object Normally, the JAR name appears in a String for a JarFile or File object and that traces back to whatever is holding the reference. I'd be happy to take a look at the snapshot for you if you can put the snapshot somewhere where I can download it. Mark > > Thanks, Bob > > -----Original Message----- From: Mark Thomas > [mailto:ma...@apache.org] Sent: Friday, October 21, 2011 2:46 AM To: > Tomcat Users List Subject: Re: JAR locked in Tomcat after using > addUrl to dynamically add JAR to running webapp > > On 21/10/2011 03:00, Bob DeRemer wrote: >> While I can appreciate the desire to never use Windows, that isn't >> reality in many of the industries that use our product, so running >> Tomcat on windows can't be considered an oddity or edge case. If >> it is, we better look for another app server. > > If that were the case, the Tomcat devs wouldn't have put the > investment they have into the Windows installer in recent months > (auto detection of 32 or 64 bit JRE, greater control over ports, > multiple service installs of the same version, ...) > >> With regard to finding a solution, I'll try the antiJarLocking >> setting, but I don't have any problem with any other JARS, so I >> don't hold out much hope for this fixing my problem. I may look at >> upgrading to JDK 7 - which has added a "close" method to the >> URLClassLoader. Perhaps this might fix it. > > Maybe. > >> If anyone else has any other ideas why ONLY JARs added via the >> addURL "hack" I've shown below don't get unloaded when the WEBAPP >> is shutdown - vs stopping Tomcat completely, I would greatly >> appreciate it. > > You need to understand the root cause. I'd recommend getting a > profiler (I use YourKit since they give free copies to Tomcat > committers) and finding out exactly what is holding references to > those JARs. Once you know that the next questions are 1. What creates > those references and 2. How to get rid of them. > > Mark > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org