BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Article: Integrating Java Content Repository and Spring

Article: Integrating Java Content Repository and Spring

Bookmarks
In this latest InfoQ article, Costin Leau provides a nice introduction to JSR 170 (Java Content Repositories) and how to integrate it with Spring Modules' JCR module, whose 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.

Read  Integration Java Content Repository and Spring

According to the article, Springs JCR Module provides (summarized):
  • JcrTemplate which allows execution of JcrCallbackand exception handling (transforming checked JCR exceptions into unchecked Spring DAO exceptions).
  •  Session and can be easily used as a replacement. Moreover the template is aware of thread-bound sessions which can be used across several methods, functionality very useful when using a transactional repository.
  • RepositoryFactoryBean which configures, starts and stops the repository instances.
  • SessionFactory which unifies the Repository,Credentials and Workspace interfaces and 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. 
InfoQ.com's architecture is also built around JSR 170 with Apache Jackrabbit and also uses Spring Modules.

Rate this Article

Adoption
Style

BT