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
- relates to
-
HSTTWO-4191 Postpone initializing the HST Component Manager until the RepositoryService is available
- Closed