Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13804

Refactor initialization of Instance Id Manager

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2-milestone-2
    • Fix Version/s: 8.4-rc-1
    • Component/s: Instance
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      The instance id manager is currently initialized in ActiveInstallsInitializerListener. Till now Active Installs was the only module needing an instance id but we need to make it ready to be used by other modules.

      See todo that are in the code of ActiveInstallsInitializerListener:

          /**
           * Used to initialize the unique XWiki instance id (to be removed in the future, see the source documentation
           * below).
           * <p>
           * Note that we use a Provider since the Observation Manager will register listeners very early in the
           * initialization process and some of the components injected transitively by the {@link InstanceIdManager}
           * implementation have initialization code that require an Execution Context to be available, which is not the case
           * early one in XWiki's initialization since no HTTP request has been made yet...
           */
          @Inject
          private Provider<InstanceIdManager> instanceIdManagerProvider;
      

      and

              // Ensure that the instance id is initialized and available.
              // TODO: In the future introduce an EventListener in the instance module and have this listener execute *after*
              this.instanceIdManagerProvider.get().initializeInstanceId();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                vmassol Vincent Massol
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: