Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2573 posts at DZone. You can read more from them at their website. View Full User Profile

Apache Jackrabbit 2.0 Fully Compliant with JCR 2.0

01.27.2010
| 9846 views |
  • submit to reddit
The Apache Jackrabbit project is now a fully conforming and production-ready implementation of the Java Content Repository 2.0 API with the release of version 2.0 today.  After releasing the first alpha version of Jackrabbit 2.0 in June 2009, the Jackrabbit developers have finally reached their goal of implementing all of the required features in the JSR 170 and JSR 283 specs, which constitute the JCR 2.0 API.  The Jackrabbit committers have also added support for a subset of JCR 2.0 on Jackrabbit 2.0's remote access layers: RMI and WebDAV.  

Apache Jackrabbit 2.0 is now updated to require Java 5 or higher.  Many general-purpose JCR components like OCM are now developed and released separately from the Jackrabbit content repository for better re-usability.  For all database back-ends, database connection pooling is now available, and a local data store feature is now enabled in the default repository configuration.  

Jackrabbit 2.0 can now extract and index the content of several new types of documents thanks to integration with Apache Tika, a subproject of Lucene.  For example, the Office Open XML files produced by Microsoft Office 2007 can now be indexed.  Also, the OracleFileSystem class no longer uses special blob handling since it's not required for versions of Oracle higher than 10R1.  The Oracle9FileSystem class can be used if you need support for Oracle 9 or earlier.

Version 2.0 is backwards compatible with 1.x installations, but the depreciated classes and features have been removed.  Repositories that used the security features of Jackrabbit 1.5 and 1.6 should take a look at JCR-1944 and JCR-2313 before upgrading since there have been some changes to the JCR-RMI layer.  A subset of JCR 2.0 is now supported on the RMI and WebDAV layers for Jackrabbit 2.0

Full JCR 2.0 support in the RMI and WebDav remoting layers is the next step for the Jackrabbit developers.  After achieving full JCR 2.0 support in Jackrabbit 2.0, the upcoming goals on their roadmap also include transactional versioning, hot backup, and full XPath.  Long term goals for the next major release, Jackrabbit 3.0, include NGP support (or something similar) and JDBC over JCR.

                                                 Jackrabbit SPI


Jackrabbit uses it's own specific functionality for creating new workspaces since the JCR API does not contain features for doing so.  You can create a new workspace either manually or programmatically, says the Jackrabbit FAQ:

"The manual way is to create a new workspace directory within the repository home directory and to place a new workspace.xml configuration file in that folder. You can use the configuration file of an existing workspace as an example, just remember to change the name of the workspace in the Workspace name="..." tag. See the Jackrabbit Configuration page for configuration details. Note also that you need to restart the repository instance to access the new workspace."

There are also instructions for deploying Jackrabbit into Tomcat:
  • Download jcr-1.0.jar and put it into <tomcat-install-dir>/shared/lib
  • Get the WAR distribution from the Downloads page and deploy it into Tomcat
  • Point your browser to http://localhost:8080/jackrabbit-webapp-<version>/

Click here to download Apache Jackrabbit 2.0 and then learn how to build Jackrabbit here.