Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-6103

ServiceModuleLoader can't properly unload module if it failed to load module due to wrong dependency

XMLWordPrintable

      ServiceModuleLoader can't properly unload module if it failed to load module due to wrong dependency.

      The codes below take care of unload operation.

      org.jboss.as.server.moduleservice.ServiceModuleLoader.java
      case STOP_REQUESTED_to_STOPPING: {
        log.tracef("serviceStopping: %s", controller);
        ModuleSpec moduleSpec = this.moduleSpec;
        try {
            *Module module = loadModule(moduleSpec.getModuleIdentifier());*
            *unloadModuleLocal(module);*
        } catch (ModuleLoadException e) {
            // ignore, the module should always be already loaded by this point,
            // and if not we will only mask the true problem
        }
            // TODO: what if the service is restarted?
          controller.removeListener(this);
          break;
      }
      

      The line unloadModuleLocal(module) can not be reached because the previous loadModule(moduleSpec.getModuleIdentifier() will throw ModuleLoadException if module has dependency problem.

            chaowan@redhat.com Chao Wang
            chaowan@redhat.com Chao Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: