Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
OpenMRS 1.9.5, OpenMRS 1.9.6
-
None
Description
When a module is stopped then started or newly uploaded, its ModuleActivator.started() and contextRefreshed() methods are not called.
From a quick look debug of the code, it looks like the module being started is not included in the list of started modules that ModuleUtils.refreshApplicationContext() iterates through ( from ModuleFactory.getStartedModulesInOrder() ).
I wasn't sure if I understood the contract for when .started() and .contextRefreshed() were supposed to be called, but in the portion of ModuleUtils.refreshApplicationContext() that looks through all the modules, it seems like it was intended to recognize the newly started module and call .started() on it.
It could be fixed by checking if startedModules.contains(startedModule) and adding it if it's not in there.