Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21969

graceful shutdown in tomcat

    XMLWordPrintable

    Details

    • Type: User story
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 9.2
    • Component/s: Runtime
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      On components, you could now provide a stopping logic by overriding the 'DefaultComponent#applicationStopped(ComponentContext, Instant)' method.

      Show
      On components, you could now provide a stopping logic by overriding the 'DefaultComponent#applicationStopped(ComponentContext, Instant)' method.
    • Sprint:
      nxSL Sprint 9.2.1, DevOps-16, nxSL Sprint 9.2.2
    • Story Points:
      5

      Description

      As part of a cluster, I should be able to shutdown and let the other nodes continue my works gracefully.

      In the tomcat we already have two entry points which participate to the lifecycle of the application.

      • org.nuxeo.runtime.tomcat.NuxeoLauncher which is part of the container and handles lifecycle's events on the nuxeo's web context component
      • org.nuxeo.runtime.deployment.NuxeoStarter which is part of the web application and handle the nuxeo's web context events.

      The launcher is mainly responsible for preparing the environment for the web application. It's the starter which proceed with the runtime initialization and shutdown as part of the web application.

      Once a shutdown is requested, tomcat is blocking new requests to the application and initiate the nuxeo's web context shutdown. Then the launcher is handled for preparing the shutdown before the starter being handled for the runtime shutdown. So problems comes from web requests in progress and asynchronous threads which could start at any time.

      We want to wait for web requests currently in progress and stop running asynchronous works as soon as the launcher is handled for the shutdown.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: