Using Jackrabbit Version 2.0


The upcoming Jackrabibt 2.0 release will be the first Jackrabbit release supporting the recently publish JCR 2.0 specification. With support for this new release, currently available from the central maven repository as the third beta release (2.0-beta3), I also propose to split the embedded Jackrabbit Repository module and take out two important helper libraries:

This dramatically reduces the sice of the Jackrabbit bundle.

The following libraries will (for now) remain in the embedded Jackrabbit Repository bundle:

Further investigation will have to show to what extent the SPI and SPI Commons libraries can and should be used as bundles.

NOTE We do not upgrade the default JCR API import defined in the parent POM to version 2.0 to ensure that by default Sling is still able to run on plain JCR 1.0 repositories. Those parts of Sling really requiring JCR 2.0 functionality will have to explicitly set the required JCR API version to 2.0.

Progress in this upgrade is tracked in SLING-1212. Prototype implementation can befound in my whiteboard at



The jcr/base bundle contains a utility class providing access to the Jackrabbit Access control implementation. This utility class has to be updated to use the new JCR 2.0 API instead of the transient Jackrabbit API previously used.

In addition we finally remove the SessionPool support we have disabled for a quite some time now. Though in the early days of Jackrabbit session setup was quite expensive, nowadays this setup is fairly quick and a session pool poses more issues – mainly for cleaning up and reusing sessions – than it solves problems.


The biggest changes are concerned with the embedded Jackrabbit Repository bundle. As described above, one change is the exclusion of the indexing (parsing) and derby libraries from the bundle itself. This reduces the size of this bundle considerably. In addition all Jackrabbit dependencies are upgraded to the 2.0-beta3 version.

Finally the security plugin support classes are converted to the new JCR 2.0 API. The pluggable DefaultLoginModule and DefaultAccessManager classes still remain to provide dynamic extensibility based on the OSGi service registry.


The upgrade of the WebDAV provider requires integration of Tika API because starting with Jackrabbit 2.0 Tika is also used for MIME type resolution in the Jackrabbit project. For this reason, the Sling WebDAV bundle will convert the existing wrapper to a Tika Detector baking decisions – as before – on the Sling MimeTypeService.

The Sling WebDAV bundle will import the Tika API as does the jcr/jackrabbit-server bundle.


The Jackrabbit User Manager bundle must of course be upgraded.



The Jackrabbit Access Manager bundle must of course be upgraded.



This project is obsolete because the Jackrabbit project provides the Jackrabbit API library as a bundle for quite some time now. Thus this project can safely be removed.


The launchpad/bundles project is modified to include the required JCR and Jackrabbit bundles:

Besides that the current SNAPSHOTs of the Jackrabbit embedding bundles must of course be included.


Tika Extension

To be able to simply import the Apache Tika packages a convenience full bundle of the Tika Core and Parser libraries as well as some of the core support libraries would be very helpful. As such I prepared such a bundling and created TIKA-340 to propose this addition to the Tika project. To build and use the Jackrabbit 2.0 support yourself checkout the Tika project, apply the patch and install (at least) the tika-full bundle in your local maven repository.

New Bundles

The following bundles have been added in order to setup Sling: