2 Replies Latest reply on Feb 1, 2013 10:21 AM by abhishekhp

    JBoss AS7 module classloader

    abhishekhp

      I have a WAR that I have deployed to JBoss 7 that dynamicially loads jar resources using its context class loader.

      final ClassLoader cl = Thread.currentThread().getContextClassLoader(); propertiesUrls = cl.getResources(TRANSLATION_PROPERTIES); 

      However the context classloader only looks for resources in the WEB-INF/lib folder as when I inspect the cl variable in debug mode it list the classloader below (i.e the war module)

       

      ModuleClassLoader for Module "deployment.warname.war:main" from Service Module Loader

       

      How do I get hold of a classloader for a specific module in jboss that I have the resources in. I have the jars that i need to load the resource from in a custom module in JBOSS_HOME/modules/org/custom/...

       

      ModuleClassLoader for Module "org.custom.blah:main" from Service Module Loader