protected Repository acquireRepository()

in src/main/java/org/apache/sling/jcr/oak/server/internal/OakSlingRepositoryManager.java [131:168]


    protected Repository acquireRepository() {
        final BundleContext bundleContext = componentContext.getBundleContext();
        final Whiteboard whiteboard = new OsgiWhiteboard(bundleContext);
        this.initializers = whiteboard.track(RepositoryInitializer.class);
        this.editorProvider.start(whiteboard);
        this.indexProvider.start(whiteboard);
        this.indexEditorProvider.start(whiteboard);

        final Oak oak = new Oak(nodeStore)
            .withAsyncIndexing("async", 5);

        final Jcr jcr = new Jcr(oak, false)
            .with(new InitialContent())
            .with(new ExtraSlingContent())
            .with(JcrConflictHandler.createJcrConflictHandler())
            .with(new VersionHook())
            .with(whiteboard)
            .with(securityProvider)
            .with(editorProvider)
            // index stuff
            .with(indexProvider)
            .with(indexEditorProvider)
            .with(getDefaultWorkspace())
            .withFastQueryResultSize(configuration.oak_query_fastResultSize())
            .withObservationQueueLength(configuration.oak_observation_queue_length());
        
        for (RepositoryInitializer initializer : initializers.getServices()){
            jcr.with(initializer);
        }
        
        if (commitRateLimiter != null) {
            jcr.with(commitRateLimiter);
        }

        jcr.createContentRepository();

        return new TcclWrappingJackrabbitRepository((JackrabbitRepository) jcr.createRepository());
    }