You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2012/05/22 10:25:22 UTC

svn commit: r1341347 [1/16] - in /sling/site/trunk: ./ content/ content/tutorials-how-tos/

Author: fmeschbe
Date: Tue May 22 08:25:18 2012
New Revision: 1341347

URL: http://svn.apache.org/viewvc?rev=1341347&view=rev
Log:
SLING-2002 Latest conversion state
  - Tutorials and How-Tos are now a subfolder with the
    parent page listing the children

Added:
    sling/site/trunk/content/accessing-filesystem-resources-extensions-fsresource.mdtext
    sling/site/trunk/content/authentication-actors.mdtext
    sling/site/trunk/content/authentication-authenticationhandler.mdtext
    sling/site/trunk/content/authentication-framework.mdtext
    sling/site/trunk/content/authentication-tasks.mdtext
    sling/site/trunk/content/bundle-resources-extensions-bundleresource.mdtext
    sling/site/trunk/content/content-loading-jcr-contentloader.mdtext
    sling/site/trunk/content/internationalization-support-i18n.mdtext
    sling/site/trunk/content/managing-permissions-jackrabbit-accessmanager.mdtext
    sling/site/trunk/content/managing-users-and-groups-jackrabbit-usermanager.mdtext
    sling/site/trunk/content/manipulating-content-the-slingpostservlet-servlets-post.mdtext
    sling/site/trunk/content/mime-type-support-commons-mime.mdtext
    sling/site/trunk/content/output-rewriting-pipelines-org-apache-sling-rewriter.mdtext
    sling/site/trunk/content/run-modes-org-apache-sling-runmode.mdtext
    sling/site/trunk/content/scheduler-service-commons-scheduler.mdtext
    sling/site/trunk/content/sling-settings-org-apache-sling-settings.mdtext
    sling/site/trunk/content/tutorials-how-tos/
    sling/site/trunk/content/tutorials-how-tos.mdtext
    sling/site/trunk/content/tutorials-how-tos/46-line-blog.mdtext
    sling/site/trunk/content/tutorials-how-tos/getting-resources-and-properties-in-sling.mdtext
    sling/site/trunk/content/tutorials-how-tos/how-to-manage-events-in-sling.mdtext
    sling/site/trunk/content/tutorials-how-tos/installing-and-upgrading-bundles.mdtext
    sling/site/trunk/content/tutorials-how-tos/jackrabbit-persistence.mdtext
    sling/site/trunk/content/tutorials-how-tos/testing-sling-based-applications.mdtext
Removed:
    sling/site/trunk/content/46-line-blog.mdtext
    sling/site/trunk/content/authentication---actors.mdtext
    sling/site/trunk/content/authentication---authenticationhandler.mdtext
    sling/site/trunk/content/authentication---framework.mdtext
    sling/site/trunk/content/authentication---tasks.mdtext
    sling/site/trunk/content/getting-resources-and-properties-in-sling.mdtext
    sling/site/trunk/content/how-to-manage-events-in-sling.mdtext
    sling/site/trunk/content/installing-and-upgrading-bundles.mdtext
    sling/site/trunk/content/jackrabbit-persistence.mdtext
Modified:
    sling/site/trunk/content/adapters.mdtext
    sling/site/trunk/content/apache-sling-commons-thread-pool.mdtext
    sling/site/trunk/content/apache-sling-community-roles-and-processes.mdtext
    sling/site/trunk/content/apache-sling-eventing-and-job-handling.mdtext
    sling/site/trunk/content/apache-sling.mdtext
    sling/site/trunk/content/architecture.mdtext
    sling/site/trunk/content/assembly.mdtext
    sling/site/trunk/content/authentication.mdtext
    sling/site/trunk/content/bundles.mdtext
    sling/site/trunk/content/client-request-logging.mdtext
    sling/site/trunk/content/commons-html-utilities.mdtext
    sling/site/trunk/content/configuration.mdtext
    sling/site/trunk/content/contributing.mdtext
    sling/site/trunk/content/default-mapping-and-rendering.mdtext
    sling/site/trunk/content/dependency-management.mdtext
    sling/site/trunk/content/development.mdtext
    sling/site/trunk/content/discover-sling-in-15-minutes.mdtext
    sling/site/trunk/content/dispatching-requests.mdtext
    sling/site/trunk/content/documentation.mdtext
    sling/site/trunk/content/downloads.mdtext
    sling/site/trunk/content/embedding-sling.mdtext
    sling/site/trunk/content/errorhandling.mdtext
    sling/site/trunk/content/eventing-and-jobs.mdtext
    sling/site/trunk/content/filters.mdtext
    sling/site/trunk/content/form-based-authenticationhandler.mdtext
    sling/site/trunk/content/getting-and-building-sling.mdtext
    sling/site/trunk/content/getting-started.mdtext
    sling/site/trunk/content/groovy-support.mdtext
    sling/site/trunk/content/guides.mdtext
    sling/site/trunk/content/issue-tracker.mdtext
    sling/site/trunk/content/jcr-installer-provider.mdtext
    sling/site/trunk/content/jspc.mdtext
    sling/site/trunk/content/launch-sling.mdtext
    sling/site/trunk/content/links.mdtext
    sling/site/trunk/content/logging.mdtext
    sling/site/trunk/content/mappings-for-resource-resolution.mdtext
    sling/site/trunk/content/maven-archetypes.mdtext
    sling/site/trunk/content/maven-launchpad-plugin.mdtext
    sling/site/trunk/content/maventipsandtricks.mdtext
    sling/site/trunk/content/media.mdtext
    sling/site/trunk/content/monitoring-requests.mdtext
    sling/site/trunk/content/navigation.mdtext
    sling/site/trunk/content/news.mdtext
    sling/site/trunk/content/old-stuff.mdtext
    sling/site/trunk/content/openid-authenticationhandler.mdtext
    sling/site/trunk/content/osgi-installer.mdtext
    sling/site/trunk/content/plugins.mdtext
    sling/site/trunk/content/project-information.mdtext
    sling/site/trunk/content/project-license.mdtext
    sling/site/trunk/content/project-team.mdtext
    sling/site/trunk/content/release-management.mdtext
    sling/site/trunk/content/repository-based-development.mdtext
    sling/site/trunk/content/request-listeners.mdtext
    sling/site/trunk/content/request-parameters.mdtext
    sling/site/trunk/content/request-processing.mdtext
    sling/site/trunk/content/resources.mdtext
    sling/site/trunk/content/scriptengineintegration.mdtext
    sling/site/trunk/content/security.mdtext
    sling/site/trunk/content/servlet-resolution.mdtext
    sling/site/trunk/content/servlets.mdtext
    sling/site/trunk/content/sling-api.mdtext
    sling/site/trunk/content/sling-testing-tools.mdtext
    sling/site/trunk/content/sling.mdtext
    sling/site/trunk/content/the-sling-engine.mdtext
    sling/site/trunk/content/the-sling-launchpad.mdtext
    sling/site/trunk/content/url-decomposition.mdtext
    sling/site/trunk/content/version-policy.mdtext
    sling/site/trunk/content/web-console-extensions.mdtext
    sling/site/trunk/content/wiki.mdtext
    sling/site/trunk/content/wrap-or-decorate-resources.mdtext
    sling/site/trunk/content/xslt-processing-pipeline.mdtext
    sling/site/trunk/readme.txt

Added: sling/site/trunk/content/accessing-filesystem-resources-extensions-fsresource.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/accessing-filesystem-resources-extensions-fsresource.mdtext?rev=1341347&view=auto
==============================================================================
--- sling/site/trunk/content/accessing-filesystem-resources-extensions-fsresource.mdtext (added)
+++ sling/site/trunk/content/accessing-filesystem-resources-extensions-fsresource.mdtext Tue May 22 08:25:18 2012
@@ -0,0 +1,39 @@
+Title: Accessing Filesystem Resources (extensions.fsresource)
+
+# Accessing Filesystem Resources
+
+[TOC]
+
+
+## Introduction
+
+The Filesystem Resource Provider provides access to the operating system's filesystem through the Sling `ResourceResolver`. Multiple locations may be mapped into the resource tree by configuring the filesystem location and the resource tree root path for each location to be mapped.
+
+
+## Resource Types
+
+Files and directories are mapped into the resource tree as regular `Resource` instances whose resource type depends on the actual nature of the mapped filesystem resource:
+
+   * Regular files are assigned the `nt:file` resource type
+   * Directories are assigned the `nt:folder` resource type
+
+
+## Adapters
+
+Filesystem resources extend from Sling's `AbstractResource` class and thus are adaptable to any type for which an `AdapterFactory` is registered supporting file system resources. In addition Filesystem Resources support the following adapters natively:
+
+   * `java.io.File` -- The Java file object providing access to the filesystem file
+   * `java.net.URL` -- A valid `file://` URL to the file. This URL is derived from the `java.io.File` object by calling the `File.toURI().toURL()` sequence.
+   * `java.io.InputStream` -- If the `java.io.File` can be read from (as per `File.canRead()` an `InputStream` to read from the file is returned.
+
+
+
+## Configuration
+
+The Filesystem Resource Provider is configured with OSGi Configuration Admin factory configurtions whose factory PID is `org.apache.sling.fsprovider.internal.FsResourceProvider`. Configuration can be managed using the OSGi Configuration Admin API, through the Web Console or by any other means supporting Configuration Admin configurations.
+
+The following configuration properties must be specified:
+
+| Parameter | Name | Description |
+| Provider Root	| `provider.roots` | Location in the virtual resource tree where the filesystem resources are mapped in. This property must not be an empty string. |
+| Filesystem Root | `provider.file` | Filesystem directory mapped to the virtual resource tree. This property must not be an empty string. If the path is relative it is resolved against `sling.home` or the current working directory. The path may be a file or folder. If the path does not address an existing file or folder, an empty folder is created. |
\ No newline at end of file

Modified: sling/site/trunk/content/adapters.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/adapters.mdtext?rev=1341347&r1=1341346&r2=1341347&view=diff
==============================================================================
--- sling/site/trunk/content/adapters.mdtext (original)
+++ sling/site/trunk/content/adapters.mdtext Tue May 22 08:25:18 2012
@@ -1,36 +1,21 @@
 Title: Adapters
-<a name="Adapters-Adapters"></a>
+
 # Adapters
 
-The *Resource* and *ResourceResolver* interfaces are defined with a
-method *adaptTo*, which adapts the object to other classes. Using this
-mechanism the JCR session of the resource resolver calling the *adaptTo*
-method with the *javax.jcr.Session* class object. Likewise the JCR node
-on which a resource is based can be retrieved by calling the
-*Resource.adaptTo* method with the *javax.jcr.Node* class object.
-
-To use resources as scripts, the *Resource.adaptTo* method must support
-being called with the *org.apache.sling.api.script.SlingScript* class
-object. But of course, we do not want to integrate the script manager with
-the resource resolver. To enable adapting objects to classes which are not
-foreseen by the original implementation, a factory mechanism is used. This
-way, the script manager can provide an adapter factory to adapt
-*Resource* to *SlingScript* objects.
+The `Resource` and `ResourceResolver` interfaces are defined with a method `adaptTo`, which adapts the object to other classes. Using this mechanism the JCR session of the resource resolver calling the `adaptTo` method with the `javax.jcr.Session` class object. Likewise the JCR node on which a resource is based can be retrieved by calling the `Resource.adaptTo` method with the `javax.jcr.Node` class object.
+
+To use resources as scripts, the `Resource.adaptTo` method must support being called with the `org.apache.sling.api.script.SlingScript` class object. But of course, we do not want to integrate the script manager with the resource resolver. To enable adapting objects to classes which are not foreseen by the original implementation, a factory mechanism is used. This way, the script manager can provide an adapter factory to adapt `Resource` to `SlingScript` objects.
 
 
-<a name="Adapters-Adaptable"></a>
 ## Adaptable
 
-The *Adaptable* interface defines the API to be implemented by a class
-providing adaptability to another class. The single method defined by this
-interface is
+The `Adaptable` interface defines the API to be implemented by a class providing adaptability to another class. The single method defined by this interface is
 
 
     /**
      * Adapts the adaptable to another type.
      * <p>
-     * Please not that it is explicitly left as an implementation detail
-whether
+     * Please not that it is explicitly left as an implementation detail whether
      * each call to this method with the same <code>type</code> yields the same
      * object or a new object on each call.
      * <p>
@@ -39,41 +24,31 @@ whether
      * instance on each call.
      *
      * @param <AdapterType> The generic type to which this resource is adapted
-     *	      to
+     *            to
      * @param type The Class object of the target type, such as
-     *	      <code>javax.jcr.Node.class</code> or
-     *	      <code>java.io.File.class</code>
+     *            <code>javax.jcr.Node.class</code> or
+     *            <code>java.io.File.class</code>
      * @return The adapter target or <code>null</code> if the resource cannot
-     *	   adapt to the requested type
+     *         adapt to the requested type
      */
     <AdapterType> AdapterType adaptTo(Class<AdapterType> type);
 
 
-This method is called to get a view of the same object in terms of another
-class. Examples of implementations of this method is the Sling
-*ResourceResolver* implementation providing adapting to a JCR session and
-the Sling JCR based *Resource* implementation providing adapting to a JCR
-node.
+This method is called to get a view of the same object in terms of another class. Examples of implementations of this method is the Sling `ResourceResolver` implementation providing adapting to a JCR session and the Sling JCR based `Resource` implementation providing adapting to a JCR node.
 
 
-<a name="Adapters-ExtendingAdapters"></a>
 ## Extending Adapters
 
-Sometimes an *Adaptable* implementation cannot foresee future uses and
-requirements. To cope with such extensibility requirements two interfaces
-and an abstract base class are defined:
+Sometimes an `Adaptable` implementation cannot foresee future uses and requirements. To cope with such extensibility requirements two interfaces and an abstract base class are defined:
 
-  * *AdapterManager*
-  * *AdapterFactory*
-  * *SlingAdaptable*
+  * `AdapterManager`
+  * `AdapterFactory`
+  * `SlingAdaptable`
 
 
-<a name="Adapters-AdapterFactory"></a>
 ## AdapterFactory
 
-The *AdapterFactory* interface defines the service interface and API for
-factories supporting extensible adapters for *SlingAdaptable* objects.
-The interface has a single method:
+The `AdapterFactory` interface defines the service interface and API for factories supporting extensible adapters for `SlingAdaptable` objects. The interface has a single method:
 
 
     /**
@@ -84,14 +59,12 @@ The interface has a single method:
      * service registration properties.
      * <p>
      * This method may return <code>null</code> if the adaptable object cannot
-     * be adapted to the adapter (target) type for any reason. In this case,
-the
+     * be adapted to the adapter (target) type for any reason. In this case, the
      * implementation should log a message to the log facility noting the cause
      * for not being able to adapt.
      * <p>
      * Note that the <code>adaptable</code> object is not required to implement
-     * the <code>Adaptable</code> interface, though most of the time this
-method
+     * the <code>Adaptable</code> interface, though most of the time this method
      * is called by means of calling the {@link Adaptable#adaptTo(Class)}
      * method.
      *
@@ -99,72 +72,48 @@ method
      * @param adaptable The object to adapt to the adapter type.
      * @param type The type to which the object is to be adapted.
      * @return The adapted object or <code>null</code> if this factory instance
-     *	   cannot adapt the object.
+     *         cannot adapt the object.
      */
     <AdapterType> AdapterType getAdapter(Object adaptable,
-    	Class<AdapterType> type);
+            Class<AdapterType> type);
 
 
-Implementations of this interface are registered as OSGi services providing
-two lists: The list of classes wich may be adapted (property named
-_adaptables_) and the list of classes to which the adapted class may be
-adapted (property named _adapters_). A good example of an Class
-implementing *AdapterFactory* is the *SlingScriptAdapterFactory*.
+Implementations of this interface are registered as OSGi services providing two lists: The list of classes wich may be adapted (property named *adaptables*) and the list of classes to which the adapted class may be adapted (property named *adapters*). A good example of an Class implementing `AdapterFactory` is the `SlingScriptAdapterFactory`.
 
-*AdapterFactory* services are gathered by a *AdapterManager*
-implementation for use by consumers. Consumers should not care for
-*AdapterFactory* services.
+`AdapterFactory` services are gathered by a `AdapterManager` implementation for use by consumers. Consumers should not care for `AdapterFactory` services.
 
 
-<a name="Adapters-AdapterManager"></a>
 ## AdapterManager
 
-The *AdapterManager* is defines the service interface for the genralized
-and extensible use of *AdapterFactory* services. Thus the adapter manager
-may be retrieved from the service registry to try to adapt whatever object
-that needs to be adapted - provided appropriate adapters exist.
+The `AdapterManager` is defines the service interface for the genralized and extensible use of `AdapterFactory` services. Thus the adapter manager may be retrieved from the service registry to try to adapt whatever object that needs to be adapted - provided appropriate adapters exist.
 
-The *AdapterManager* interface is defined as follows:
+The `AdapterManager` interface is defined as follows:
 
 
     /**
      * Returns an adapter object of the requested <code>AdapterType</code> for
      * the given <code>adaptable</code> object.
      * <p>
-     * The <code>adaptable</code> object may be any non-<code>null</code>
-object
+     * The <code>adaptable</code> object may be any non-<code>null</code> object
      * and is not required to implement the <code>Adaptable</code> interface.
      *
      * @param <AdapterType> The generic type of the adapter (target) type.
      * @param adaptable The object to adapt to the adapter type.
      * @param type The type to which the object is to be adapted.
      * @return The adapted object or <code>null</code> if no factory exists to
-     *	   adapt the <code>adaptable</code> to the <code>AdapterType</code>
-     *	   or if the <code>adaptable</code> cannot be adapted for any other
-     *	   reason.
+     *         adapt the <code>adaptable</code> to the <code>AdapterType</code>
+     *         or if the <code>adaptable</code> cannot be adapted for any other
+     *         reason.
      */
     <AdapterType> AdapterType getAdapter(Object adaptable,
-    	Class<AdapterType> type);
+            Class<AdapterType> type);
 
 
-Any object can theoretically be adapted to any class even if it does not
-implement the *Adaptable* interface, if an *AdapterFactory* service
-delivers a *getAdapter()* method which adapts an object to another one.
-To check if there's any existing *AdapterFactory* which can adapt a given
-object to another one the *AdapterManager* service with it's
-*getAdapter()* method does the job. So the *Adaptable* interface merely
-is an indicator that the object provides built-in support for beeing
-adapted.
+Any object can theoretically be adapted to any class even if it does not implement the `Adaptable` interface, if an `AdapterFactory` service delivers a `getAdapter()` method which adapts an object to another one. To check if there's any existing `AdapterFactory` which can adapt a given object to another one the `AdapterManager` service with it's `getAdapter()` method does the job. So the `Adaptable` interface merely is an indicator that the object provides built-in support for beeing adapted.
 
 
-<a name="Adapters-SlingAdaptable"></a>
 ## SlingAdaptable
 
-The *SlingAdaptable* class is an implementation of the *Adaptable*
-interface which provides built-in support to call the *AdapterManager* to
-provide an adapter from the *Adaptable* object to the requested class.
-
-An example of extending the *SlingAdaptable* class will be the Sling JCR
-based *Resource* implementation. This way, such a resource may be adapted
-to a *SlingScript* by means of an appropriatley programmed
-*AdapterFactory* (see below).
+The `SlingAdaptable` class is an implementation of the `Adaptable` interface which provides built-in support to call the `AdapterManager` to provide an adapter from the `Adaptable` object to the requested class.
+
+An example of extending the `SlingAdaptable` class will be the Sling JCR based `Resource` implementation. This way, such a resource may be adapted to a `SlingScript` by means of an appropriatley programmed `AdapterFactory` (see below).

Modified: sling/site/trunk/content/apache-sling-commons-thread-pool.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/apache-sling-commons-thread-pool.mdtext?rev=1341347&r1=1341346&r2=1341347&view=diff
==============================================================================
--- sling/site/trunk/content/apache-sling-commons-thread-pool.mdtext (original)
+++ sling/site/trunk/content/apache-sling-commons-thread-pool.mdtext Tue May 22 08:25:18 2012
@@ -1,17 +1,9 @@
 Title: Apache Sling Commons Thread Pool
-The Apache Sling Commons Thread Pool bundle provides a thread pool
-services. All thread pools are managed by the
-_{nl:org.apache.sling.commons.threads.ThreadPoolManager}_. This service can
-be used to get a thread pool.
 
-Thread pools are managed by name - there is a default thread pool and
-custom thread pools can be generated on demand using a unique name.
+The Apache Sling Commons Thread Pool bundle provides a thread pool services. All thread pools are managed by the *{nl:org.apache.sling.commons.threads.ThreadPoolManager}*. This service can be used to get a thread pool.
 
-The thread pools are actually wrappers around the thread pool support
-(executer) from the Java library. The advantage of using this thread pool
-service is, that the pools can be configured and managed through OSGi
-configurations. In addition the bundle contains a plugin for the Apache
-Felix Web Console.
+Thread pools are managed by name - there is a default thread pool and custom thread pools can be generated on demand using a unique name.
 
-When using the {nl:ThreadPoolMananger} it is important to release a thread
-pool using the manager after it has been used.
+The thread pools are actually wrappers around the thread pool support (executer) from the Java library. The advantage of using this thread pool service is, that the pools can be configured and managed through OSGi configurations. In addition the bundle contains a plugin for the Apache Felix Web Console.
+
+When using the {nl:ThreadPoolMananger} it is important to release a thread pool using the manager after it has been used.
\ No newline at end of file

Modified: sling/site/trunk/content/apache-sling-community-roles-and-processes.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/apache-sling-community-roles-and-processes.mdtext?rev=1341347&r1=1341346&r2=1341347&view=diff
==============================================================================
--- sling/site/trunk/content/apache-sling-community-roles-and-processes.mdtext (original)
+++ sling/site/trunk/content/apache-sling-community-roles-and-processes.mdtext Tue May 22 08:25:18 2012
@@ -1,103 +1,55 @@
 Title: Apache Sling Community Roles and Processes
-<a name="ApacheSlingCommunityRolesandProcesses-CommunityRolesandProcesses"></a>
+
 # Community Roles and Processes
 
-The Community Roles and Processes are put in effect as of 13/May/2009.
-Updated 7/December/2009 to reflect Sling being a top level project.
+The Community Roles and Processes are put in effect as of 13/May/2009. Updated 7/December/2009 to reflect Sling being a top level project.
 
-<a name="ApacheSlingCommunityRolesandProcesses-Roles"></a>
 ## Roles
 
-There are different roles with which Sling community members may be
-associated: User, Contributor, Committer, and PMC (Project Management
-Committee) Member. These roles are assigned and assumed based on merit. 
-
-The User and Contributor roles are acquired by using the software and
-participating in the community, but the Committer and PMC member roles can
-only be granted by a PMC vote.
+There are different roles with which Sling community members may be associated: User, Contributor, Committer, and PMC (Project Management Committee) Member. These roles are assigned and assumed based on merit. 
+
+The User and Contributor roles are acquired by using the software and participating in the community, but the Committer and PMC member roles can only be granted by a PMC vote.
 
-The roles defined here conform to the ASF's [definition of roles](http://www.apache.org/foundation/how-it-works.html#roles)
-.
+The roles defined here conform to the ASF's [definition of roles]({{ refs.http://www.apache.org/foundation/how-it-works.html#roles.path }}).
 
-<a name="ApacheSlingCommunityRolesandProcesses-Users"></a>
 ### Users
 
-Users are the people who use any of the products of the Sling project.
-People in this role are not contributing code, but they are using the
-products, reporting bugs, making feature requests, testing code, and such.
-This is by far the most important category of people, since without users
-there is no reason for Sling. When a user starts to contribute code or
-documentation patches, they become a _Contributor_.
+Users are the people who use any of the products of the Sling project. People in this role are not contributing code, but they are using the products, reporting bugs, making feature requests, testing code, and such. This is by far the most important category of people, since without users there is no reason for Sling. When a user starts to contribute code or documentation patches, they become a *Contributor*.
 
-<a name="ApacheSlingCommunityRolesandProcesses-Contributors"></a>
 ### Contributors
 
-Contributors are the people who write code or documentation patches or
-contribute positively to the project in other ways. A volunteer's
-contribution is always recognized.
+Contributors are the people who write code or documentation patches or contribute positively to the project in other ways. A volunteer's contribution is always recognized.
 
-<a name="ApacheSlingCommunityRolesandProcesses-Committers"></a>
 ### Committers
 
