WebSphere Application Server has a hidden serviceability gem in JVM custom property com.ibm.ws.runtime.detectAppCLLeaks described in this technote
So what does setting this custom property do ?
This custom property enables the classloader leak detection feature in the application server.When the server is shutting down WAS determines the classloaders that have leaked and thereby held references to all their loaded classes and objects. If a classloader leak is detected a heapdump is triggered. You will also see a warning message in the SystemOut.log like so
[7/21/11 20:50:24:917 EDT] 00000017 ApplicationMg W Application class loader leak:
com.ibm.ws.classloader.CompoundClassLoader@21b79f0[war:leak_war/leak.war]
Local ClassPath:
Parent: com.ibm.ws.classloader.CompoundClassLoader@218fc48[app:leak_war]
Delegation Mode: PARENT_FIRST
com.ibm.ws.classloader.CompoundClassLoader@21b79f0[war:leak_war/leak.war]
Local ClassPath:
Parent: com.ibm.ws.classloader.CompoundClassLoader@218fc48[app:leak_war]
Delegation Mode: PARENT_FIRST
This provides an excellent way to flush out all the classloader leaks in your application. I advise setting this property in development environments. Please note that not all suspect leaks are of concern particularly the ones that belong to WebSphere Application Server system applications.
Happy Debugging!
Classloader leak reference
- http://wasdynacache.blogspot.com/2011/05/how-to-detect-java-classloader-memory.html
- http://www.zeroturnaround.com/blog/rjc301/
- http://www.zeroturnaround.com/blog/rjc201/
- http://blog.dynatrace.com/2009/08/13/java-memory-problems/
- http://stackoverflow.com/questions/670791/common-java-memory-reference-leak-patterns
- http://dennis-zane.iteye.com/blog/57512
- http://www.mhaller.de/archives/140-Memory-leaks-et-alii.html
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.