Skip to content

Commit 702d855

Browse files
soul2zimatebstansberry
authored andcommitted
AS7-6103, use findLoadedModuleLocal() to retrieve module to be unloaded.
1 parent cc2a0c0 commit 702d855

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

server/src/main/java/org/jboss/as/server/moduleservice/ServiceModuleLoader.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,10 @@ public void transition(final ServiceController<? extends ModuleSpec> controller,
100100
case STOP_REQUESTED_to_STOPPING: {
101101
log.tracef("serviceStopping: %s", controller);
102102
ModuleSpec moduleSpec = this.moduleSpec;
103-
try {
104-
Module module = loadModule(moduleSpec.getModuleIdentifier());
103+
ModuleIdentifier identifier = moduleSpec.getModuleIdentifier();
104+
Module module = findLoadedModuleLocal(identifier);
105+
if(module != null)
105106
unloadModuleLocal(module);
106-
} catch (ModuleLoadException e) {
107-
// ignore, the module should always be already loaded by this point,
108-
// and if not we will only mask the true problem
109-
}
110107
// TODO: what if the service is restarted?
111108
controller.removeListener(this);
112109
break;

0 commit comments

Comments
 (0)