-Contributors who give frequent and valuable contributions to a subproject of Sling can have their status promoted to that of a _[Committer](http://www.apache.org/dev/committers.html)
-_. A Committer has write access to Sling's source code repository.
-Contributors of documentation are eligible as committers in the same way as
-contributors of pure code.
+Contributors who give frequent and valuable contributions to a subproject of Sling can have their status promoted to that of a *[Committer]({{ refs.http://www.apache.org/dev/committers.html.path }})*. A Committer has write access to Sling's source code repository. Contributors of documentation are eligible as committers in the same way as contributors of pure code.
 
-<a name="ApacheSlingCommunityRolesandProcesses-PMCMembers"></a>
 ### PMC Members
 
-Committers showing continued interest in the project and taking an active part in the evolution of the project may be elected as  _[PMC](http://www.apache.org/dev/pmc.html)
- members_. The PMC (Project Management Committee) is the official managing
-body of project and is responsible for setting its overall direction.
+Committers showing continued interest in the project and taking an active part in the evolution of the project may be elected as  *[PMC]({{ refs.http://www.apache.org/dev/pmc.html.path }}) members*. The PMC (Project Management Committee) is the official managing body of project and is responsible for setting its overall direction.
 
-<a name="ApacheSlingCommunityRolesandProcesses-Processes"></a>
 ## Processes
 
-<a name="ApacheSlingCommunityRolesandProcesses-BecomingaUserorContributor"></a>
 ### Becoming a User or Contributor
 
-There is no requirement for becoming a User or Contributor; these roles are
-open to everyone.
+There is no requirement for becoming a User or Contributor; these roles are open to everyone.
 
 
-<a name="ApacheSlingCommunityRolesandProcesses-BecomingaCommitter"></a>
 ### Becoming a Committer
 
-In order for a Contributor to become a Committer, a member of the PMC can
-nominate that Contributor to the PMC. Once a Contributor is nominated, the
-PMC calls a vote on the PMC private mailing list.
-
-If there are at least three positive votes and no negative votes after
-three days (72 hours), the results are posted to the PMC private mailing
-list.
-
-Upon a positive vote result, the Contributor will be emailed by the PMC to
-invite him/her to become a Committer. If the invitation is accepted, an
-announcement about the new Committer is made to the developer mailing list
-and he/she is given write access to the source code repository. A
-Contributor will not officially become a Committer member until the
-appropriate legal paperwork is submitted.
+In order for a Contributor to become a Committer, a member of the PMC can nominate that Contributor to the PMC. Once a Contributor is nominated, the PMC calls a vote on the PMC private mailing list.
+
+If there are at least three positive votes and no negative votes after three days (72 hours), the results are posted to the PMC private mailing list.
+
+Upon a positive vote result, the Contributor will be emailed by the PMC to invite him/her to become a Committer. If the invitation is accepted, an announcement about the new Committer is made to the developer mailing list and he/she is given write access to the source code repository. A Contributor will not officially become a Committer member until the appropriate legal paperwork is submitted.
 
 
-<a name="ApacheSlingCommunityRolesandProcesses-BecomingaPMCMember"></a>
 ### Becoming a PMC Member
 
-In order for a Committer to become a member of the PMC, a member of the PMC
-can nominate that Committer to the PMC. Once a Committer is nominated, the
-PMC calls a vote on the PMC private mailing list.
-
-If there are at least three positive votes and no negative votes after
-three days (72 hours), the results are posted to the PMC private mailing
-list.
-
-To have the Committer being accepted as a PMC member, the ASF Board has
-acknowledge the addition to the PMC. The Committer should not be consulted
-about his/her desire to become a PMC member before the board
-acknowledgement, or be informed that they are being considered, since this
-could create hard feelings if the vote does not pass.
-
-Upon a positive vote result, the PMC member will be emailed by the PMC to
-invite him/her to become a PMC member. If the invitation is accepted, an
-announcement about the new PMC member is made to the developer mailing
-list.
+In order for a Committer to become a member of the PMC, a member of the PMC can nominate that Committer to the PMC. Once a Committer is nominated, the PMC calls a vote on the PMC private mailing list.
+
+If there are at least three positive votes and no negative votes after three days (72 hours), the results are posted to the PMC private mailing list.
+
+To have the Committer being accepted as a PMC member, the ASF Board has acknowledge the addition to the PMC. The Committer should not be consulted about his/her desire to become a PMC member before the board acknowledgement, or be informed that they are being considered, since this could create hard feelings if the vote does not pass.
+
+Upon a positive vote result, the PMC member will be emailed by the PMC to invite him/her to become a PMC member. If the invitation is accepted, an announcement about the new PMC member is made to the developer mailing list.
\ No newline at end of file

Modified: sling/site/trunk/content/apache-sling-eventing-and-job-handling.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/apache-sling-eventing-and-job-handling.mdtext?rev=1341347&r1=1341346&r2=1341347&view=diff
==============================================================================
--- sling/site/trunk/content/apache-sling-eventing-and-job-handling.mdtext (original)
+++ sling/site/trunk/content/apache-sling-eventing-and-job-handling.mdtext Tue May 22 08:25:18 2012
@@ -1,559 +1,262 @@
 Title: Apache Sling Eventing and Job Handling
+
 *NOTE: This documentation is work in progress!*
 
-<a name="ApacheSlingEventingandJobHandling-Overview"></a>
 ## Overview
 
-The Apache Sling Event Support bundle provides interesting services for
-advanced event handling and job processing. While this bundle leverages the
-OSGi EventAdmin, it provides a very powerful support for so called jobs: a
-job is a task which has to be performed by a component - the Sling job
-handling ensures that exactly one component performs this task.
+The Apache Sling Event Support bundle provides interesting services for advanced event handling and job processing. While this bundle leverages the OSGi EventAdmin, it provides a very powerful support for so called jobs: a job is a task which has to be performed by a component - the Sling job handling ensures that exactly one component performs this task.
 
 To get some hands on code, you can refer to the following tutorials:
-* [How to Manage Events in Sling](how-to-manage-events-in-sling.html)
-* [Scheduler Service (commons scheduler)](scheduler-service-(commons-scheduler).html)
+* [How to Manage Events in Sling]({{ refs.how-to-manage-events-in-sling.path }})
+* [Scheduler Service (commons scheduler)]({{ refs.scheduler-service-commons-scheduler.path }})
 
 The Sling Event Supports adds the following services:
-* [Jobs](#jobs.html)
-* [Distributed Events](#distributed.html)
-* [Scheduled Events](#timed.html)
+* [Jobs]({{ refs.-jobs.path }})
+* [Distributed Events]({{ refs.-distributed.path }})
+* [Scheduled Events]({{ refs.-timed.path }})
 
 {anchor:jobs}
-<a name="ApacheSlingEventingandJobHandling-Jobs(GuaranteeofProcessing)"></a>
 ## Jobs (Guarantee of Processing)
 
-In general, the eventing mechanism (OSGi EventAdmin) has no knowledge about
-the contents of an event. Therefore, it can't decide if an event is
-important and should be processed by someone. As the event mechanism is a
-"fire event and forget about it" algorithm, there is no way for an event
-admin to tell if someone has really processed the event. Processing of an
-event could fail, the server or bundle could be stopped etc.
-
-On the other hand, there are use cases where the guarantee of processing a
-job is a must and usually this comes with the requirement of processing
-this job exactly once. Typical examples are sending notification emails (or
-sms) or post processing of content (like thumbnail generation of images or
-documents).
-
-The Sling Event Support adds the notion of a job to the OSGi EventAdmin. A
-job is a special OSGi event that someone has to process (do the job). The
-job event has a special topic _org/apache/sling/event/job_ to indicate that
-the event contains a job. These job events are consumed by the Sling Job
-Handler - it ensures that someone does the job! To support different jobs
-and different processors of such jobs, the real topic of the event is
-stored in the _event.job.topic_ property of the original event. When a job
-event (event with the topic _org/apache/sling/event/job_) is received, a
-new event with the topic from the property _event.job.topic_ is fired
-(Firing this event comes of course with a set of rules and constraints
-explained below).
-
-In order to distinguish a job which occured twice and a job which is
-generated "at the same time" on several nodes, each job can be uniquely
-identified by its topic (property _event.job.topic_) and an optional job
-name, the _event.job.id_ property. It is up to the client creating the
-event to ensure that the _event.job.id_ property is unqiue *and* identical
-on all application nodes. If the job name is not provided for the job, then
-it is up to the client to ensure that the job event is only fired once.
-Usually for jobs generated based on user interaction, a unique job name is
-not required as the job is only created through the user interaction.
+In general, the eventing mechanism (OSGi EventAdmin) has no knowledge about the contents of an event. Therefore, it can't decide if an event is important and should be processed by someone. As the event mechanism is a "fire event and forget about it" algorithm, there is no way for an event admin to tell if someone has really processed the event. Processing of an event could fail, the server or bundle could be stopped etc.
+
+On the other hand, there are use cases where the guarantee of processing a job is a must and usually this comes with the requirement of processing this job exactly once. Typical examples are sending notification emails (or sms) or post processing of content (like thumbnail generation of images or documents).
+
+The Sling Event Support adds the notion of a job to the OSGi EventAdmin. A job is a special OSGi event that someone has to process (do the job). The job event has a special topic *org/apache/sling/event/job* to indicate that the event contains a job. These job events are consumed by the Sling Job Handler - it ensures that someone does the job! To support different jobs and different processors of such jobs, the real topic of the event is stored in the *event.job.topic* property of the original event. When a job event (event with the topic *org/apache/sling/event/job*) is received, a new event with the topic from the property *event.job.topic* is fired (Firing this event comes of course with a set of rules and constraints explained below).
+
+In order to distinguish a job which occured twice and a job which is generated "at the same time" on several nodes, each job can be uniquely identified by its topic (property *event.job.topic*) and an optional job name, the *event.job.id* property. It is up to the client creating the event to ensure that the *event.job.id* property is unqiue *and* identical on all application nodes. If the job name is not provided for the job, then it is up to the client to ensure that the job event is only fired once. Usually for jobs generated based on user interaction, a unique job name is not required as the job is only created through the user interaction.
 
-<a name="ApacheSlingEventingandJobHandling-JobProcessors"></a>
 ### Job Processors
 
-A job processor is a service consuming and processing a job. It listens for
-OSGi events with the job topic. The OSGi EventAdmin usually comes with a
-timeout for event handlers. An event handler must consume an OSGi event as
-fast as possible otherwise the handler might get a timeout and get
-blacklisted. Therefore a job processor should never directly process the
-job in the event handler method, but do this async.
-
-In addition the Sling Job Handler needs to get notified if someone is
-processing a job and when someone has finished processing this job.
-
-To make implementing such a job processor easier, there is the _JobUtil_
-utility class along with the _JobProcessor_ interface. The _JobUtil_ class
-has a helper method for this: _processJob(Event, JobProcessor)_. The job
-processor must implement the _JobProcessor_ interface which consists of a
-single _process(Event)_ method. When the event handler receives a job event
-through the OSGi EventAdmin, it calls _JobUtil.processJob(event, this)_ and
-returns. This utility method takes care to notify the Sling Job Handler
-that someone is processing the job. Then the _process(Event)_ method of the
-job processor is called in the background and when it returns, the Sling
-Job Handler is notified that the job is completed (or processing failed).
-
-If the job processor wants to do the background processing by itself or
-does not need background processing at all, it must signal starting and
-completition of the job by call _JobUtil.acknowledgeJob(Event),
-_JobUtil.finishedJob(event)_ or _JobUtil.rescheduleJob(Event).
+A job processor is a service consuming and processing a job. It listens for OSGi events with the job topic. The OSGi EventAdmin usually comes with a timeout for event handlers. An event handler must consume an OSGi event as fast as possible otherwise the handler might get a timeout and get blacklisted. Therefore a job processor should never directly process the job in the event handler method, but do this async.
+
+In addition the Sling Job Handler needs to get notified if someone is processing a job and when someone has finished processing this job.
+
+To make implementing such a job processor easier, there is the *JobUtil* utility class along with the *JobProcessor* interface. The *JobUtil* class has a helper method for this: *processJob(Event, JobProcessor)*. The job processor must implement the *JobProcessor* interface which consists of a single *process(Event)* method. When the event handler receives a job event through the OSGi EventAdmin, it calls *JobUtil.processJob(event, this)* and returns. This utility method takes care to notify the Sling Job Handler that someone is processing the job. Then the *process(Event)* method of the job processor is called in the background and when it returns, the Sling Job Handler is notified that the job is completed (or processing failed).
+
+If the job processor wants to do the background processing by itself or does not need background processing at all, it must signal starting and completition of the job by call *JobUtil.acknowledgeJob(Event), *JobUtil.finishedJob(event)* or *JobUtil.rescheduleJob(Event).
 
-<a name="ApacheSlingEventingandJobHandling-ProcessingofJobs"></a>
 ### Processing of Jobs
 
-Incoming jobs are first persisted in the repository (for failover etc.) and
-then a job is put into a processing queue. There are different types of
-queues defining how the jobs are processed (one after the other, in
-parallel etc.).
-
-For managing queues, the Sling Job Handler uses the OSGi ConfigAdmin - it
-is possible to configure one or more queue configurations through the
-ConfigAdmin. One way of creating and configuring such configurations is the
-Apache Felix WebConsole.
+Incoming jobs are first persisted in the repository (for failover etc.) and then a job is put into a processing queue. There are different types of queues defining how the jobs are processed (one after the other, in parallel etc.).
+
+For managing queues, the Sling Job Handler uses the OSGi ConfigAdmin - it is possible to configure one or more queue configurations through the ConfigAdmin. One way of creating and configuring such configurations is the Apache Felix WebConsole.
 
-<a name="ApacheSlingEventingandJobHandling-QueueConfigurations"></a>
 #### Queue Configurations
 
 A queue configuration can have the following properties:
 
-<table>
-<tr><td> *Property Name*     </td><td> *Description* </td></tr>
-<tr><td> _queue.name_	     </td><td> The name of the queue. If matching is used for
-topics, the value \{0\} can be used for replacing the matched part. </td></tr>
-<tr><td> _queue.type_	     </td><td> The type of the queue: ORDERED, UNORDERED,
-TOPIC_ROUND_ROBIN, IGNORE, DROP </td></tr>
-<tr><td> _queue.topics_       </td><td> A list of topics processed by this queue. Either
-the concrete topic is specified or the topic string ends with /* or /. If a
-star is at the end all topics and sub topics match, with a dot only direct
-sub topics match. </td></tr>
-<tr><td> _queue.maxparallel_	    </td><td> How many jobs can be processed in parallel?
--1 for number of processors.</td></tr>
-<tr><td> _queue.retries_	</td><td> How often should the job be retried. -1 for
-endless retries. </td></tr>
-<tr><td> _queue.retrydelay_	   </td><td> The waiting time in milliseconds between job
-retries. </td></tr>
-<tr><td> _queue.priority_	 </td><td> The thread priority: NORM, MIN, or MAX </td></tr>
-<tr><td> _queue.runlocal_	 </td><td> Should the jobs only be processed on the cluster
-node they have been created? </td></tr>
-<tr><td> _queue.applicationids_       </td><td> Optional list of application (cluster
-node) ids. If configured, these jobs are only processed on this application
-node.</td></tr>
-<tr><td> _service.ranking_ </td><td> A ranking for this configuration.</td></tr>
-</table>
+| *Property Name*     | *Description* |
+| *queue.name*       | The name of the queue. If matching is used for topics, the value \{0\} can be used for replacing the matched part. |
+| *queue.type*       | The type of the queue: ORDERED, UNORDERED, TOPIC*ROUND*ROBIN, IGNORE, DROP |
+| *queue.topics*       | A list of topics processed by this queue. Either the concrete topic is specified or the topic string ends with /* or /. If a star is at the end all topics and sub topics match, with a dot only direct sub topics match. |
+| *queue.maxparallel*       | How many jobs can be processed in parallel? -1 for number of processors.|
+| *queue.retries*       | How often should the job be retried. -1 for endless retries. |
+| *queue.retrydelay*       | The waiting time in milliseconds between job retries. |
+| *queue.priority*       | The thread priority: NORM, MIN, or MAX |
+| *queue.runlocal*       | Should the jobs only be processed on the cluster node they have been created? |
+| *queue.applicationids*       | Optional list of application (cluster node) ids. If configured, these jobs are only processed on this application node.|
+| *service.ranking* | A ranking for this configuration.|
 
-The configurations are processed in order of their service ranking. The
-first matching queue configuration is used for the job.
+The configurations are processed in order of their service ranking. The first matching queue configuration is used for the job.
 
-<a name="ApacheSlingEventingandJobHandling-OrderedQueues"></a>
 #### Ordered Queues
 
 An ordered queue processes one job after the other.
 
-<a name="ApacheSlingEventingandJobHandling-UnorderedQueues"></a>
 #### Unordered Queues
 
 Unordered queues process jobs in parallel.
 
-<a name="ApacheSlingEventingandJobHandling-Topic-Round-RobinQueues"></a>
 #### Topic-Round-Robin Queues
 
-The jobs are processed in parallel. Scheduling of the jobs is based on the
-topic of the jobs. These are started by doing round-robin on the available
-topics.
+The jobs are processed in parallel. Scheduling of the jobs is based on the topic of the jobs. These are started by doing round-robin on the available topics.
 
-<a name="ApacheSlingEventingandJobHandling-IgnoringQueues"></a>
 #### Ignoring Queues
 
-A queue of type _ignoring_ ignores this job. The job is persisted but not
-processed. This can be used to delay processing of some jobs. With a
-changed configuration and a restart of the Sling Job Handler the ignored
-jobs can be processed at a later time.
+A queue of type *ignoring* ignores this job. The job is persisted but not processed. This can be used to delay processing of some jobs. With a changed configuration and a restart of the Sling Job Handler the ignored jobs can be processed at a later time.
 
-<a name="ApacheSlingEventingandJobHandling-DroppingQueues"></a>
 #### Dropping Queues
 
-A queue of type _drop_ is dropping a job - which means it is not processed
-at all and directly discarded.
+A queue of type *drop* is dropping a job - which means it is not processed at all and directly discarded.
 
 
-<a name="ApacheSlingEventingandJobHandling-Persistence"></a>
 ### Persistence
 
-The job event handler listens for all job events (all events with the topic
-_org/apache/sling/event/job_) and will as a first step persist those events
-in the JCR repository. All job events are stored in a tree under the job
-root node _/var/eventing/jobs_. Persisting the job ensures proper handling
-in a clustered environment and allows failover handling after a bundle stop
-or server restart. Once a job has been processed by someone, the job will
-be removed from the repository.
-
-When the job event listener tries to write a job into the repository it
-will check if the repository already contains a job with the given topic
-_event.job.topic_ and job name (property _event.job.id_). If the event has
-already been written by some other application node, it's not written
-again.
+The job event handler listens for all job events (all events with the topic *org/apache/sling/event/job*) and will as a first step persist those events in the JCR repository. All job events are stored in a tree under the job root node */var/eventing/jobs*. Persisting the job ensures proper handling in a clustered environment and allows failover handling after a bundle stop or server restart. Once a job has been processed by someone, the job will be removed from the repository.
+
+When the job event listener tries to write a job into the repository it will check if the repository already contains a job with the given topic *event.job.topic* and job name (property *event.job.id*). If the event has already been written by some other application node, it's not written again.
 
 Each job is stored as a separate node with the following properties:
-<table>
-<tr><td> *Property Name*     </td><td> *Description* </td></tr>
-<tr><td> _event:topic_       </td><td> The topic of the job </td></tr>
-<tr><td> _event:id_	      </td><td> The unique identifier of this job (optional).
-</tr>
-<tr><td> _event:created_     </td><td> The date and time when the event has been created
-(stored in the repository)
-</tr>
-<tr><td> _event:application_ </td><td> The identifier of the node where the job was
-created </td></tr>
-<tr><td> _event:properties_  </td><td> Serialized properties </td></tr>
-<tr><td> _event:finished_    </td><td> The date and time when the job has been finished </td></tr>
-<tr><td> _event:processor_   </td><td> The identifier of the node which processed the job
-(after successful processing) </td></tr>
-</table>
-
-The failover of an application node is accomplished by locking. If a job is
-locked in the repository a session scoped lock is used. If this application
-node dies, the lock dies as well. Each application node observes the JCR
-locking properties and therefore gets aware of unlocked event nodes with
-the active flag set to true. If an application node finds such a node, it
-locks it, updates the _event:application_ information and processes it
-accordingly. In this case the event gets the additional property
-_org/apache/sling/job/retry_. 
+| *Property Name*     | *Description* |
+| *event:topic*       | The topic of the job |
+| *event:id*          | The unique identifier of this job (optional).
+| *event:created*     | The date and time when the event has been created (stored in the repository)
+| *event:application* | The identifier of the node where the job was created |
+| *event:properties*  | Serialized properties |
+| *event:finished*    | The date and time when the job has been finished |
+| *event:processor*   | The identifier of the node which processed the job (after successful processing) |
 
-Each application is periodically removing old jobs from the repository
-(using the scheduler).
+The failover of an application node is accomplished by locking. If a job is locked in the repository a session scoped lock is used. If this application node dies, the lock dies as well. Each application node observes the JCR locking properties and therefore gets aware of unlocked event nodes with the active flag set to true. If an application node finds such a node, it locks it, updates the *event:application* information and processes it accordingly. In this case the event gets the additional property *org/apache/sling/job/retry*. 
+
+Each application is periodically removing old jobs from the repository (using the scheduler).
 
 
 
-<a name="ApacheSlingEventingandJobHandling-DistributionofJobs"></a>
 ### Distribution of Jobs
 
-A job event is an event like any other. Therefore it is up to the client
-generating the event to decide if the event should be distributed. If the
-event is distributed, it will be distributed with a set _event.application_
-on the remote nodes. If the job event handler receives a job with the
-_event.application_ property set, it will not try to write it into the
-repository. It will just broadcast this event asynchronously as a ~FYI
-event.
-
-If a job event is created simultanously on all application nodes, the event
-will not be distributed. The application node that actually has the lock on
-the stored job in the repository will clear the _event.application_ when
-sending the event locally. All other application nodes will use the
-_event.application_ stored in the repository when broadcasting the event
-locally.
+A job event is an event like any other. Therefore it is up to the client generating the event to decide if the event should be distributed. If the event is distributed, it will be distributed with a set *event.application* on the remote nodes. If the job event handler receives a job with the *event.application* property set, it will not try to write it into the repository. It will just broadcast this event asynchronously as a ~FYI event.
+
+If a job event is created simultanously on all application nodes, the event will not be distributed. The application node that actually has the lock on the stored job in the repository will clear the *event.application* when sending the event locally. All other application nodes will use the *event.application* stored in the repository when broadcasting the event locally.
 
-<a name="ApacheSlingEventingandJobHandling-UsagePatterns"></a>
 ## Usage Patterns
 
-Based on some usage patterns, we discuss the functionality of the eventing
-mechanism.
+Based on some usage patterns, we discuss the functionality of the eventing mechanism.
 
-<a name="ApacheSlingEventingandJobHandling-SendingUserGeneratedEvents"></a>
 ### Sending User Generated Events
 
-If a user action results in an event, the event is only created on one
-single node in the cluster. The event object is generated and delivered to
-the OSGi event admin. If the _event.distribute_ is not explicitly set, the
-event is only distributed localled.
-
-If the _event.distribute_ is the, the cluster event handler will write the
-event into the repository. All nodes in the cluster observe the repository
-area where all events are stored. If a new event is written into that area,
-each application node will get notified. It will create the event based on
-the information in the repository, clear the _event.distribute_ and publish
-the event.
+If a user action results in an event, the event is only created on one single node in the cluster. The event object is generated and delivered to the OSGi event admin. If the *event.distribute* is not explicitly set, the event is only distributed localled.
+
+If the *event.distribute* is the, the cluster event handler will write the event into the repository. All nodes in the cluster observe the repository area where all events are stored. If a new event is written into that area, each application node will get notified. It will create the event based on the information in the repository, clear the *event.distribute* and publish the event.
 
 The flow can be described as follows:
-1. Client code generates event using OSGi API, if the _event.distribute_
-should be set, it is using the ~EventUtil.
+1. Client code generates event using OSGi API, if the *event.distribute* should be set, it is using the ~EventUtil.
 1. Client code sends the event to the (local) event admin.
 1. Event admin delivers the event locally.
-1. Clustering event handler receives the event if _event.distribute_ is
-present
-1. # Event handler adds _event.application_ and writes the event to the
-repository
-1. # Remote repository observers get notified through JCR observation about
-the new event. They distribute the event locally with the
-_event.application_ (from the node where the event occured first) and
-cleared _event.distribute_.
+1. Clustering event handler receives the event if *event.distribute* is present
+1. # Event handler adds *event.application* and writes the event to the repository
+1. # Remote repository observers get notified through JCR observation about the new event. They distribute the event locally with the *event.application* (from the node where the event occured first) and cleared *event.distribute*.
 
-<a name="ApacheSlingEventingandJobHandling-ProcessingJCREvents"></a>
 ### Processing JCR Events
 
-JCR events are environment generated events and therefore are sent by the
-repository to each node in the cluster. In general, it is advisable to not
-built the application on the low level repository events but to use
-application events. Therefore the observer of the JCR event should create
-an OSGi event based on the changes in the repository. A decision has to be
-made if the event should be a job or a plain event.
+JCR events are environment generated events and therefore are sent by the repository to each node in the cluster. In general, it is advisable to not built the application on the low level repository events but to use application events. Therefore the observer of the JCR event should create an OSGi event based on the changes in the repository. A decision has to be made if the event should be a job or a plain event.
 
 The flow can be described as follows:
 1. Client registers for JCR observation
 1. JCR notifies the client for changes
-1. Client generates OSGi event based on the JCR events (the
-_event.distribute_ will not be set), it decides if it sends this event as a
-job.
+1. Client generates OSGi event based on the JCR events (the *event.distribute* will not be set), it decides if it sends this event as a job.
 1. Client code sends the event to the (local) event admin
 1. Event admin publishes the event locally
-1. The distribution event handler does not set see the event as the
-_event.distribute_ is not set.
+1. The distribution event handler does not set see the event as the *event.distribute* is not set.
 1. The job event handler gets the event if it has the job topic
-1. # The job event handler adds the _event.application_ property and tries to
-write the job to the repository
-1. ## If no job with the topic and _id_ property is in the repository, the
-event will be written and locked.
-1. ## If an event with the topic and _id_ property is in the repository then:
-1. ### If the _event.application_ equals the current application node, the
-event is set to active (_event:active_) in the repository again and locked
-1. ### If the _event.application_ does not equal the current application
-node, the event is not distributed locally.
-1. ## If the job could be locked in the repository, the job event handler
-delivers the job locally and synchronously and it unlocks the job and sets
-_event:active_ to false afterwards.
+1. # The job event handler adds the *event.application* property and tries to write the job to the repository
+1. ## If no job with the topic and *id* property is in the repository, the event will be written and locked.
+1. ## If an event with the topic and *id* property is in the repository then:
+1. ### If the *event.application* equals the current application node, the event is set to active (*event:active*) in the repository again and locked
+1. ### If the *event.application* does not equal the current application node, the event is not distributed locally.
+1. ## If the job could be locked in the repository, the job event handler delivers the job locally and synchronously and it unlocks the job and sets *event:active* to false afterwards.
 
-<a name="ApacheSlingEventingandJobHandling-SendingScheduledEvents"></a>
 ### Sending Scheduled Events
 
-Scheduled events are OSGi events that have been created by the environemnt.
-They are generated on each application node of the cluster through an own
-scheduler instance. Sending these events works the same as sending events
-based on JCR events (see above).
+Scheduled events are OSGi events that have been created by the environemnt. They are generated on each application node of the cluster through an own scheduler instance. Sending these events works the same as sending events based on JCR events (see above).
 
-In most use cases a scheduler will send job events to ensure that exactly
-one application node is processing the event.
+In most use cases a scheduler will send job events to ensure that exactly one application node is processing the event.
 
-<a name="ApacheSlingEventingandJobHandling-ReceivingOSGiEvents"></a>
 ### Receiving OSGi Events
 
-If you want to receive OSGi events, you can just follow the specification:
-receive it via a custom event handler which is registered on bundle start -
-a filter can be specified as a configuration property of the handler. 
-
-As we follow the principle of distributing each event to every registered
-handler, the handler has to decide if it will process the event. In order
-to avoid multiple processing of this event in a clustered environment, the
-event handler should check the _event.application_ property. If it is not
-set, it's a local event and the handler should process the event. If the
-_event.application_ is set, it's a remote event and the handler should not
-process the event. This is a general rule of thumb - however, it's up to
-the handler to make its decision either on _event.application_ or any other
-information.
-
-It is advisable to perform the local event check even in a non clustered
-environment as it makes the migration to a cluster later on much easier and
-there is nearly no performance overhead caused by the check.
-
-The ~EventUtil class provides an utility method _isLocalEvent(Event)_ which
-checks the existance of the _event.application_ property and returns _true_
-if it is absend.
+If you want to receive OSGi events, you can just follow the specification: receive it via a custom event handler which is registered on bundle start - a filter can be specified as a configuration property of the handler. 
+
+As we follow the principle of distributing each event to every registered handler, the handler has to decide if it will process the event. In order to avoid multiple processing of this event in a clustered environment, the event handler should check the *event.application* property. If it is not set, it's a local event and the handler should process the event. If the *event.application* is set, it's a remote event and the handler should not process the event. This is a general rule of thumb - however, it's up to the handler to make its decision either on *event.application* or any other information.
+
+It is advisable to perform the local event check even in a non clustered environment as it makes the migration to a cluster later on much easier and there is nearly no performance overhead caused by the check.
+
+The ~EventUtil class provides an utility method *isLocalEvent(Event)* which checks the existance of the *event.application* property and returns *true* if it is absend.
 
 {anchor:distributed}
-<a name="ApacheSlingEventingandJobHandling-DistributedEvents"></a>
 ## Distributed Events
 
-In addition to the job handling, the Sling Event support adds handling for
-distributed events. A distributed event is an OSGi event which is sent
-across JVM boundaries to a different VM. A potential use case is to
-broadcast information in a clustered environment.
+In addition to the job handling, the Sling Event support adds handling for distributed events. A distributed event is an OSGi event which is sent across JVM boundaries to a different VM. A potential use case is to broadcast information in a clustered environment.
 
-<a name="ApacheSlingEventingandJobHandling-SourcesofEvents"></a>
 ### Sources of Events
 
-When it comes to application based on Sling, there is a variety of sources
-from which OSGi events can be send:
+When it comes to application based on Sling, there is a variety of sources from which OSGi events can be send:
 * JCR observation events
 * Application generated events
 * Events from messaging systems (~JMS)
 * "External events"
 
-The events can eiter be generated inside a current user context, e.g. when
-the user performs an action through the UI, or they can be out of a user
-context, e.g. for schedulded events. This leads to different weights of
-events.
+The events can eiter be generated inside a current user context, e.g. when the user performs an action through the UI, or they can be out of a user context, e.g. for schedulded events. This leads to different weights of events.
 
-<a name="ApacheSlingEventingandJobHandling-WeightsofEvents"></a>
 ### Weights of Events
 
-We can distinguish two different weights of events, depending how they are
-distributed in a clustered environment:
+We can distinguish two different weights of events, depending how they are distributed in a clustered environment:
+
+ * User generated events - these events are generated directly by some user action and are therefore started on one single node.
+ * Environment generated events (JCR events, scheduler events etc.) - these events are generated "simultanously" on all nodes.
 
- * User generated events - these events are generated directly by some user
-action and are therefore started on one single node.
- * Environment generated events (JCR events, scheduler events etc.) - these
-events are generated "simultanously" on all nodes.
-
-External events, like incoming JMS events etc. might fall either into the
-first or the second category. The receiver of such events must have the
-knowledge about the weight of the event.
+External events, like incoming JMS events etc. might fall either into the first or the second category. The receiver of such events must have the knowledge about the weight of the event.
 
-<a name="ApacheSlingEventingandJobHandling-BasicPrinciples"></a>
 ### Basic Principles
 
-The foundation of the distributed event mechanism is to distribute each
-event to every node in a clustered environment. The event distribution
-mechanism has no knowledge about the intent of the event and therefore is
-not able to make delivery decisions by itself. It is up to the sender to
-decide what should happen, however the sender must explicitly declare an
-event to be distributed. There are exceptions to "distributing everything
-to everywhere" as for example framework related events (bundle stopped,
-installed etc.) should not be distributed.
-
-The event mechanism will provide additional functionality making it easier
-for event receivers to decide if they should process an event. The event
-receiver can determine if the event is a local event or comming from a
-remote application node. Therefore a general rule of thumb is to process
-events only if they're local and just regard remote events as a FYI.
-
-The event mechanism is an *event* mechanism which should not be confused
-with a *messaging* mechanism. Events are received by the event mechanism
-and distributed to registered listeners. Concepts like durable listeners,
-guarantee of processing etc. are not part of the event mechanism itself.
-However, there is additional support for such things, like job handling.
-
-The application should try to use application events instead of low level
-JCR events whereever possible. Therefore a bridging between JCR events and
-the event mechanism is required. However, a general "automatic" mapping
-will not be provided. It is up to the application to develop such a mapping
-on a per use case base. There might be some support to make the mapping
-easier.
-
-The event handling should be made as transparent to the developer as
-possible. Therefore the additional code for a developer to make the
-eventing working in a clustered environment etc. should be kept to a
-minimum (which will hopefully reduce possible user errors).
+The foundation of the distributed event mechanism is to distribute each event to every node in a clustered environment. The event distribution mechanism has no knowledge about the intent of the event and therefore is not able to make delivery decisions by itself. It is up to the sender to decide what should happen, however the sender must explicitly declare an event to be distributed. There are exceptions to "distributing everything to everywhere" as for example framework related events (bundle stopped, installed etc.) should not be distributed.
+
+The event mechanism will provide additional functionality making it easier for event receivers to decide if they should process an event. The event receiver can determine if the event is a local event or comming from a remote application node. Therefore a general rule of thumb is to process events only if they're local and just regard remote events as a FYI.
+
+The event mechanism is an *event* mechanism which should not be confused with a *messaging* mechanism. Events are received by the event mechanism and distributed to registered listeners. Concepts like durable listeners, guarantee of processing etc. are not part of the event mechanism itself. However, there is additional support for such things, like job handling.
+
+The application should try to use application events instead of low level JCR events whereever possible. Therefore a bridging between JCR events and the event mechanism is required. However, a general "automatic" mapping will not be provided. It is up to the application to develop such a mapping on a per use case base. There might be some support to make the mapping easier.
+
+The event handling should be made as transparent to the developer as possible. Therefore the additional code for a developer to make the eventing working in a clustered environment etc. should be kept to a minimum (which will hopefully reduce possible user errors).
 
-<a name="ApacheSlingEventingandJobHandling-DistributedEvents"></a>
 ### Distributed Events
 
-For distributed events two properties are defined (check the _EventUtil_
-class):
-* _event.distribute_ - this flag is set by the sender of an event to give a
-hint if the event should be distributed across instances. For example JCR
-observation based events are already distributed on all instances, so there
-is no further need to distribute them. If the flag is present, the event
-will be distributed. The value has currently no meaning, however the
-EventUtil method should be used to add this property. If the flag is absent
-the event is distributed locally only.
-* _event.application_ - An identifier for the current application node in
-the cluster. This information will be used to detect if an event has been
-created on different nodes. If the event has been created on the same node,
-the _event.application_ is missing, if it is a remote event, the
-_event.application_ contains the ID of the node, the event has been
-initially created. Use the _EventUtil.isLocal(Event)_ method to detect if
-the event is a local or a distributed event.
-
-While the _event.distribute_ must be set by the sender of an event (if the
-event should be distributed), the _event.application_ property is
-maintained by the event mechanism. Therefore a client sending an event
-should *never* set this information by itself. This will confuse the local
-event handlers and result in unexpected behaviour. On remote events the
-_event.application_ is set by the event distribution mechanism.
+For distributed events two properties are defined (check the *EventUtil* class):
+* *event.distribute* - this flag is set by the sender of an event to give a hint if the event should be distributed across instances. For example JCR observation based events are already distributed on all instances, so there is no further need to distribute them. If the flag is present, the event will be distributed. The value has currently no meaning, however the EventUtil method should be used to add this property. If the flag is absent the event is distributed locally only.
+* *event.application* - An identifier for the current application node in the cluster. This information will be used to detect if an event has been created on different nodes. If the event has been created on the same node, the *event.application* is missing, if it is a remote event, the *event.application* contains the ID of the node, the event has been initially created. Use the *EventUtil.isLocal(Event)* method to detect if the event is a local or a distributed event.
+
+While the *event.distribute* must be set by the sender of an event (if the event should be distributed), the *event.application* property is maintained by the event mechanism. Therefore a client sending an event should *never* set this information by itself. This will confuse the local event handlers and result in unexpected behaviour. On remote events the *event.application* is set by the event distribution mechanism.
 
-<a name="ApacheSlingEventingandJobHandling-EventDistributionAcrossApplicationNodes(Cluster)"></a>
 ### Event Distribution Across Application Nodes (Cluster)
 
-The (local) event admin is the service distributing events locally. The
-Sling Distributing Event Handler is a registered event handler that is
-listening for events to be distributed. It distributes the events to remote
-application notes, the JCR repository is used for distribution. The
-distributing event handler writes the events into the repository, the
-distributing event handlers on other application nodes get notified through
-observation and then distribute the read events locally.
-
-As mentioned above, the client sending an event has to mark an event to be
-distributed in a cluster by setting the _event.distribute_ in the event
-properties (through _EventUtil_). This distribution mechanism has the
-advantage that the application nodes do not need to know each other and the
-distribution mechanism is independent from the used event admin
-implementation.
+The (local) event admin is the service distributing events locally. The Sling Distributing Event Handler is a registered event handler that is listening for events to be distributed. It distributes the events to remote application notes, the JCR repository is used for distribution. The distributing event handler writes the events into the repository, the distributing event handlers on other application nodes get notified through observation and then distribute the read events locally.
+
+As mentioned above, the client sending an event has to mark an event to be distributed in a cluster by setting the *event.distribute* in the event properties (through *EventUtil*). This distribution mechanism has the advantage that the application nodes do not need to know each other and the distribution mechanism is independent from the used event admin implementation.
 
-<a name="ApacheSlingEventingandJobHandling-StoringEventsintheRepository"></a>
 ### Storing Events in the Repository
 
-Distributable events are stored in the repository, the repository will have
-a specific area (path) where all events are stored. 
+Distributable events are stored in the repository, the repository will have a specific area (path) where all events are stored. 
 
 Each event is stored as a separate node with the following properties:
-<table>
-<tr><td> *Property Name*     </td><td> *Description* </td></tr>
-<tr><td> _event:topic_       </td><td> The topic of the event </td></tr>
-<tr><td> _event:application_ </td><td> The identifier of the application node where the
-event was created </td></tr>
-<tr><td> _event:created_     </td><td> The date and time when the event has been created
-(stored in the repository)
-</tr>
-<tr><td> _event:properties_  </td><td> Serialized properties (except the
-_event.distribute_, but including the _event.application_) </td></tr>
-</table>
+| *Property Name*     | *Description* |
+| *event:topic*       | The topic of the event |
+| *event:application* | The identifier of the application node where the event was created |
+| *event:created*     | The date and time when the event has been created (stored in the repository)
+| *event:properties*  | Serialized properties (except the *event.distribute*, but including the *event.application*) |
 
-Each application is periodically removing old events from the repository
-(using the scheduler).
+Each application is periodically removing old events from the repository (using the scheduler).
 
 
 {anchor:timed}
-<a name="ApacheSlingEventingandJobHandling-SendingScheduledEvents"></a>
 ### Sending Scheduled Events
 
-Scheduled events are OSGi events that have been created by the environemnt.
-They are generated on each application node of the cluster through an own
-scheduler instance. Sending these events works the same as sending events
-based on JCR events (see above).
+Scheduled events are OSGi events that have been created by the environemnt. They are generated on each application node of the cluster through an own scheduler instance. Sending these events works the same as sending events based on JCR events (see above).
 
-In most use cases a scheduler will send job events to ensure that exactly
-one application node is processing the event.
+In most use cases a scheduler will send job events to ensure that exactly one application node is processing the event.
 
-<a name="ApacheSlingEventingandJobHandling-ReceivingOSGiEvents"></a>
 ### Receiving OSGi Events
 
-If you want to receive OSGi events, you can just follow the specification:
-receive it via a custom event handler which is registered on bundle start -
-a filter can be specified as a configuration property of the handler. 
-
-As we follow the principle of distributing each event to every registered
-handler, the handler has to decide if it will process the event. In order
-to avoid multiple processing of this event in a clustered environment, the
-event handler should check the _event.application_ property. If it is not
-set, it's a local event and the handler should process the event. If the
-_event.application_ is set, it's a remote event and the handler should not
-process the event. This is a general rule of thumb - however, it's up to
-the handler to make its decision either on _event.application_ or any other
-information.
-
-It is advisable to perform the local event check even in a non clustered
-environment as it makes the migration to a cluster later on much easier and
-there is nearly no performance overhead caused by the check.
-
-The ~EventUtil class provides an utility method _isLocalEvent(Event)_ which
-checks the existance of the _event.application_ property and returns _true_
-if it is absend.
+If you want to receive OSGi events, you can just follow the specification: receive it via a custom event handler which is registered on bundle start - a filter can be specified as a configuration property of the handler. 
+
+As we follow the principle of distributing each event to every registered handler, the handler has to decide if it will process the event. In order to avoid multiple processing of this event in a clustered environment, the event handler should check the *event.application* property. If it is not set, it's a local event and the handler should process the event. If the *event.application* is set, it's a remote event and the handler should not process the event. This is a general rule of thumb - however, it's up to the handler to make its decision either on *event.application* or any other information.
+
+It is advisable to perform the local event check even in a non clustered environment as it makes the migration to a cluster later on much easier and there is nearly no performance overhead caused by the check.
+
+The ~EventUtil class provides an utility method *isLocalEvent(Event)* which checks the existance of the *event.application* property and returns *true* if it is absend.
 
-<a name="ApacheSlingEventingandJobHandling-Scheduler"></a>
 ## Scheduler
 
-Each Sling based application will contain a scheduler service (which is
-based on the Quartz open source project).
+Each Sling based application will contain a scheduler service (which is based on the Quartz open source project).
 
-<a name="ApacheSlingEventingandJobHandling-UseCases"></a>
 ## Use Cases
 
-<a name="ApacheSlingEventingandJobHandling-PostProcessing(BusinessProcesses)"></a>
 ### Post Processing (Business Processes)
 
-A typical example for post processing (or running a business process) is
-sending an email or creating thumbnails and extracting meta data from the
-content (like we do in DAM), which we will discuss here.
-
-An appropriate JCR observer will be registered. This observer detects when
-new content is put into the repository or when content is changed. In these
-cases it creates appropriate _CONTENT_ADDED_, _CONTENT_UPDATED_ OSGi events
-from the JCR events. In order to ensure that these actions get processed
-accordingly, the event is send as a job (with the special job topic, the
-_topic_ and _id_ property).
-
-The event admin now delivers these jobs to the registered handlers. The job
-event handler gets notified and (simplified version) sends the contained
-event synchronously. One of the handlers for these events is the post
-processing service in DAM. The job mechanism ensures that exactly one
-application node is post processing and that the process has to be finished
-even if the application node dies during execution.
+A typical example for post processing (or running a business process) is sending an email or creating thumbnails and extracting meta data from the content (like we do in DAM), which we will discuss here.
+
+An appropriate JCR observer will be registered. This observer detects when new content is put into the repository or when content is changed. In these cases it creates appropriate *CONTENT*ADDED*, *CONTENT*UPDATED* OSGi events from the JCR events. In order to ensure that these actions get processed accordingly, the event is send as a job (with the special job topic, the *topic* and *id* property).
+
+The event admin now delivers these jobs to the registered handlers. The job event handler gets notified and (simplified version) sends the contained event synchronously. One of the handlers for these events is the post processing service in DAM. The job mechanism ensures that exactly one application node is post processing and that the process has to be finished even if the application node dies during execution.
 
-<a name="ApacheSlingEventingandJobHandling-Scheduling"></a>
 ## Scheduling
 
-The scheduler is a service which uses the open source Quartz library. The
-scheduler has methods to start jobs periodically or with a cron definition.
-In addition, a service either implementing _java.lang.Runnable_ or
-_org.quartz.job_ is started through the whiteboard pattern *if* it either
-contains a configuration property _scheduler.expression_ or
-_scheduler.period_. The job is started with the ~PID of the service - if
-the service has no PID, the configuration property _scheduler.name_ must be
-set.
+The scheduler is a service which uses the open source Quartz library. The scheduler has methods to start jobs periodically or with a cron definition. In addition, a service either implementing *java.lang.Runnable* or *org.quartz.job* is started through the whiteboard pattern *if* it either contains a configuration property *scheduler.expression* or *scheduler.period*. The job is started with the ~PID of the service - if the service has no PID, the configuration property *scheduler.name* must be set.
\ No newline at end of file