In My Enterprise Application (Java – 1.8 , Spring, Oak – 1.4.1 , MongoDB
Server – 3.2 ) to get Repository handle,
<raw>Jcr jcr = new Jcr(new Oak(MongoUtils.getDocumentNodeStore()))
.with(getSecurityProvider())
.withAsyncIndexing()
.with(new LuceneIndexEditorProvider())
.with((QueryIndexProvider) provider)
.with((Observer) provider)
.withAsyncIndexing();</raw>
logger.info("Acquired MongoDB datastore for Jackrabbit Oak; About to
create/get repository");
Repository repository = jcr.createRepository();
Every time on Tomcat restart, do I need to call ‘jcr.createRepository()’?
Earlier we had Jackrabbit 2.8 version, wherein repository.xml had the
configuration and now with Oak I have no clue on getting repository other
than createRepository().