Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4134

ModuleActivator.started()/.contextRefreshed() not called when module is stopped/restarted or newly uploaded

    XMLWordPrintable

    Details

    • Complexity:
      Low
    • Sprint:
      Release 1.10 beta

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dkayiwa Daniel Kayiwa
              Reporter:
              nwilkie Nicholas Wilkie [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 5 hours Original Estimate - 5 hours
                  5h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d