Details
-
Improvement
-
Resolution: Fixed
-
Major
-
5.2-milestone-2
-
None
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
- is related to
-
XWIKI-13759 Impossible to inject a InstanceIdManager in a listener
- Closed