jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1229679 [1/12] - /jackrabbit/site/trunk/content/
Date Tue, 10 Jan 2012 18:51:06 GMT
Author: jukka
Date: Tue Jan 10 18:50:59 2012
New Revision: 1229679

URL: http://svn.apache.org/viewvc?rev=1229679&view=rev
Log:
JCRSITE-37: Migrate web site from Confluence to Apache CMS

First shot at migrating confluence content to markdown format. WIP...

Added:
    jackrabbit/site/trunk/content/5'-with-jackrabbit-ocm.cwiki   (with props)
    jackrabbit/site/trunk/content/a-simple-ocm-project-with-maven-&-eclipse.cwiki   (with props)
    jackrabbit/site/trunk/content/advanced-mapping-strategies.cwiki   (with props)
    jackrabbit/site/trunk/content/advanced-mapping-strategies.mdtext   (with props)
    jackrabbit/site/trunk/content/apache-jackrabbit-resolution.cwiki   (with props)
    jackrabbit/site/trunk/content/apache-jackrabbit-resolution.mdtext   (with props)
    jackrabbit/site/trunk/content/application-bundle-howto.cwiki   (with props)
    jackrabbit/site/trunk/content/application-bundle-howto.mdtext   (with props)
    jackrabbit/site/trunk/content/articles.cwiki   (with props)
    jackrabbit/site/trunk/content/articles.mdtext   (with props)
    jackrabbit/site/trunk/content/basic-ocm-operations.cwiki   (with props)
    jackrabbit/site/trunk/content/basic-ocm-operations.mdtext   (with props)
    jackrabbit/site/trunk/content/building-jackrabbit.cwiki   (with props)
    jackrabbit/site/trunk/content/building-jackrabbit.mdtext   (with props)
    jackrabbit/site/trunk/content/concurrency-control.cwiki   (with props)
    jackrabbit/site/trunk/content/concurrency-control.mdtext   (with props)
    jackrabbit/site/trunk/content/continuous-integration.cwiki   (with props)
    jackrabbit/site/trunk/content/continuous-integration.mdtext   (with props)
    jackrabbit/site/trunk/content/creating-releases.cwiki   (with props)
    jackrabbit/site/trunk/content/creating-releases.mdtext   (with props)
    jackrabbit/site/trunk/content/deployment-models.cwiki   (with props)
    jackrabbit/site/trunk/content/deployment-models.mdtext   (with props)
    jackrabbit/site/trunk/content/documentation.cwiki   (with props)
    jackrabbit/site/trunk/content/documentation.mdtext   (with props)
    jackrabbit/site/trunk/content/downloads.cwiki   (with props)
    jackrabbit/site/trunk/content/downloads.mdtext   (with props)
    jackrabbit/site/trunk/content/embedded-repository.cwiki   (with props)
    jackrabbit/site/trunk/content/embedded-repository.mdtext   (with props)
    jackrabbit/site/trunk/content/first-hops-with-apache-jackrabbit.cwiki   (with props)
    jackrabbit/site/trunk/content/first-hops-with-apache-jackrabbit.mdtext   (with props)
    jackrabbit/site/trunk/content/first-hops.cwiki   (with props)
    jackrabbit/site/trunk/content/first-hops.mdtext   (with props)
    jackrabbit/site/trunk/content/frequently-asked-questions.cwiki   (with props)
    jackrabbit/site/trunk/content/frequently-asked-questions.mdtext   (with props)
    jackrabbit/site/trunk/content/getting-started-with-apache-jackrabbit.cwiki   (with props)
    jackrabbit/site/trunk/content/getting-started-with-apache-jackrabbit.mdtext   (with props)
    jackrabbit/site/trunk/content/how-jackrabbit-works.cwiki   (with props)
    jackrabbit/site/trunk/content/how-jackrabbit-works.mdtext   (with props)
    jackrabbit/site/trunk/content/how-to-map-associations-between-objects.cwiki   (with props)
    jackrabbit/site/trunk/content/how-to-map-associations-between-objects.mdtext   (with props)
    jackrabbit/site/trunk/content/index-readers.cwiki   (with props)
    jackrabbit/site/trunk/content/index-readers.mdtext   (with props)
    jackrabbit/site/trunk/content/issue-tracker.cwiki   (with props)
    jackrabbit/site/trunk/content/issue-tracker.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-api.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-api.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-architecture.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-architecture.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-chair-2006-resolution.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-chair-2006-resolution.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-components.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-components.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-configuration.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-configuration.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-core-1.4.1.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-core-1.4.1.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-core.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-core.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-history.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-history.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-index-filters.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-index-filters.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jca-resource-adapter.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jca-resource-adapter.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-client.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-client.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-commons.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-commons.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-rmi.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-rmi.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-server.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-server.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-servlet.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-servlet.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-tests.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-tests.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-to-dav.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-to-dav.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-to-spi.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-jcr-to-spi.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-ocm-node-management.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-ocm-node-management.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-ocm.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-ocm.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-roadmap.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-roadmap.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-spi-commons.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-spi-commons.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-spi-to-dav.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-spi-to-dav.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-spi-to-jcr.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-spi-to-jcr.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-spi.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-spi.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-april-2005.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-april-2005.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-april-2006.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-april-2006.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2006.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2006.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2007.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2007.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2008.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2008.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2009.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2009.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2010.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2010.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2011.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-december-2011.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-january-2006.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-january-2006.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-july-2005.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-july-2005.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-july-2006.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-july-2006.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2007.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2007.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2008.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2008.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2009.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2009.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2010.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2010.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2011.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-june-2011.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2006.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2006.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2007.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2007.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2008.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2008.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2009.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2009.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2010.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2010.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2011.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-march-2011.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-may-2006.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-may-2006.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-october-2004.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-october-2004.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-october-2005.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-october-2005.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2006.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2006.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2007.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2007.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2008.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2008.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2009.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2009.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2010.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2010.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2011.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-status-september-2011.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-team.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-team.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-text-extractors.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-text-extractors.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-web-application.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-web-application.mdtext   (with props)
    jackrabbit/site/trunk/content/jackrabbit-webdav-library.cwiki   (with props)
    jackrabbit/site/trunk/content/jackrabbit-webdav-library.mdtext   (with props)
    jackrabbit/site/trunk/content/jcr-&-api.cwiki   (with props)
    jackrabbit/site/trunk/content/jcr-client-application-howto.cwiki   (with props)
    jackrabbit/site/trunk/content/jcr-client-application-howto.mdtext   (with props)
    jackrabbit/site/trunk/content/jcr.cwiki   (with props)
    jackrabbit/site/trunk/content/jcr.mdtext   (with props)
    jackrabbit/site/trunk/content/mailing-lists.cwiki   (with props)
    jackrabbit/site/trunk/content/mailing-lists.mdtext   (with props)
    jackrabbit/site/trunk/content/mapping-atomic-fields.cwiki   (with props)
    jackrabbit/site/trunk/content/mapping-atomic-fields.mdtext   (with props)
    jackrabbit/site/trunk/content/mapping-bean-fields.cwiki   (with props)
    jackrabbit/site/trunk/content/mapping-bean-fields.mdtext   (with props)
    jackrabbit/site/trunk/content/mapping-collection-fields.cwiki   (with props)
    jackrabbit/site/trunk/content/mapping-collection-fields.mdtext   (with props)
    jackrabbit/site/trunk/content/mapping-stategies.cwiki   (with props)
    jackrabbit/site/trunk/content/mapping-stategies.mdtext   (with props)
    jackrabbit/site/trunk/content/navigation.cwiki   (with props)
    jackrabbit/site/trunk/content/navigation.mdtext   (with props)
    jackrabbit/site/trunk/content/news-archive.cwiki   (with props)
    jackrabbit/site/trunk/content/news-archive.mdtext   (with props)
    jackrabbit/site/trunk/content/node-type-notation.cwiki   (with props)
    jackrabbit/site/trunk/content/node-type-notation.mdtext   (with props)
    jackrabbit/site/trunk/content/node-type-visualization.cwiki   (with props)
    jackrabbit/site/trunk/content/node-type-visualization.mdtext   (with props)
    jackrabbit/site/trunk/content/node-types.cwiki   (with props)
    jackrabbit/site/trunk/content/node-types.mdtext   (with props)
    jackrabbit/site/trunk/content/object-content-manager.cwiki   (with props)
    jackrabbit/site/trunk/content/object-content-manager.mdtext   (with props)
    jackrabbit/site/trunk/content/object-content-mapping.cwiki   (with props)
    jackrabbit/site/trunk/content/object-content-mapping.mdtext   (with props)
    jackrabbit/site/trunk/content/ocm-locking.cwiki   (with props)
    jackrabbit/site/trunk/content/ocm-locking.mdtext   (with props)
    jackrabbit/site/trunk/content/ocm-search.cwiki   (with props)
    jackrabbit/site/trunk/content/ocm-search.mdtext   (with props)
    jackrabbit/site/trunk/content/ocm-version-management.cwiki   (with props)
    jackrabbit/site/trunk/content/ocm-version-management.mdtext   (with props)
    jackrabbit/site/trunk/content/privacy-policy.cwiki   (with props)
    jackrabbit/site/trunk/content/privacy-policy.mdtext   (with props)
    jackrabbit/site/trunk/content/repository-lifecycle.cwiki   (with props)
    jackrabbit/site/trunk/content/repository-lifecycle.mdtext   (with props)
    jackrabbit/site/trunk/content/repository-server-howto.cwiki   (with props)
    jackrabbit/site/trunk/content/repository-server-howto.mdtext   (with props)
    jackrabbit/site/trunk/content/search-implementation.cwiki   (with props)
    jackrabbit/site/trunk/content/search-implementation.mdtext   (with props)
    jackrabbit/site/trunk/content/shared-j2ee-resource-howto.cwiki   (with props)
    jackrabbit/site/trunk/content/shared-j2ee-resource-howto.mdtext   (with props)
    jackrabbit/site/trunk/content/source-repository.cwiki   (with props)
    jackrabbit/site/trunk/content/source-repository.mdtext   (with props)
    jackrabbit/site/trunk/content/standalone-server.cwiki   (with props)
    jackrabbit/site/trunk/content/standalone-server.mdtext   (with props)
    jackrabbit/site/trunk/content/supporting-software-attribution.cwiki   (with props)
    jackrabbit/site/trunk/content/supporting-software-attribution.mdtext   (with props)
    jackrabbit/site/trunk/content/website.cwiki   (with props)
    jackrabbit/site/trunk/content/website.mdtext   (with props)
    jackrabbit/site/trunk/content/welcome-to-apache-jackrabbit.cwiki   (with props)
    jackrabbit/site/trunk/content/welcome-to-apache-jackrabbit.mdtext   (with props)

Added: jackrabbit/site/trunk/content/5'-with-jackrabbit-ocm.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/5%27-with-jackrabbit-ocm.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/5'-with-jackrabbit-ocm.cwiki (added)
+++ jackrabbit/site/trunk/content/5'-with-jackrabbit-ocm.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,103 @@
+This very small tutorial describes how to create an application with Jackrabbit OCM.
+In short, you have to :
+* Create one or more persistent classes. 
+* Instantiate an [Object Content Manager] component.
+* Use the [Object Content Manager] to persist your data.
+
+
+h2. Create a persistent class
+
+This tutorial is using the annotation support to define a persistent class. Your data objects are simple pojos with some OCM annotations. 
+Here is a example of a PressRelease class. 
+
+{code}
+package org.apache.jackrabbit.ocm.model;
+
+import java.util.Date;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+@Node
+public class PressRelease 
+{
+	@Field(path=true) String path;
+	@Field String title; 
+	@Field Date pubDate; 
+	@Field String content;
+	
+	public String getPath() {
+		return path;
+	}
+	public void setPath(String path) {
+		this.path = path;
+	}
+	public String getContent() {
+		return content;
+	}
+	public void setContent(String content) {
+		this.content = content;
+	}
+	public Date getPubDate() {
+		return pubDate;
+	}
+	public void setPubDate(Date pubDate) {
+		this.pubDate = pubDate;
+	}
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	
+	
+}
+{code}
+
+The annotation {code}@Node{code} has to be added on the top of the class.
+Each persistent class must have a *path field* which will be mapped into the JCR Node path. This can be specify with the annotation. {code}@Field(path=true){code}
+Other persistent fields can be defined with the annotation {code}@Field{code}
+
+That's all for the class definition. In other tutorials, we will see how to map advanced fields like collections or custom objects. 
+
+
+
+
+h2. Instantiate an Object Content Manager component
+In order to save a PressRelease object, you have to instantiate an [Object Content Manager] component : 
+
+{code}
+List<Class> classes = new ArrayList<Class>();	
+classes.add(PressRelease.class); // Call this method for each persistent class
+		
+Mapper mapper = new AnnotationMapperImpl(classes);
+ObjectContentManager ocm =  new ObjectContentManagerImpl(session, mapper);	
+{code}
+
+h2. Use the Object Content Manager to persist your data
+
+Now, you are ready to create a new PressRelease and use the [Object Content Manager] to persist it into the JCR repository. 
+
+{code}
+// Insert an object
+System.out.println("Insert a press release in the repository");
+PressRelease pressRelease = new PressRelease();
+pressRelease.setPath("/newtutorial");
+pressRelease.setTitle("This is the first tutorial on OCM");
+pressRelease.setPubDate(new Date());
+pressRelease.setContent("Many Jackrabbit users ask to the dev team to make a tutorial on OCM");
+			
+ocm.insert(pressRelease);
+ocm.save();
+			
+// Retrieve 
+System.out.println("Retrieve a press release from the repository");
+pressRelease = (PressRelease) ocm.getObject("/newtutorial");
+System.out.println("PressRelease title : " + pressRelease.getTitle());
+			
+// Delete
+System.out.println("Remove a press release from the repository");
+ocm.remove(pressRelease);
+ocm.save();
+{code}
\ No newline at end of file

