Search code examples
javajbossclassloader

How to determine what classes have been loaded from where in JBoss


I seem to remember some function in the JMX console which allows you to type in a class name, and see the classloaders which loaded it, and from which resources the class was loaded from. Unfortunately, I can't seem to find this. For standalone apps, I've always used the JWhich tool to get this information.


Solution

  • I'm using JBoss 4.2.0 GA, and in the JMX console, I found my component with a type archive==. Going into this MBean shows:

    MBean Java Class:   org.jboss.mx.loading.HeirarchicalLoaderRepository3
    

    Then I just had to invoke:

    displayClassInfo()
    

    with my fully qualified class name.