The Artima Developer Community
Sponsored Link

Java Community News
Java Content Repository with Spring

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Java Content Repository with Spring Posted: Mar 14, 2007 11:56 AM
Reply to this message Reply
Summary
The Java Content Repository (JCR) API is currently in its second iteration as a JCP standard. A recent InfoQ article describes how to use JCR, and its open-source Jackrabbit implementation, with the Spring framework.
Advertisement

The Java Content Repository (JCR) API aims to provide a unified interface to document-centric content repositories. Among other features, the JCR API defines how content in a repository can be accessed, queried, and modified through a transaction.

The JCR API was developed in the context of the JCP, and became an official Java standard with the final approval of JSR 170. (See the Artima tutorial, Catch Jackrabbit and the Java Content Repository API.) The JCR expert group then moved on to a second iteration of the standard in JSR 283.

The JSR 170 expert group broke new grounds in the JCP—led by Day Software, JSR 170 was the first JSR with a reference implementation developed entirely as an open-source project. As Apache Jackrabbit, the JSR reference implementation recently graduated from Apache incubator status, and is currently in its 1.2.3 production release.

The JSR 170 spec writers took great pains to ensure that Java Content Repository implementations fit into a larger Java enterprise universe. One example of that integration is that a JCR implementation can be enrolled as a transactional resource in a J2EE application server.

A recent InfoQ article by Costin Leau, Integrating Java Content Repository and Spring, describes how JCR can integrate with the Spring framework as well:

Part of Spring Modules, JCR module's main objective is to simplify development with the JSR-170 API in a similar manner to that of the ORM package from the main Spring distribution. Features include:

  • JcrTemplate which allows execution of JcrCallback and exception handling (transforming checked JCR exceptions into unchecked Spring DAO exceptions).
  • RepositoryFactoryBean which configures, starts and stops the repository instances... The support contains predefined FactoryBeans for Jackrabbit and Jeceira [Editor's note: another JCR implementation], and an abstract base class which can easily support other repositories.
  • SessionFactory which ... allows automatic registration of listeners and custom namespaces.
  • Spring declarative transactional support for repositories that implement the (optional) transactional feature.
  • OpenSessionInView interceptor and filter which allow the usage of the same session per thread across different components. Along with JcrTemplate, the retrieval, closure and management of the JCR session is externalized and totally transparent to the caller.

What do you think of Jackrabbit as a tool for content management systems and Web applications?

Topic: Scala for Java Programmers Previous Topic   Next Topic Topic: The Expressive Power of Languages

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use