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

Refactor initialization of Instance Id Manager

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 8.4-rc-1
    • 5.2-milestone-2
    • Instance
    • None
    • Unknown
    • N/A

    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

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

              Dates

                Created:
                Updated:
                Resolved: