Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-2157

Incorrect close/shutdown order in RepositoryServlet.destroy()

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • 13.0.0, 10.2.14, 11.2.10, 12.5.1, 12.6.0
    • 13.0.0
    • None
    • None
    • Platform 196 - Hardening 2

    Description

      The RepositoryServlet.destroy() method closes the repository before unregistering its service.

      As result, service trackers of the repository service, like the (new) HstContextLoaderListener (in nother or the same webapps) will cause exceptions being logged when trying to logout their repository sessions.

      Furthermore, the DbLockManager which is managed and destroyed together with the repository, will need to force interrupt outstanding locks (which may fail/take a long time) while typically their threads can (or should) be more elegantly stopped by first unregister the repository service, as those threads/jobs typically are managed through service trackers thereof (like, again, the HstContextLoaderListener which then already/first will stop its Spring context).

      Fix is trivial, just a proper reordering of the close/shutdown steps within th RepositoryServlet.destroy(), with closing the repository as (almost) last step.  

      Attachments

        Activity

          People

            Unassigned Unassigned
            adouma Ate Douma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: