Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4468

Spring Component Managers should not be loaded concurrently between site and platform webapp

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 13.0.0
    • None
    • None

    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

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: