public void relink(final String name) { final SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(MODULE_REDEFINE_ANY_PERM); } final ModuleLoader loader = getModuleLoader(); final Module module = loadModule(name, loader); try { loader.relink(module); } catch (ModuleLoadException e) { throw new IllegalStateException("Module load failure for module " + name + ": " + e.toString()); } }
public void relink(final String name) { final SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(MODULE_REDEFINE_ANY_PERM); } final ModuleLoader loader = getModuleLoader(); final Module module = loadModule(name, loader); try { loader.relink(module); } catch (ModuleLoadException e) { throw new IllegalStateException("Module load failure for module " + name + ": " + e.toString()); } }
void initializeExtension(String module) throws OperationFailedException { try { boolean unknownModule = false; for (Extension extension : Module.loadServiceFromCallerModuleLoader(ModuleIdentifier.fromString(module), Extension.class)) { ClassLoader oldTccl = SecurityActions.setThreadContextClassLoader(extension.getClass()); try { if (unknownModule || !extensionRegistry.getExtensionModuleNames().contains(module)) { // This extension wasn't handled by the standalone.xml or domain.xml parsing logic, so we // need to initialize its parsers so we can display what XML namespaces it supports extension.initializeParsers(extensionRegistry.getExtensionParsingContext(module, null)); // AS7-6190 - ensure we initialize parsers for other extensions from this module // now that we know the registry was unaware of the module unknownModule = true; } extension.initialize(extensionRegistry.getExtensionContext(module, !standalone && !slaveHC)); } finally { SecurityActions.setThreadContextClassLoader(oldTccl); } } } catch (ModuleLoadException e) { throw new OperationFailedException(new ModelNode().set(e.toString())); } }