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

Support better graceful destroy of the HST Spring component manager

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      The Spring component manager gets currently destroyed by

      org.hippoecm.hst.site.container.HstContextLoaderListener#contextDestroyed
      

      being triggered when the container stops the HST site webapp. However, any Spring component that wants to gracefully finish its task or gracefully wants to log out its jcr session that it holds for example a reference to, might log errors or result in unexpected behavior if it turns out the web app containing the repository has already been shut down.

      Hence, we should not only listen to 'contextDestroyed' but when the repository webapp (cms) gets shutdown, we first need to inform all hst site webapps to destroy their spring component manager if this hasn't been done already (thus that the hst webapp has not yet been shut down by the container)

      An easy way to do this is to register an attribute on the context with a listener attached, and when the repository shuts down, trigger the removal of the attribute in every hst webapp, in turn triggering the spring component mngr to shut down

      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: