This content has been marked as final.
Show 2 replies
-
1. Re: JBoss AS7 module classloader
pferraro Jan 31, 2013 3:55 PM (in response to abhishekhp)1 of 1 people found this helpfulSomething like this?
{code}ModuleIdentifier moduleId = ModuleIdentifier.fromString("org.custom.blah:main");
ModuleLoader moduleLoader = (ModuleLoader) org.jboss.as.server.CurrentServiceContainer.getService(org.jboss.as.server.Services.JBOSS_SERVICE_MODULE_LOADER).getValue();
ClassLoader classloader = loader.loadModule(moduleId).getClassLoader();{code}
-
2. Re: JBoss AS7 module classloader
abhishekhp Feb 1, 2013 10:21 AM (in response to abhishekhp)Nevermind I got it to work using the current classloader instead of the Thread context classloader. i.e. this.getClass().getClassLoader() instead of Thread.currentThread().getContextClassLoader().
http://www.javaworld.com/javaqa/2003-06/01-qa-0606-load.html