Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

There is currently a beta quality JCR implementation of Content Hosting in trunk. This work was originaly done and documented in SAK-10366. This is some good historical information available too, but that is now deprecated. This page will deal specifically with JCR information related to the ContentHostingService and parts of the Resources tool. For general information about JSR-170 support in Sakai see here

The very first phase of JCR integration for Resources is an implementation of the existing ContentHostingService API using a JCR backend. With this initial support, the Resources Tool and Sakai DAV are meant to operate as they stand with no changes to their code.

Installing the JCR ContentHostingService

Note

On the road to multiple CHS implementations, some properties which previously referred to the org.sakaiproject.content.api.ContentHostingService bean name itself must now refer to the specific implementation. This requires changes if you are using an existing sakai.properties. If you see errors during startup indicating things like 'prioritySortEnabled' not being settable, this is a likely cause.

Your sakai.properties should now look like:

No Format

# set to true to enable the release/retract and hiding of resources in ContentHostingService
availabilityChecksEnabled@org.sakaiproject.content.api.ContentHostingService.dbservice = true

# set to true to enable custom sorts within folders in ContentHostingService and the Resources tool
prioritySortEnabled@org.sakaiproject.content.api.ContentHostingService.dbservice = true

Sakai Trunk

Note: Some work on this is currently occuring in content branch SAK-12105. Should be merged back within a few weeks. SG - Nov 13, 2007

...

titleUpdate Dec 7, 2007

...

Content Hosting service on jcr is available in trunk, and can be built as part of the framework profile. Deploy the famework with

No Format

mvn -Pframework clean install sakai:deploy -Dmaven.tomcat.home=/tomcathome; 
rm -rf /tomcathome/components/sakai-content-pack; 
cd content; 
mvn -Pframework-jcr clean install sakai:deploy  -Dmaven.tomcat.home=/tomcathome 
IEB - Dec 7, 2007

In addition, you can use the full-jcr maven profile to install everything with JCR including the content-providers, etc.

  1. If Sakai is already built and deployed, remove the following directory from the tomcat deploy
    tomcat/components/sakai-content-pack
  2. Then checkout and build the content branch
    No Format
    svn co https://source.sakaiproject.org/svn/content/branches/SAK-12105
    mvn clean install sakai:deploy -f SAK-12105/pom.xml -PJCR
    
  3. At the moment there is an issue with the content provider component. After installing remove components/sakai-content-providers-pack.

...

  1. Checkout and install DB from trunk
    No Format
    svn co https://source.sakaiproject.org/svn/db/trunk db
    mvn clean install sakai:deploy -f db/pom.xml
    
    • If you can, run maven und from 2.4.x db, otherwise removing the following from your tomcat:
      • tomcat/components/sakai-db-pack
      • tomcat/shared/lib/sakai-db-api
  2. Checkout and install entity from trunk
    No Format
    svn co https://source.sakaiproject.org/svn/entity/trunk entity
    mvn clean install sakai:deploy -f entity/pom.xml
    
    • Again if you can't use maven und, manually remove the following:
      • tomcat/components/sakai-entity-pack
      • tomcat/shared/lib/sakai-entity-api
  3. At this point there might be two versions of hibernate in tomcat/shared/lib
    Remove hibernate 3.1.3 and leave 3.2.5ga
  4. Checkout and install the new content code
    No Format
    svn co https://source.sakaiproject.org/svn/content/branches/SAK-12105
    mvn clean install sakai:deploy -f SAK-12105/pom.xml -PJCR
    
    • If you can, run maven und from 2.4.x content, otherwise removing the following from your tomcat:
      • tomcat/components/sakai-content-pack
  5. At the moment there is an issue with the content provider component. After installing remove components/sakai-content-providers-pack.

Enabling JCR Content

JCR is disabled by default. To enable it you can either switch over the components beans or use the JCR Inspector to switch over realtime.

Using JCR Inspector to switch over realtime

The JCR Inspector has controls to switch over to using the JCR Content Service (and switch back). They are located on the Import Legacy CHS Data view. Click on the buttons to switch.

Content Migration

Unlike some of the other data upgrades that have been performed on Content Hosting, the conversion to a JCR implementation requires copying all of the data over to another repository. Below is a description of the first algorithm are working on to perform the migration.

...