You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Marcel Reutegger (Jira)" <ji...@apache.org> on 2021/07/16 12:42:00 UTC

[jira] [Commented] (SLING-10624) Callback when SlingRepository init fails

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

Marcel Reutegger commented on SLING-10624:
------------------------------------------

Proposed changes in PR: https://github.com/apache/sling-org-apache-sling-jcr-base/pull/6

> Callback when SlingRepository init fails
> ----------------------------------------
>
>                 Key: SLING-10624
>                 URL: https://issues.apache.org/jira/browse/SLING-10624
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>            Reporter: Marcel Reutegger
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{AbstractSlingRepositoryManager}} initializes the repository asynchronously in a separate thread. This makes it difficult for an implementing subclass to detect when initialization fails. An implementing class calls {{start()}}, which returns almost immediately, while the repository is starting up asynchronously. There is no way to detect that {{start()}} was successful.
> There should be a callback method that can be overwritten by the implementing class. The method would be called when initialization fails, before {{stop()}} is finally called.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)