Reading and testing JBoss Modules it seems to me the solution to my issue.
So my idea was to do the following:
So code would look something like:
ModuleIdentifier identifier = ModuleIdentifier.fromString("my new class loader"); Builder builder = ModuleSpec.build(identifier); DependencySpec dependencySpec =
DependencySpec.createModuleDependencySpec( ModuleIdentifier.create("com.ubikingenierie.myserver")); builder.addDependency(dependencySpec);
ModuleSpec moduleSpec = builder.create();...> > What's next ??????
I am stuck here because I don't understand how from this to create the ClassLoader as I need a Module Loader to build the Module then access ClassLoader
And the issue is which one ? cause to get access to "com.ubikingenierie.myserver" I need the root one which I could access like this:
But I don't see how to make it load my module , cause If I call loadModule it won't find ""my new class loader" as it's not in it.
And If I create a new subclass of ModuleLoader I don't see how to make it use LocalModuleLoader for existing modules.
Anyone can help ?