Github user olegz commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1236#discussion_r88571378
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/contextlistener/ApplicationStartupContextListener.java
 ---
    @@ -121,4 +111,16 @@ public void contextDestroyed(ServletContextEvent sce) {
                 }
             }
         }
    +
    +    private void shutdown(final FlowService flowService, final 
RequestReplicator requestReplicator) {
    +        // ensure the flow service is terminated
    +        if (flowService != null && flowService.isRunning()) {
    +            flowService.stop(false);
    +        }
    +
    +        // ensure the request replicator is shutdown
    +        if (requestReplicator != null) {
    +            requestReplicator.shutdown();
    +        }
    --- End diff --
    
    Shouldn't _stop_ and _shutdown_ be guarded against exception (wrapped 
try/catch). I mean if something happens in _stop_, _shutdown_ won't execute. 
Not sure if that's ok.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to