SeamFramework.orgCommunity Documentation

Chapter 63. Seam JCR - JBoss ModeShape Integration

63.1. ModeShape Integration Installation
63.2. Usage

In order to activate ModeShape support within your application, you need to include ModeShape on your classpath. At a minimum, the following maven dependencies must be satisfied.


<dependency>
    <groupId>org.modeshape</groupId>
    <artifactId>modeshape-jcr</artifactId>
    <version>${modeshape.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.lucene</groupId>
    <artifactId>lucene-core</artifactId>
    <version>${lucene.version}</version>
</dependency>
        

In order to use ModeShape's Repository and Session objects in your application, you must define an injection point using the JcrConfiguration annotation based on ModeShape's required configuration parameters. Please review the ModeShape getting started guide for further details.

    @Inject @JcrConfiguration(name="org.modeshape.jcr.URL",value="file:path/to/modeshape.xml?repositoryName=MyRepo")
    Repository repository;

    @Inject @JcrConfiguration(name="org.modeshape.jcr.URL",value="file:path/to/modeshape.xml?repositoryName=MyRepo")
    Session session;