Propchange: jackrabbit/site/trunk/content/5'-with-jackrabbit-ocm.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/a-simple-ocm-project-with-maven-&-eclipse.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/a-simple-ocm-project-with-maven-%26-eclipse.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/a-simple-ocm-project-with-maven-&-eclipse.cwiki (added)
+++ jackrabbit/site/trunk/content/a-simple-ocm-project-with-maven-&-eclipse.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,34 @@
+This tutorial explains how to start a new OCM project with Maven 2 & Eclipse. It is based on the tutorial [5' with Jackrabbit OCM].
+
+h2. Install Maven 2 & Eclipse
+
+This tutorial assumes that you have installed correctly Maven 2 & Eclipse.
+
+If it is not the case, here is the instructions to install both products :
+- Download Maven 2 ([http://maven.apache.org/download.html]). See the installation instructions on this page.
+- Dowload Eclipse from [http://www.eclipse.org]
+- In Eclipse, you have to create a new classpath variable called M2_REPO which references the maven 2 repository (by default, it is the directory _$user home/.m2/repository_).
+
+h2. Download the OCM project
+
+You can download the OCM project from [here|^5minutes.zip].
+
+h2. Install the project
+
+- Extract the project distribution anywhere on your local machine.
+- Open a command terminal and change the current directory to the project root folder.
+- Execute "mvn clean compile". This is an optional step to check if the code can be compiled correctly.
+
+h2. Get ready for Eclipse
+
+- Execute "mvn eclipse:eclipse" from the project root folder. By this way, you project can be imported into Eclipse.
+- Start Eclipse and import the project (menu File/import, select general/existing project in the workspace, than select the project root directory).
+
+Now you are ready to modify the project from Eclipse.
+
+h2. Review the project
+
+This project is a standalone java application (see the class org.apache.jackrabbit.ocm.Main) which is creating, retrieving and deleting a PressRelease (see the class org.apache.jackrabbit.ocm.model.PressRelease).For simplicity reason, this application is using a TransientRepository but  you can change the repository configuration from the class RepositoryUtil. 
+
+
+You can read the tutorial [5' with Jackrabbit OCM] to get more information on how to  initialize the [Object Content Manager] and how to persist the PressRelease Object.

Propchange: jackrabbit/site/trunk/content/a-simple-ocm-project-with-maven-&-eclipse.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/advanced-mapping-strategies.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/advanced-mapping-strategies.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/advanced-mapping-strategies.cwiki (added)
+++ jackrabbit/site/trunk/content/advanced-mapping-strategies.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,45 @@
+h2. Inheritance
+
+TODO
+
+h2. Interface
+
+TODO
+
+h2. Components
+
+A component is an entity that cannot live by its own, but has a logical meaning. Take for example an Address. It may live alone, but doesn't make much sense in some systems. Once associated with an User it starts making sense. Now, as in RDBMS you can choose the persist this as a record in a separate table with a 1-1 relation, or you may choose to persist Address field along with the User.
+
+Now, returning to JCR, the component is fitting perfectly the mixin notion. A mixin cannot live by its own in the repository. It is associated with some node. It's properties are added to the set of original node.
+
+h2. Group some bean attributes into a subnode
+
+TODO
+
+h2. Map to another node structure
+
+Sometime, it should be interesting to map to a different jcr node structure. Here is an example, for a class "File", we can have:
+
+{code}
+public class File
+{
+  private String mimeType;
+  private String encoding;
+  private InputStream data;
+  private Calendar lastModified;
+  // Add getters/setters
+}
+{code}
+
+and in terms of JCR structure, we can have:
+
+{code}
+nt:file
+  jcr:content
+    jcr:mimeType
+    jcr:encoding
+    jcr:data
+    jcr:lastModified
+{code}
+
+So, the jcr:content node is an extra node to specify in the mapping file.

Propchange: jackrabbit/site/trunk/content/advanced-mapping-strategies.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/advanced-mapping-strategies.mdtext
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/advanced-mapping-strategies.mdtext?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/advanced-mapping-strategies.mdtext (added)
+++ jackrabbit/site/trunk/content/advanced-mapping-strategies.mdtext Tue Jan 10 18:50:59 2012
@@ -0,0 +1,59 @@
+Title: Advanced Mapping Strategies
+<a name="AdvancedMappingStrategies-Inheritance"></a>
+## Inheritance
+
+TODO
+
+<a name="AdvancedMappingStrategies-Interface"></a>
+## Interface
+
+TODO
+
+<a name="AdvancedMappingStrategies-Components"></a>
+## Components
+
+A component is an entity that cannot live by its own, but has a logical
+meaning. Take for example an Address. It may live alone, but doesn't make
+much sense in some systems. Once associated with an User it starts making
+sense. Now, as in RDBMS you can choose the persist this as a record in a
+separate table with a 1-1 relation, or you may choose to persist Address
+field along with the User.
+
+Now, returning to JCR, the component is fitting perfectly the mixin notion.
+A mixin cannot live by its own in the repository. It is associated with
+some node. It's properties are added to the set of original node.
+
+<a name="AdvancedMappingStrategies-Groupsomebeanattributesintoasubnode"></a>
+## Group some bean attributes into a subnode
+
+TODO
+
+<a name="AdvancedMappingStrategies-Maptoanothernodestructure"></a>
+## Map to another node structure
+
+Sometime, it should be interesting to map to a different jcr node
+structure. Here is an example, for a class "File", we can have:
+
+
+    public class File
+    {
+      private String mimeType;
+      private String encoding;
+      private InputStream data;
+      private Calendar lastModified;
+      // Add getters/setters
+    }
+
+
+and in terms of JCR structure, we can have:
+
+
+    nt:file
+      jcr:content
+        jcr:mimeType
+        jcr:encoding
+        jcr:data
+        jcr:lastModified
+
+
+So, the jcr:content node is an extra node to specify in the mapping file.

Propchange: jackrabbit/site/trunk/content/advanced-mapping-strategies.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/apache-jackrabbit-resolution.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/apache-jackrabbit-resolution.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/apache-jackrabbit-resolution.cwiki (added)
+++ jackrabbit/site/trunk/content/apache-jackrabbit-resolution.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,76 @@
+From the [minutes|http://www.apache.org/foundation/records/minutes/2006/board_minutes_2006_03_15.txt] of the Apache board meeting on March 15th, 2006:
+
+{noformat}
+ 6. Special Orders
+
+    A. Establish the Apache Jackrabbit Project
+
+       WHEREAS, the Board of Directors deems it to be in the best
+       interests of the Foundation and consistent with the
+       Foundation's purpose to establish a Project Management
+       Committee charged with the creation and maintenance of
+       open-source software related to the Content Repository for Java
+       Technology API and its implementation as the Apache Jackrabbit
+       content repository, for distribution at no charge to the
+       public.
+
+       NOW, THEREFORE, BE IT RESOLVED, that a Project Management
+       Committee (PMC), to be known as the "Apache Jackrabbit PMC", be
+       and hereby is established pursuant to Bylaws of the Foundation;
+       and be it further
+
+       RESOLVED, that the Apache Jackrabbit PMC be and hereby is
+       responsible for the creation and maintenance of open-source
+       software and documentation related to the Content Repository
+       for Java Technology API and its implementation as the Apache
+       Jackrabbit content repository and tool sets, based on software
+       licensed to the Foundation; and be it further
+
+       RESOLVED, that the office of "Vice President, Apache
+       Jackrabbit" be and hereby is created, the person holding such
+       office to serve at the direction of the Board of Directors as
+       the chair of the Apache Jackrabbit PMC, and to have primary
+       responsibility for management of the projects within the scope
+       of responsibility of the Apache Jackrabbit PMC; and be it
+       further
+
+       RESOLVED, that the persons listed immediately below be and
+       hereby are appointed to serve as the initial members of the
+       Apache Jackrabbit PMC:
+
+         Tobias Bocanegra   <tobias.bocanegra@day.com>
+         Roy T. Fielding    <fielding@gbiv.com>
+         Stefan Guggisberg  <stefan.guggisberg@gmail.com>
+         Serge Huber        <shuber2@jahia.com>
+         Felix Meschberger  <Felix.Meschberger@day.com>
+         Brian Moseley      <bcm@osafoundation.org>
+         David Nuescheler   <david.nuescheler@gmail.com>
+         Dominique Pfister  <dominique.pfister@day.com>
+         Peeter Piegaze     <peeter.piegaze@day.com>
+         Edgar Poce         <edgarpoce@gmail.com>
+         Marcel Reutegger   <marcel.reutegger@gmx.net>
+         Paul Russell       <prussell@apache.org>
+         Angela Schreiber   <anchela@day.com>
+         Sylvain Wallez     <sylvain@apache.org>
+         Jukka Zitting      <jukka.zitting@gmail.com>
+
+       NOW, THEREFORE, BE IT FURTHER RESOLVED, that Roy T. Fielding be
+       appointed to the office of Vice President, Jackrabbit, to serve
+       in accordance with and subject to the direction of the Board of
+       Directors and the Bylaws of the Foundation until death,
+       resignation, retirement, removal or disqualification, or until
+       a successor is appointed; and be it further
+
+       RESOLVED, that the Apache Jackrabbit PMC be and hereby is
+       tasked with the creation of a set of bylaws intended to
+       encourage open development and increased participation in the
+       Apache Jackrabbit Project; and be it further
+
+       RESOLVED, that the Apache Incubator PMC shall, upon deciding
+       that the Jackrabbit incubating project has graduated, transfer
+       all oversight and responsibility for the Jackrabbit incubating
+       project and its artifacts to the Apache Jackrabbit PMC.
+
+       Resolution 6A, Establish the Apache Jackrabbit Project,
+       was approved by Unanimous Vote.
+{noformat}

Propchange: jackrabbit/site/trunk/content/apache-jackrabbit-resolution.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/apache-jackrabbit-resolution.mdtext
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/apache-jackrabbit-resolution.mdtext?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/apache-jackrabbit-resolution.mdtext (added)
+++ jackrabbit/site/trunk/content/apache-jackrabbit-resolution.mdtext Tue Jan 10 18:50:59 2012
@@ -0,0 +1,78 @@
+Title: Apache Jackrabbit Resolution
+From the [minutes](http://www.apache.org/foundation/records/minutes/2006/board_minutes_2006_03_15.txt)
+ of the Apache board meeting on March 15th, 2006:
+
+
+     6. Special Orders
+    
+        A. Establish the Apache Jackrabbit Project
+    
+           WHEREAS, the Board of Directors deems it to be in the best
+           interests of the Foundation and consistent with the
+           Foundation's purpose to establish a Project Management
+           Committee charged with the creation and maintenance of
+           open-source software related to the Content Repository for Java
+           Technology API and its implementation as the Apache Jackrabbit
+           content repository, for distribution at no charge to the
+           public.
+    
+           NOW, THEREFORE, BE IT RESOLVED, that a Project Management
+           Committee (PMC), to be known as the "Apache Jackrabbit PMC", be
+           and hereby is established pursuant to Bylaws of the Foundation;
+           and be it further
+    
+           RESOLVED, that the Apache Jackrabbit PMC be and hereby is
+           responsible for the creation and maintenance of open-source
+           software and documentation related to the Content Repository
+           for Java Technology API and its implementation as the Apache
+           Jackrabbit content repository and tool sets, based on software
+           licensed to the Foundation; and be it further
+    
+           RESOLVED, that the office of "Vice President, Apache
+           Jackrabbit" be and hereby is created, the person holding such
+           office to serve at the direction of the Board of Directors as
+           the chair of the Apache Jackrabbit PMC, and to have primary
+           responsibility for management of the projects within the scope
+           of responsibility of the Apache Jackrabbit PMC; and be it
+           further
+    
+           RESOLVED, that the persons listed immediately below be and
+           hereby are appointed to serve as the initial members of the
+           Apache Jackrabbit PMC:
+    
+    	 Tobias Bocanegra   <tobias.bocanegra@day.com>
+    	 Roy T. Fielding    <fielding@gbiv.com>
+    	 Stefan Guggisberg  <stefan.guggisberg@gmail.com>
+    	 Serge Huber	    <shuber2@jahia.com>
+    	 Felix Meschberger  <Felix.Meschberger@day.com>
+    	 Brian Moseley	    <bcm@osafoundation.org>
+    	 David Nuescheler   <david.nuescheler@gmail.com>
+    	 Dominique Pfister  <dominique.pfister@day.com>
+    	 Peeter Piegaze     <peeter.piegaze@day.com>
+    	 Edgar Poce	    <edgarpoce@gmail.com>
+    	 Marcel Reutegger   <marcel.reutegger@gmx.net>
+    	 Paul Russell	    <prussell@apache.org>
+    	 Angela Schreiber   <anchela@day.com>
+    	 Sylvain Wallez     <sylvain@apache.org>
+    	 Jukka Zitting	    <jukka.zitting@gmail.com>
+    
+           NOW, THEREFORE, BE IT FURTHER RESOLVED, that Roy T. Fielding be
+           appointed to the office of Vice President, Jackrabbit, to serve
+           in accordance with and subject to the direction of the Board of
+           Directors and the Bylaws of the Foundation until death,
+           resignation, retirement, removal or disqualification, or until
+           a successor is appointed; and be it further
+    
+           RESOLVED, that the Apache Jackrabbit PMC be and hereby is
+           tasked with the creation of a set of bylaws intended to
+           encourage open development and increased participation in the
+           Apache Jackrabbit Project; and be it further
+    
+           RESOLVED, that the Apache Incubator PMC shall, upon deciding
+           that the Jackrabbit incubating project has graduated, transfer
+           all oversight and responsibility for the Jackrabbit incubating
+           project and its artifacts to the Apache Jackrabbit PMC.
+    
+           Resolution 6A, Establish the Apache Jackrabbit Project,
+           was approved by Unanimous Vote.
+

Propchange: jackrabbit/site/trunk/content/apache-jackrabbit-resolution.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/application-bundle-howto.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/application-bundle-howto.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/application-bundle-howto.cwiki (added)
+++ jackrabbit/site/trunk/content/application-bundle-howto.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,53 @@
+This document describes how to setup a Jackrabbit content repository in the deployment model 1; The (Web-) Application Bundle. In this deployment model, each application bundle uses its own local content repository that is not visible to other applications. See the {JCR client application HOWTO] for instructions on how to use the configured content repository.
+
+Note that it is also possible to bypass the JNDI mechanism by including all the Jackrabbit startup and configuration code directly in your application. This approach however makes a strong binding between your application and the underlying repository implementation.
+
+The instructions in this document apply to Tomcat versions 4.x and 5.x. It should be easy to modify the instructions for other container environments.
+
+Important: remember that two Jackrabbit instances should never read from/write to the same physical storage. This setup is not supported and will lead to corrupt data.
+
+h2. Tomcat instructions
+
+Follow the steps below to setup a model 1 Jackrabbit deployment for your web application in Tomcat 4.x or 5.x. Example code for both versions of Tomcat is included after this overview.
+
+# Place the Jackrabbit jar file and all the dependencies (including the JCR API jar file) under _Tomcat folder_/webapps/_your app_/WEB-INF/lib.
+# Register a bindable repository factory in the context scope. Configure the Java class name of the factory implementation, as well as the repository configuration file path and the repository home directory path. Use the full path in both cases.
+
+Limitations: the application should not be redeployed during the same JVM process to avoid creating duplicate Jackrabbit instances with the same configuration. In case you want to redeploy your application be sure to shutdown the repository when your application is undeployed. It can be done by calling RepositoryImpl.shutdown() (e.g. in the destroy() method of a servlet).
+
+h3. Step 2 - Context configuration
+
+In Tomcat 4.x and 5.0, add the following snippet in server.xml under the Context element of your web application.
+
+{code}
+<Resource name="jcr/repository"
+          auth="Container"
+          type="javax.jcr.Repository"/>
+
+<ResourceParams name="jcr/repository">
+  <parameter>
+    <name>factory</name>
+    <value>org.apache.jackrabbit.core.jndi.BindableRepositoryFactory</value>
+  </parameter>
+  <parameter>
+    <name>configFilePath</name>
+    <value>[full path to repository.xml]</value>
+  </parameter>
+  <parameter>
+    <name>repHomeDir</name>
+    <value>[full path to the repository home folder]</value>
+  </parameter>
+</ResourceParams>
+{code}
+
+In Tomcat 5.5, add the following snippet in your application's WEB-INF/context.xml or $CATALINA_HOME/conf/_enginename_/_hostname_/_webappname_.xml. If you prefer central configuration, you can add the configuration to the Host Context section in the server.xml.
+
+{code}
+<Resource name="jcr/repository"
+          auth="Container"
+          type="javax.jcr.Repository"
+          factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
+          configFilePath="[full path to repository.xml"
+          repHomeDir="[full path to the repository home folder]"/>
+{code}
+

Propchange: jackrabbit/site/trunk/content/application-bundle-howto.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/application-bundle-howto.mdtext
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/application-bundle-howto.mdtext?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/application-bundle-howto.mdtext (added)
+++ jackrabbit/site/trunk/content/application-bundle-howto.mdtext Tue Jan 10 18:50:59 2012
@@ -0,0 +1,84 @@
+Title: Application Bundle HOWTO
+This document describes how to setup a Jackrabbit content repository in the deployment model 1; The (Web-) Application Bundle. In this deployment model, each application bundle uses its own local content repository that is not visible to other applications. See the {JCR client application HOWTO]
+ for instructions on how to use the configured content repository.
+
+Note that it is also possible to bypass the JNDI mechanism by including all
+the Jackrabbit startup and configuration code directly in your application.
+This approach however makes a strong binding between your application and
+the underlying repository implementation.
+
+The instructions in this document apply to Tomcat versions 4.x and 5.x. It
+should be easy to modify the instructions for other container environments.
+
+Important: remember that two Jackrabbit instances should never read
+from/write to the same physical storage. This setup is not supported and
+will lead to corrupt data.
+
+<a name="ApplicationBundleHOWTO-Tomcatinstructions"></a>
+## Tomcat instructions
+
+Follow the steps below to setup a model 1 Jackrabbit deployment for your
+web application in Tomcat 4.x or 5.x. Example code for both versions of
+Tomcat is included after this overview.
+
+1. Place the Jackrabbit jar file and all the dependencies (including the JCR
+API jar file) under _Tomcat folder_/webapps/_your app_/WEB-INF/lib.
+1. Register a bindable repository factory in the context scope. Configure
+the Java class name of the factory implementation, as well as the
+repository configuration file path and the repository home directory path.
+Use the full path in both cases.
+
+Limitations: the application should not be redeployed during the same JVM
+process to avoid creating duplicate Jackrabbit instances with the same
+configuration. In case you want to redeploy your application be sure to
+shutdown the repository when your application is undeployed. It can be done
+by calling RepositoryImpl.shutdown() (e.g. in the destroy() method of a
+servlet).
+
+<a name="ApplicationBundleHOWTO-Step2-Contextconfiguration"></a>
+### Step 2 - Context configuration
+
+In Tomcat 4.x and 5.0, add the following snippet in server.xml under the
+Context element of your web application.
+
+
+    <Resource name="jcr/repository"
+    	  auth="Container"
+    	  type="javax.jcr.Repository"/>
+    
+    <ResourceParams name="jcr/repository">
+      <parameter>
+        <name>factory</name>
+       
+<value>org.apache.jackrabbit.core.jndi.BindableRepositoryFactory</value>
+      </parameter>
+      <parameter>
+        <name>configFilePath</name>
+        <value>[full path to repository.xml]
+</value>
+      </parameter>
+      <parameter>
+        <name>repHomeDir</name>
+        <value>[full path to the repository home folder]
+</value>
+      </parameter>
+    </ResourceParams>
+
+
+In Tomcat 5.5, add the following snippet in your application's
+WEB-INF/context.xml or
+$CATALINA_HOME/conf/_enginename_/_hostname_/_webappname_.xml. If you prefer
+central configuration, you can add the configuration to the Host Context
+section in the server.xml.
+
+
+    <Resource name="jcr/repository"
+    	  auth="Container"
+    	  type="javax.jcr.Repository"
+    	 
+factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
+    	  configFilePath="[full path to repository.xml"
+              repHomeDir="[full path to the repository home folder]
+"/>
+
+

Propchange: jackrabbit/site/trunk/content/application-bundle-howto.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/articles.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/articles.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/articles.cwiki (added)
+++ jackrabbit/site/trunk/content/articles.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,24 @@
+This page contains links to the latest articles and presentations on JCR and Jackrabbit. It is meant as an entry point for any newcommers to JCR and Jackrabbit.
+
+For a complete version of this list and also an extensive list of tools and applications built on Jackrabbit, please visit the [links page|http://wiki.apache.org/jackrabbit/JcrLinks] on the wiki.
+
+h2. General
+* Java Community Process: [JSR 170|http://jcp.org/en/jsr/detail?id=170] and [JSR 283|http://jcp.org/en/jsr/detail?id=283]
+* An easy way to see Jackrabbit in action is to go throught the [First Hops] tutorial.
+
+h2. Articles
+* Bertrand Delacretaz, "[Java Content Repository: The Best Of Both Worlds|http://java.dzone.com/articles/java-content-repository-best]" (January, 2010) Javalobby
+* Bertil Chapuis, "[JCR or RDBMS - why, when, how?|http://www.scribd.com/doc/11163161/JCR-or-RDBMS-why-when-how]" (December, 2008) scribd.com
+* Jochen Toppe, "[JCR Primer|http://jtoee.com/jsr-170/]" (December, 2008) Jochen Toppe's Blog
+* Thomas Hug, "[JCR appears in Top 10 Technologies|http://ctpjava.blogspot.com/2008/09/top-10-java-technologies-at-cambridge.html]" (September, 2008) CTP Java Community
+* Douglas Jose, "[Adding JCR support to your existing web application|http://ctpjava.blogspot.com/2008/09/adding-jcr-support-to-your-existing-web.html]" (September, 2008) CTP Java Community
+* David Dossot, "[Content Oriented Integration Solutions With Mule and JCR|http://www.theserverside.com/tt/articles/article.tss?l=COISWithMuleandJCR]" (June, 2008) TheServerSide.COM
+* Michael Duerig, "[JCR with Scala|http://dev.day.com/microsling/content/blogs/main/scalajcr.html]" (January, 2008) dev.day.com
+* Michael Marth, "[Scripting a Java Content Repository with JRuby|http://dev.day.com/microsling/content/blogs/main/jrubyjcr.html]" (January 2008) dev.day.com
+
+h2. Interviews
+* David Nuescheler, "[on JCR and REST|http://www.infoq.com/articles/nuescheler-jcr-rest]" (InfoQ, June 2008)
+
+
+h2. Presentations
+* Michael Marth and David Nuescheler, "[Kickstarting JCR: TheServerSide.com as a Content Application|http://www.slideshare.net/uncled/theserverside-kickstarting-jcr]" (March 27, 2008) [TSSJS'08|http://javasymposium.techtarget.com/lasvegas/persistence.html#DNueschelerJCR]
\ No newline at end of file

Propchange: jackrabbit/site/trunk/content/articles.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/articles.mdtext
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/articles.mdtext?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/articles.mdtext (added)
+++ jackrabbit/site/trunk/content/articles.mdtext Tue Jan 10 18:50:59 2012
@@ -0,0 +1,45 @@
+Title: Articles
+This page contains links to the latest articles and presentations on JCR
+and Jackrabbit. It is meant as an entry point for any newcommers to JCR and
+Jackrabbit.
+
+For a complete version of this list and also an extensive list of tools and
+applications built on Jackrabbit, please visit the [links page](http://wiki.apache.org/jackrabbit/JcrLinks)
+ on the wiki.
+
+<a name="Articles-General"></a>
+## General
+* Java Community Process: [JSR 170](http://jcp.org/en/jsr/detail?id=170)
+ and [JSR 283|http://jcp.org/en/jsr/detail?id=283]
+* An easy way to see Jackrabbit in action is to go throught the [First Hops](first-hops.html)
+ tutorial.
+
+<a name="Articles-Articles"></a>
+## Articles
+* Bertrand Delacretaz, "[Java Content Repository: The Best Of Both Worlds](http://java.dzone.com/articles/java-content-repository-best)
+" (January, 2010) Javalobby
+* Bertil Chapuis, "[JCR or RDBMS - why, when, how?](http://www.scribd.com/doc/11163161/JCR-or-RDBMS-why-when-how)
+" (December, 2008) scribd.com
+* Jochen Toppe, "[JCR Primer](http://jtoee.com/jsr-170/)
+" (December, 2008) Jochen Toppe's Blog
+* Thomas Hug, "[JCR appears in Top 10 Technologies](http://ctpjava.blogspot.com/2008/09/top-10-java-technologies-at-cambridge.html)
+" (September, 2008) CTP Java Community
+* Douglas Jose, "[Adding JCR support to your existing web application](http://ctpjava.blogspot.com/2008/09/adding-jcr-support-to-your-existing-web.html)
+" (September, 2008) CTP Java Community
+* David Dossot, "[Content Oriented Integration Solutions With Mule and JCR](http://www.theserverside.com/tt/articles/article.tss?l=COISWithMuleandJCR)
+" (June, 2008) TheServerSide.COM
+* Michael Duerig, "[JCR with Scala](http://dev.day.com/microsling/content/blogs/main/scalajcr.html)
+" (January, 2008) dev.day.com
+* Michael Marth, "[Scripting a Java Content Repository with JRuby](http://dev.day.com/microsling/content/blogs/main/jrubyjcr.html)
+" (January 2008) dev.day.com
+
+<a name="Articles-Interviews"></a>
+## Interviews
+* David Nuescheler, "[on JCR and REST](http://www.infoq.com/articles/nuescheler-jcr-rest)
+" (InfoQ, June 2008)
+
+
+<a name="Articles-Presentations"></a>
+## Presentations
+* Michael Marth and David Nuescheler, "[Kickstarting JCR: TheServerSide.com as a Content Application](http://www.slideshare.net/uncled/theserverside-kickstarting-jcr)
+" (March 27, 2008) [TSSJS'08|http://javasymposium.techtarget.com/lasvegas/persistence.html#DNueschelerJCR]

Propchange: jackrabbit/site/trunk/content/articles.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/basic-ocm-operations.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/basic-ocm-operations.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/basic-ocm-operations.cwiki (added)
+++ jackrabbit/site/trunk/content/basic-ocm-operations.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,33 @@
+When you have created a new [Object Content Manager] in your application, you can use this component to insert, update, delete and retrieve objects. The class 'Folder' used in the following sections has to be annoted or defined in a xml file class descriptor.
+
+This page describes only the main [Object Content Manager] methods. You can see the javadoc to get more information on the API.
+You can also read the tutorial [5' with Jackrabbit OCM] to get more information on how to initialize the [Object Content Manager] (ocm).
+
+h2. Insert
+
+{code}
+Folder folder =  new Folder();
+folder.setPath("/myfolder");
+folder.set...(); // call the setter methods
+
+ocm.insert(myFolder);
+{code}
+
+h2. Retrieve and update an object
+
+{code}
+Folder folder = (Folder) persistenceManager.getObject(Folder.class, "/myfolder");
+folder.set...(); // call the setter methods
+
+ocm.update(myFolder);
+{code}
+
+h2. Delete
+
+{code}
+ocm.remove("/test");
+{code}
+
+h2. Save last changes
+
+After some inserts, deletes and/or updates, you can call the method *ocm.save()* to apply your changes into the JCR repository.

Propchange: jackrabbit/site/trunk/content/basic-ocm-operations.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/basic-ocm-operations.mdtext
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/basic-ocm-operations.mdtext?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/basic-ocm-operations.mdtext (added)
+++ jackrabbit/site/trunk/content/basic-ocm-operations.mdtext Tue Jan 10 18:50:59 2012
@@ -0,0 +1,46 @@
+Title: Basic OCM operations
+When you have created a new [Object Content Manager](object-content-manager.html)
+ in your application, you can use this component to insert, update, delete
+and retrieve objects. The class 'Folder' used in the following sections has
+to be annoted or defined in a xml file class descriptor.
+
+This page describes only the main [Object Content Manager](object-content-manager.html)
+ methods. You can see the javadoc to get more information on the API.
+You can also read the tutorial [5' with Jackrabbit OCM](5'-with-jackrabbit-ocm.html)
+ to get more information on how to initialize the [Object Content Manager]
+ (ocm).
+
+<a name="BasicOCMoperations-Insert"></a>
+## Insert
+
+
+    Folder folder =  new Folder();
+    folder.setPath("/myfolder");
+    folder.set...(); // call the setter methods
+    
+    ocm.insert(myFolder);
+
+
+<a name="BasicOCMoperations-Retrieveandupdateanobject"></a>
+## Retrieve and update an object
+
+
+    Folder folder = (Folder) persistenceManager.getObject(Folder.class,
+"/myfolder");
+    folder.set...(); // call the setter methods
+    
+    ocm.update(myFolder);
+
+
+<a name="BasicOCMoperations-Delete"></a>
+## Delete
+
+
+    ocm.remove("/test");
+
+
+<a name="BasicOCMoperations-Savelastchanges"></a>
+## Save last changes
+
+After some inserts, deletes and/or updates, you can call the method
+*ocm.save()* to apply your changes into the JCR repository.

Propchange: jackrabbit/site/trunk/content/basic-ocm-operations.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/building-jackrabbit.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/building-jackrabbit.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/building-jackrabbit.cwiki (added)
+++ jackrabbit/site/trunk/content/building-jackrabbit.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,32 @@
+The easiest way to use Jackrabbit is to [download|http://jackrabbit.apache.org/download.cgi] a binary release, but if you want to access the latest development version, you need to get the Jackrabbit sources and build them using the [Maven 2|http://maven.apache.org/] build environment.
+
+The first step in building Jackrabbit is to check out the Jackrabbit sources from the [Subversion|http://subversion.tigris.org/] source repository at [http://svn.apache.org/repos/asf/jackrabbit/]. The source tree is divided in standard parts: [trunk|http://svn.apache.org/repos/asf/jackrabbit/trunk/], [branches|http://svn.apache.org/repos/asf/jackrabbit/branches/], [tags|http://svn.apache.org/repos/asf/jackrabbit/tags/] and [commons|http://svn.apache.org/repos/asf/jackrabbit/commons/] ([more info about commons|http://jackrabbit.apache.org/commons/]). The latest development version is found within trunk, while the other parts are used to keep track of the source code of the Jackrabbit releases.
+
+The trunk contains the top-level build environment and a number of [component projects|Jackrabbit Components] within subdirectories. See the README.txt files within each subdirectory for a brief description of the component project. There is also a [sandbox|http://svn.apache.org/repos/asf/jackrabbit/sandbox/] directory with miscellaneous contributions that are not yet a part of the official Jackrabbit releases.
+
+
+h2. Checking out the sources with Subversion
+
+You need a [Subversion|http://subversion.tigris.org/] client to access the Jackrabbit source repository. Take a look at the [Subversion client list|http://subversion.tigris.org/project_links.html#clients] unless you already have a one installed. Once you have the Subversion client installed you can checkout the main Jackrabbit source tree with the following command or its equivalent in the client you are using:
+{code}
+svn checkout http://svn.apache.org/repos/asf/jackrabbit/trunk jackrabbit
+{code}
+The above checkout will create a subdirectory named jackrabbit that contains the latest Jackrabbit sources. See the [Subversion book|http://svnbook.red-bean.com/] or the documentation of your Subversion client for more information on how to manage your source tree and keep it up to date with latest development.
+
+
+h2. Building the sources with Maven
+
+Jackrabbit uses [Maven 2|http://maven.apache.org/] as the build system and the component sources are mostly organized according to the Maven [Standard Directory Layout|http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html].
+The standard build environment is Maven 2 with the Java Development Kit (JDK) 1.5 (but the build is known to work also with Java 6).
+
+{info:title=Jackrabbit 1.x}
+The standard build environment for 1.x versions is Maven 2 with the Java Development Kit (JDK) *1.4* (but the build is known to work also with Java 5 and 6).
+{info}
+
+See the [Running Maven|http://maven.apache.org/run-maven/index.html] page and the related documentation on the Maven web site for instructions on how to use Maven. You may also want to check for Maven 2 integration with your favourite Integrated Development Environment (IDE).
+
+There are Maven project descriptors (POMs) within both the top level jackrabbit directory you checked out above and all the jackrabbit\-_something_ component subdirectories. The easiest way to build Jackrabbit is to use the "multimodule" setup within the top level directory:
+{code}
+$ cd /path/to/jackrabbit; mvn install
+{code}
+This will build and package all the component projects and place the resulting artifacts within your local Maven 2 repository. You can also find the artifacts within the created target subdirectories of the component projects.
\ No newline at end of file

Propchange: jackrabbit/site/trunk/content/building-jackrabbit.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/building-jackrabbit.mdtext
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/building-jackrabbit.mdtext?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/building-jackrabbit.mdtext (added)
+++ jackrabbit/site/trunk/content/building-jackrabbit.mdtext Tue Jan 10 18:50:59 2012
@@ -0,0 +1,74 @@
+Title: Building Jackrabbit
+The easiest way to use Jackrabbit is to [download](http://jackrabbit.apache.org/download.cgi)
+ a binary release, but if you want to access the latest development
+version, you need to get the Jackrabbit sources and build them using the [Maven 2|http://maven.apache.org/]
+ build environment.
+
+The first step in building Jackrabbit is to check out the Jackrabbit
+sources from the [Subversion](http://subversion.tigris.org/)
+ source repository at [http://svn.apache.org/repos/asf/jackrabbit/]
+. The source tree is divided in standard parts: [trunk|http://svn.apache.org/repos/asf/jackrabbit/trunk/]
+, [branches|http://svn.apache.org/repos/asf/jackrabbit/branches/]
+, [tags|http://svn.apache.org/repos/asf/jackrabbit/tags/]
+ and [commons|http://svn.apache.org/repos/asf/jackrabbit/commons/]
+ ([more info about commons|http://jackrabbit.apache.org/commons/]). The
+latest development version is found within trunk, while the other parts are
+used to keep track of the source code of the Jackrabbit releases.
+
+The trunk contains the top-level build environment and a number of [component projects](jackrabbit-components.html)
+ within subdirectories. See the README.txt files within each subdirectory
+for a brief description of the component project. There is also a [sandbox|http://svn.apache.org/repos/asf/jackrabbit/sandbox/]
+ directory with miscellaneous contributions that are not yet a part of the
+official Jackrabbit releases.
+
+
+<a name="BuildingJackrabbit-CheckingoutthesourceswithSubversion"></a>
+## Checking out the sources with Subversion
+
+You need a [Subversion](http://subversion.tigris.org/)
+ client to access the Jackrabbit source repository. Take a look at the [Subversion client list|http://subversion.tigris.org/project_links.html#clients]
+ unless you already have a one installed. Once you have the Subversion
+client installed you can checkout the main Jackrabbit source tree with the
+following command or its equivalent in the client you are using:
+
+    svn checkout http://svn.apache.org/repos/asf/jackrabbit/trunk jackrabbit
+
+The above checkout will create a subdirectory named jackrabbit that
+contains the latest Jackrabbit sources. See the [Subversion book](http://svnbook.red-bean.com/)
+ or the documentation of your Subversion client for more information on how
+to manage your source tree and keep it up to date with latest development.
+
+
+<a name="BuildingJackrabbit-BuildingthesourceswithMaven"></a>
+## Building the sources with Maven
+
+Jackrabbit uses [Maven 2](http://maven.apache.org/)
+ as the build system and the component sources are mostly organized
+according to the Maven [Standard Directory Layout|http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html]
+.
+The standard build environment is Maven 2 with the Java Development Kit
+(JDK) 1.5 (but the build is known to work also with Java 6).
+
+{info:title=Jackrabbit 1.x}
+The standard build environment for 1.x versions is Maven 2 with the Java
+Development Kit (JDK) *1.4* (but the build is known to work also with Java
+5 and 6).
+{info}
+
+See the [Running Maven](http://maven.apache.org/run-maven/index.html)
+ page and the related documentation on the Maven web site for instructions
+on how to use Maven. You may also want to check for Maven 2 integration
+with your favourite Integrated Development Environment (IDE).
+
+There are Maven project descriptors (POMs) within both the top level
+jackrabbit directory you checked out above and all the
+jackrabbit\-_something_ component subdirectories. The easiest way to build
+Jackrabbit is to use the "multimodule" setup within the top level
+directory:
+
+    $ cd /path/to/jackrabbit; mvn install
+
+This will build and package all the component projects and place the
+resulting artifacts within your local Maven 2 repository. You can also find
+the artifacts within the created target subdirectories of the component
+projects.

Propchange: jackrabbit/site/trunk/content/building-jackrabbit.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/site/trunk/content/concurrency-control.cwiki
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/concurrency-control.cwiki?rev=1229679&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/concurrency-control.cwiki (added)
+++ jackrabbit/site/trunk/content/concurrency-control.cwiki Tue Jan 10 18:50:59 2012
@@ -0,0 +1,198 @@
+The internal concurrency model in Apache Jackrabbit is fairly complex and a number of deadlock issues have been reported and fixed over the Jackrabbit 1.x release cycle. This document is the result of a design and code review targeted at proactively preventing other similar issues.
+
+This document is about the internal concurrency and synchronization model in Jackrabbit, _not_ about the JCR locking feature. Note that the review that led to this document targeted concurrency control at an architectural level and did not focus much on issues like thread-safety of individual classes or components.
+
+This review is based on Jackrabbit version 1.5 in default configuration.
+
+h2. Architectural background
+
+!arch.jpg|align=right! In terms of concurrency control, the Jackrabbit architecture can roughly be divided to five main layers:
+
+  # Cluster
+  # Repository
+  # Workspace
+  # Session
+  # Transaction
+
+The clustering layer takes care of synchronizing changes across one or more cluster nodes that are each treated as individual repositories that happen to share their content. Concurrency control across different cluster nodes is achieved using a single write lock that a cluster node is required to acquire before it can commit any changes to the shared state. On the other hand all cluster nodes can read the shared content in parallel with no explicit synchronization. Note that since the cluster nodes only share a single lock, a deadlock can not occur between the locks in one node and the ones in another. A single deadlocked node can still potentially block writes to the entire cluster, but the clustering feature can not add any new deadlock scenarios if each node would be deadlock-free by itself.
+
+The repository layer takes care of all global repository state like the node type registry and the version storage. Instead of a single global repository lock, all the repository-wide components have their own synchronization mechanisms. The most notable component from a concurrency control point of view is the version storage, that actually contains two locking mechanisms; one in VersionManagerImpl for high level versioning operations and one in the underlying SharedItemStateManager for controlling access to the underlying persistence mechanism.
+
+A repository consists of one or more workspaces that contain the normal content trees of the repository. Each workspace consists of a few components like the persistence mechanism and the search index. The persistence mechanism is built from a SharedItemStateManager that controls all item operations and a PersistenceManager that persists items in permanent storage. Most persistence managers use Java synchronization or some other locking mechanism for concurrency control, but since they typically don't interact much with other parts of the repository they are not that critical from a global concurrency perspective. On the other hand, the SharedItemStateManager that uses a read-write lock is a key element especially given the way it interacts with the repository-wide version store. Note that since Jackrabbit 1.4 it has been possible to configure locking strategy of the SharedItemStateManager to use a more fine-grained set of locks to allow concurrent write access to different 
 parts of the content tree. This review focuses on the default case of having just a single SharedItemStateManager lock, but from a locking perspective the more fine-grained case is roughly equivalent to having more workspaces and thus the results of this review should still apply.
+
+Each workspace can be accessed by zero or more JCR sessions. Each session contains a transient space that keeps track of all unsaved changes in that session. Since the transient space is local to a session and since a session should only be accessed by one thread at a time, there are few concurrency concerns associated with the use of sessions. However, note that the thread-safety requirements of sessions are in many cases not explicitly enforced by Jackrabbit, so a client that intentionally or accidentally uses a single session from multiple concurrent threads may well end up corrupting the internal state of the session.
+
+Transactions are handled in Jackrabbit by wrapping all item operations (saved transient changes and direct workspace updates, as well as versioning and locking operations) into a sort of a larger transient space that gets persisted only when the transaction is committed. There is no "transaction lock" in Jackrabbit, but transaction support still fundamentally changes Jackrabbit concurrency control as it basically replaces all write operations (and related locking) with the larger commit operation. This transaction mode is only activated when a session is within the context of an XA transaction.
+
+h2. Main synchronization mechanisms
+
+!lock.jpg|align=right! The main synchronization mechanisms in Jackrabbit are the read-write locks in the SharedItemStateManager and VersionManagerImpl classes. Other components also have concurrency control features, for example the LockManagerImpl class (used for handling JCR locks) uses a reentrant lock and the NodeTypeRegistry class relies on Java synchronization. This review focuses on just the two main components as those are by far the most actively used and the ones that could potentially block all access to repository content in case of a deadlock. The three main locks to be concerned about are:
+
+   * "Workspace lock", the read-write lock of the per-workspace SharedItemStateManager
+   * "Versioning lock", the read-write lock of the repository-wide VersionManagerImpl
+   * "Version store lock", the read-write lock of the SharedItemStateManager associated with the version manager
+
+Each of these locks can be locked exclusively for write access or inclusively for read access. In other words, any number of concurrent readers can keep the lock, but any single writer will block out all other readers and writers.
+
+As noted in the section above, the workspace locks may also be collections of more finely grained locks, but this review concentrates on the default case. Note also that each workspace has it's own lock, so even if one workspace is exclusively locked, other workspaces can still be accessed.
+
+h2. Conditions for deadlocks
+
+A deadlock can only occur if the holder of one lock tries to acquire another lock and there is another thread (or a series of other threads) that tries to do the reverse. This situation can only arise if a) locks are acquired in a nested sequence, b) different threads can acquire the nested locks in a different order, and c) at least two exclusive locks are being acquired.
+
+Most operations in Jackrabbit avoid deadlocks in one of the following three ways:
+
+   * Only a single lock is held at a time, breaking condition a. This case covers most of the code doing sanity checks and other preparing work associated with many operations.
+   * In case of nested locks, the code guarded by the inner lock never tries to acquire another lock, breaking condition b. This case covers for example the numerous calls to the underlying persistence managers that typically have their own synchronization mechanism but never call out to other Jackrabbit components except perhaps the namespace registry that also satisfies this condition.
+   * None of the nested locks are exclusive. This covers all read operations in Jackrabbit, so a deadlock can never occur if all clients only read from the repository.
+
+The potentially troublesome cases are two or more concurrent write operations with nested locks, or a write operation with two nested exclusive locks running concurrently with read operations with nested locks. See below for the results of the code review that tried to identify and clear such cases. The acquired write locks are marked in bold to make it easy to spot potential problems.
+
+h2. Code review
+
+This section contains the results of a code review whose purpose was to identify the order and nesting of the locks acquired by many common operations in Jackrabbit. The results of the review were compared to the above conditions for deadlock.
+
+Note that the descriptions of the write operations below assume non-transactional context. See the last subsection for the behaviour in transactional environments.
+
+h3. Normal read access
+
+Read access to the workspace typically only requires a read lock on the SharedItemStateManager of that workspace, but since the version store is mapped to the virtual /jcr:system/jcr:versionStorage inside the repository, there are cases where also the read lock of the version store needs to be acquired.
+
+   # Workspace read lock, for reading normal node content
+       ## Version store read lock, for reading version content
+
+This nested lock is potentially unsafe in a transactional context, see the subsection on transaction commit below for more details.
+
+h3. Versioning read access
+
+Some version accesses are handled directly through the version manager instead of looking through the /jcr:system/jcr:versionStorage tree. Such accessed are guarded with the VersionManagerImpl read lock.
+
+   # Versioning read lock, for accessing version information
+      ## Version store read lock, for reading version information
+
+The nested lock here is safe as the version store lock never covers code that tries to acquire the versioning lock.
+
+h3. Transient changes
+
+All transient changes like those created by Node.addNode() or Session.move() are stored in the session-local transient space without needing any synchronization except for the read locks used for accessing the underlying workspace state. A write lock is only needed when the accumulated changes are being persisted using the save() call described below.
+
+h3. Save
+
+The ItemImpl.save() method (that SessionImpl.save() also calls) collects all current transient changes to a single change log that is then persisted as an atomic update. Any new versionable nodes will cause empty version histories to be created in the version store. Note that ItemImpl.save() is synchronized on the current session, enforcing the rule that no two threads should be concurrently using the same session.
+
+   # Workspace read lock, for sanity checks and other preliminary work
+   # Multiple non-overlapping instances of (only when creating new version histories)
+      ## Workspace read lock, for checking the current state of the nodes being modified
+      ## Version store read lock, for checking whether a version history already exists
+      ## Versioning *write lock*, for creating a new version history
+         ### Version store *write lock*, for persisting the version history
+   # Workspace *write lock*, for persisting the changes
+      ## Version store read lock, for checking references
+      ## Version store *write lock*, for persisting updated back-references
+
+Many of the other write operations below call ItemImpl.save() internally to persist changes in the current workspace. However, in the descriptions I've only included the last "Workspace write lock" branch (with the "Version store write lock" excluded if it's clear that no back-references need to be updated) as the operations are guaranteed to never contain cases where new version histories would need to be created.
+
+Here we have three cases of nested locks involving one or more exclusive locks:
+
+   * Versioning write lock -> Version store write lock
+   * Workspace write lock -> Version store read lock
+   * Workspace write lock -> Version store write lock
+
+All these nested locks are safe in non-transactional context since the version store lock never covers code that tries to acquire one of the other locks. The same is true for the first case also in transactional context, but see the transaction commit subsection below for a discussion of how the other two cases are different with transactions.
+
+h3. Merge and update
+
+The Node.merge() and Node.update() methods both call NodeImpl.internalMerge() that acquires a new session on the source workspace and copies relevant content to the current workspace.
+
+   # Multiple non-overlapping instances of
+      ## Source workspace read lock, for copying content to the current workspace
+      ## Current workspace read lock, for comparing current status with the one being merged
+   # Current workspace *write lock*, for persisting the changes
+      ## Version store read lock, for checking references
+      ## Version store *write lock*, for persisting updated back-references
+
+The nested locks above are discussed in the section on the save operation.
+
+h3. Copy, clone and move
+
+The various copy(), clone() and move() methods in WorkspaceImpl use the similarly called methods in BatchedItemOperations to perform batch operations within a single workspace or across two workspaces. From a synchronization perspective these operations are much like the merge and update operations above, the difference is mostly that the source workspace may be the same as the current workspace.
+
+   # Multiple non-overlapping instances of
+      ## Source workspace read lock, for copying content to the current workspace
+      ## Current workspace read lock, for comparing current status with the one being copied
+   # Current workspace *write lock*, for persisting the changes
+      ## Version store read lock, for checking references
+      ## Version store *write lock*, for persisting updated back-references
+
+The nested locks above are discussed in the section on the save operation.
+
+h3. Checkin
+
+The NodeImpl.checkin() method first creates a new version of the node in the shared version store and then updates the appropriate mix:versionable properties of the node.
+
+   # Workspace read lock, for sanity checks and other preliminary work
+   # Versioning *write lock*, for creating the new version in the version store
+      ## Workspace read lock, for copying content to the new version
+      ## Version store *write lock*, for persisting the new version
+   # Versioning read lock, for accessing the newly created version
+      ## Version store read lock, for reading the new version
+   # Workspace *write lock*, for updating the node with references to the new version
+      ## Version store read lock, for checking references
+      ## Version store *write lock*, for persisting updated back-references
+
+The overlapping lock region above is not troublesome as there are no cases where a versioning lock is acquired within the scope of a workspace lock. Note that there previously were such cases, but this code review shows that all of them have since been solved.
+
+The nested locks above are discussed in the sections on versioning read access and the save operation.
+
+h3. Checkout
+
+The NodeImpl.checkout() method simply does some sanity checks and updates the versioning metadata of the node to reflect the changed state. No access to the shared version store is needed.
+
+   # Workspace read lock, for sanity checks
+   # Workspace *write lock*, for updating the node to reflect the checked out state
+      ## Version store read lock, for checking references
+
+The nested lock above is discussed in the section on the save operation.
+
+h3. Restore
+
+The various Node.restore() and Workspace.restore() methods all end up calling NodeImpl.internalRestore() that copies contents of the selected version back to the workspace. Finally the changes are persisted with a ItempImpl.save() call.
+
+   # Multiple non-overlapping instances of:
+      ## Versioning read lock, for copying content back to the workspace
+      ## Workspace read lock, for comparing the current state with the version being restored
+   # Workspace *write lock*, for persisting the changes
+      ## Version store read lock, for checking references
+      ## Version store *write lock*, for persisting updated back-references
+
+The nested locks above are discussed in the section on the save operation.
+
+h3. Transaction commit
+
+!deadlock.jpg|align=right! As discussed in the architecture section above, a transaction context overrides all the other write operations in favor of the two-phase commit driven by the transaction manager. The Jackrabbit part of a potentially distributed transaction is coordinated by the XASessionImpl class that causes the following locking behavior:
+
+   # Versioning *write lock*, for the entire commit
+      ## Version store *write lock*, for persisting modified version histories
+          ### Workspace *write lock*, for persisting modified content
+
+The curious ordering of the locks is caused by the way the prepare and commit parts of the different transaction components are nested. This nesting of the workspace lock within the version store lock is a bit troublesome in comparison with the nesting in read operations and non-transactional writes where the order of the locks is reverse. The nesting order here can not be easily changed as any new versions and version histories need to be persisted before workspace content that refers to them. Possible solutions could be either to disable or redesign the reference checks done in a transactional context, or to relax transaction semantics by persisting the version history changes already in the prepare phase in which case the version store lock wouldn't need to cover the workspace lock. However, even before this issue is fixed, the impact is quite limited and can easily be worked around by typical clients.
+
+In read operations the version store read lock is only acquired after the workspace lock if reading content in /jcr:system/jcr:versionStorage. Clients that never looks at the /jcr:system/jcr:versionStorage tree and uses the JCR API methods like getVersionHistory() to access version information will not trigger the potential deadlock case.
+
+Write operations can only cause a deadlock when both transactional and non-transactional writes are performed concurrently against the same repository. A repository that is consistently accessed either transactionally or non-transactionally will not trigger this deadlock. Note that this restriction is workspace-specific, i.e. one workspace can safely be written to transactionally even if another workspace is concurrently written to non-transactionally.
+
+h2. Summary and future work
+
+This review shows that while the internal locking behaviour in Jackrabbit is still far from simple, there aren't any major deadlock scenarios remaining. The two issues identified in the review can be easily avoided by following these two rules:
+
+   * Use the JCR versioning API instead of the /jcr:system/jcr:versionStorage tree to access version information
+   * Don't mix concurrent transactional and non-transactional writes to a single workspace
+
+The transaction commit subsection above outlines some possible solutions to make even these workarounds unnecessary.
+
+The following other potential improvements were identified during the code review:
+
+   * Storing the version history back-references in the workspaces that contain the references would simplify a lot of code and remove a major source of interaction between the workspace and version store when updating content. The downside of this change is that removing versions and version histories would be much more difficult as all workspaces would need to be checked for potential references.
+   * The current design contains lots of cases where read locks are acquired and released multiple times in sequence. This is often caused by the need to check the transient space when reading something from the repository. It might be useful to extend the workspace read lock to cover also all the transient spaces even when the transient spaces would still be session-specific.
+   * Adopting a single global repository lock for all per-repository components would simplify lots of code at the expense of some performance.
+

Propchange: jackrabbit/site/trunk/content/concurrency-control.cwiki
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message