@Override public synchronized void start(StartContext context) throws StartException { try { final ServiceModuleLoader moduleLoader = serviceModuleLoader.getValue(); final Module module = moduleLoader.loadModule(moduleDefinitionInjectedValue.getValue().getModuleIdentifier()); moduleLoader.relinkModule(module); for (ModuleDependency dependency : dependencies) { if (dependency.isUserSpecified()) { final ModuleIdentifier id = dependency.getIdentifier(); try { String val = moduleLoader.loadModule(id).getProperty("jboss.api"); if (val != null) { if (val.equals("private")) { ServerLogger.PRIVATE_DEP_LOGGER.privateApiUsed(moduleDefinitionInjectedValue.getValue().getModuleIdentifier().getName(), id); } else if (val.equals("unsupported")) { ServerLogger.UNSUPPORTED_DEP_LOGGER.unsupportedApiUsed(moduleDefinitionInjectedValue.getValue().getModuleIdentifier().getName(), id); } else if (val.equals("deprecated")) { ServerLogger.DEPRECATED_DEP_LOGGER.deprecatedApiUsed(moduleDefinitionInjectedValue.getValue().getModuleIdentifier().getName(), id); } } } catch (ModuleNotFoundException ignore) { //can happen with optional dependencies } } } this.module = module; } catch (ModuleLoadException e) { throw ServerLogger.ROOT_LOGGER.failedToLoadModule(moduleDefinitionInjectedValue.getValue().getModuleIdentifier(), e); } }
@Override public synchronized void start(StartContext context) throws StartException { try { final ServiceModuleLoader moduleLoader = serviceModuleLoader.getValue(); final Module module = moduleLoader.loadModule(moduleDefinitionInjectedValue.getValue().getModuleIdentifier()); moduleLoader.relinkModule(module); for (ModuleDependency dependency : dependencies) { if (dependency.isUserSpecified()) { final ModuleIdentifier id = dependency.getIdentifier(); try { String val = moduleLoader.loadModule(id).getProperty("jboss.api"); if (val != null) { if (val.equals("private")) { PRIVATE_DEP_LOGGER.privateApiUsed(moduleDefinitionInjectedValue.getValue().getModuleIdentifier().getName(), id); } else if (val.equals("unsupported")) { UNSUPPORTED_DEP_LOGGER.unsupportedApiUsed(moduleDefinitionInjectedValue.getValue().getModuleIdentifier().getName(), id); } } } catch (ModuleNotFoundException ignore) { //can happen with optional dependencies } } } this.module = module; } catch (ModuleLoadException e) { throw ServerMessages.MESSAGES.failedToLoadModule(moduleDefinitionInjectedValue.getValue().getModuleIdentifier(), e); } }
@Override public synchronized void start(StartContext context) throws StartException { try { final ServiceModuleLoader moduleLoader = serviceModuleLoader.getValue(); final Module module = moduleLoader.loadModule(moduleDefinitionInjectedValue.getValue().getModuleIdentifier()); moduleLoader.relinkModule(module); for (ModuleDependency dependency : dependencies) { if (dependency.isUserSpecified()) { final ModuleIdentifier id = dependency.getIdentifier(); try { String val = moduleLoader.loadModule(id).getProperty("jboss.api"); if (val != null) { if (val.equals("private")) { ServerLogger.PRIVATE_DEP_LOGGER.privateApiUsed(moduleDefinitionInjectedValue.getValue().getModuleIdentifier().getName(), id); } else if (val.equals("unsupported")) { ServerLogger.UNSUPPORTED_DEP_LOGGER.unsupportedApiUsed(moduleDefinitionInjectedValue.getValue().getModuleIdentifier().getName(), id); } else if (val.equals("deprecated")) { ServerLogger.DEPRECATED_DEP_LOGGER.deprecatedApiUsed(moduleDefinitionInjectedValue.getValue().getModuleIdentifier().getName(), id); } } } catch (ModuleNotFoundException ignore) { //can happen with optional dependencies } } } this.module = module; } catch (ModuleLoadException e) { throw ServerLogger.ROOT_LOGGER.failedToLoadModule(moduleDefinitionInjectedValue.getValue().getModuleIdentifier(), e); } }
@Override public synchronized void start(StartContext context) throws StartException { try { final ServiceModuleLoader moduleLoader = serviceModuleLoader.getValue(); final Module module = moduleLoader.loadModule(moduleSpec.getValue().getModuleIdentifier()); moduleLoader.relinkModule(module); for (ModuleDependency dependency : dependencies) { if (dependency.isUserSpecified()) { final ModuleIdentifier id = dependency.getIdentifier(); try { String val = moduleLoader.loadModule(id).getProperty("jboss.api"); if (val != null) { if (val.equals("private")) { PRIVATE_DEP_LOGGER.privateApiUsed(moduleSpec.getValue().getModuleIdentifier().getName(), id); } else if (val.equals("unsupported")) { UNSUPPORTED_DEP_LOGGER.unsupportedApiUsed(moduleSpec.getValue().getModuleIdentifier().getName(), id); } } } catch (ModuleNotFoundException ignore) { //can happen with optional dependencies } } } this.module = module; } catch (ModuleLoadException e) { throw ServerMessages.MESSAGES.failedToLoadModule(moduleSpec.getValue().getModuleIdentifier(), e); } }