[ 
https://issues.apache.org/jira/browse/NIFIREG-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574965#comment-16574965
 ] 

ASF GitHub Bot commented on NIFIREG-192:
----------------------------------------

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

    https://github.com/apache/nifi-registry/pull/134#discussion_r208965183
  
    --- Diff: 
nifi-registry-web-api/src/main/java/org/apache/nifi/registry/NiFiRegistryApiApplication.java
 ---
    @@ -54,6 +63,15 @@ protected SpringApplicationBuilder 
configure(SpringApplicationBuilder applicatio
                     .properties(defaultProperties);
         }
     
    +    @PostConstruct
    +    public void postConstruct() {
    --- End diff --
    
    I'm not sure when post construct gets called for a 
SpringApplicationBuilder. I don't think we want to fire the REGISTRY_START 
event until after the full application context is loaded, otherwise 
EventHookProvider consumers of that event type might not be loaded/ready yet.
    
    Take a look at the `ApplicationListener<ApplicationReadyEvent>` interface, 
that could be a nice solution to this.


> Create/Add REGISTRY_START event that fires when the NiFi Registry initially 
> starts
> ----------------------------------------------------------------------------------
>
>                 Key: NIFIREG-192
>                 URL: https://issues.apache.org/jira/browse/NIFIREG-192
>             Project: NiFi Registry
>          Issue Type: New Feature
>            Reporter: Jeremy Dyer
>            Assignee: Jeremy Dyer
>            Priority: Major
>             Fix For: 0.3.0
>
>
> Having an event that fires when the NiFi Registry starts would provide a 
> great place for bootstrapping the registry with any sort of setup, importing, 
> repairing type tasks that need to occur before the registry starts serving 
> clients.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to