Latest Posts

Archives [+]

Jackrabbit 1.6 comes with native http access layer

Jackrabbit 1.6 has been released a couple of days ago and it comes with a very cool, but somewhat hidden feature: it is now possible to use the Content Repository through http. There is direct read/write access to the repository even from the browser.

Of course, through Sling this was possible before, but now http-based access is native to the Content Repository itself. However, having Jackrabbit-native http access makes it much easier to use JCR from whichever framework or language you happen to use to write applications. In that sense, I tend to think of this as a game changing feature for Jackrabbit and JCR.

Unfortunately, the name of this access capability is not something one would expect like "RESTful this" or "Web that", but "JCR Remoting". Anyway, to check it out run the Jackrabbit 1.6 standalone server and find the description and some examples at http://localhost:8080/webdav-jcr.jsp

Nodes can be read through a GET request for /path/to/node.json , whole trees can be read in one request through a request to /path/to/node.treedepth.json (which is the format known from Sling). Adding, deleting or moving nodes is possible by sending POSTs in a specific format defined in the tutorials at http://localhost:8080/remoting/write.jsp

When I read the JCR Remoting documentation I got very confused by two concepts: WebDAV extensions and the JCR Remoting Client. Here is what I found out:

The intention of JCR Remoting is to make available the complete JCR functionality. At the moment, not all of that is implemented in the protocol. For this reason WebDAV is used as a fallback (for now). This makes sense, because WebDAV is http-based as well.

The JCR Remoting Client is a set of Java classes that implement the JCR Remoting protocol and provide clients with a Java-based JCR session. Essentially, this is an alternative to an RMI-based connection to a Java Content Repository. It might be of interest to you if you intend to use Java to connect to the repository, but you can safely ignore it if you do not intend to do so.