tags:

views:

396

answers:

2

Is it possible to get a list of all class loaders in a JVM or at least all class loaders associated with web apps in a JEE Server (Weblogic in my case).

+3  A: 

There are good overviews on the class loader hierarchy at:

http://e-docs.bea.com/wls/docs81/programming/classloading.html
http://weblogic.sys-con.com/node/42876

You can use

ClassLoader.getParent()

to walk through you current application's applications resolution tree, but you really can't look through the children app's class loaders.

stevedbrown
A: 

Have you tried JConsole? (not for production systems)

jonhwilliams
How does JConsole gives you the list of classloaders ?
Ravi Gupta
By checking 'verbose output' on 'classes' tab of JConsole classloading output (list of classes loaded in client JVM) will be displayed on client JVM's stderr output.
jonhwilliams