protected final boolean start()

in src/main/java/org/apache/sling/jcr/base/AbstractSlingRepositoryManager.java [386:399]


    protected final boolean start(final BundleContext bundleContext, final String defaultWorkspace,
                                  final boolean disableLoginAdministrative) {
        start(bundleContext, new Config(defaultWorkspace, disableLoginAdministrative));
        long end = System.currentTimeMillis() + 5000; // wait up to 5 seconds for repository registration
        while (!isRepositoryServiceRegistered() && end > System.currentTimeMillis()) {
            try {
                TimeUnit.MILLISECONDS.sleep(100);
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                break;
            }
        }
        return isRepositoryServiceRegistered();
    }