Search code examples
jcrjackrabbit

Oak APIs vs JCR APIs


I am developing a web application based on Apache JackRabbit OAK (1.3.2) which exposes 2 sets of APIs:

  1. JCR API
  2. OAK API

My question is which API should I use for the application? I am able to implement the applications operations using either APIs. What will be the trade-off in terms of the features/functionalities if any.

Thanks


Solution

  • I would use the standard JCR APIs if possible, and only use the Oak-specific APIs if they bring concrete benefits. Using JCR means you can potentially replace the content repository with a different one, whereas the Oak APIs tie you to that product.