Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
-
None
-
None
-
Platform 192 - Messy HST 2
Description
First the spring component manager of the platform should be completely initialized before site webapp spring component managers are allowed to initialize: Namely, site component managers can rely on services provided by the platform
Now, the code was as follows in HstPlatformContextLoaderListener:
@Override protected void trackHstModelRegistry(final RepositoryService repositoryService) { // HSTTWO-4355 TODO: we may wany to setup a separate *parent* Spring Context for platform specific Spring wiring // for now doing required wiring inline here, using the provided Repository but also temporarily // (mis?)using the hstconfigreader.delegating credentials from registering hst sites (see HstModelRegistryImpl) hstModelRegistry.setRepository(repositoryService); hstModelRegistry.init(); platformServices.setHstModelRegistry(hstModelRegistry); platformServices.setPreviewDecorator(previewDecorator); platformServices.init(); configureHstSite(hstModelRegistry); }
hstModelRegistry.init(); would trigger the HstModelRegistry to be registered in HippoServiceRegistry, and as a result, all other site webapp their spring initialization would start. However, the platform spring initialization is done concurrently and not yet finished possibly.
Hence above should change into:
@Override protected void trackHstModelRegistry(final RepositoryService repositoryService) { // HSTTWO-4355 TODO: we may wany to setup a separate *parent* Spring Context for platform specific Spring wiring // for now doing required wiring inline here, using the provided Repository but also temporarily // (mis?)using the hstconfigreader.delegating credentials from registering hst sites (see HstModelRegistryImpl) hstModelRegistry.setRepository(repositoryService); platformServices.setHstModelRegistry(hstModelRegistry); platformServices.setPreviewDecorator(previewDecorator); configureHstSite(hstModelRegistry); hstModelRegistry.init(); platformServices.init(); }
Attachments
Issue Links
- relates to
-
HSTTWO-4516 HstModelRegistry is null when creating HstModel for the CMS
- Closed