incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r813967 [8/16] - /websites/staging/sling/trunk/content/
Date Sun, 22 Apr 2012 16:52:31 GMT
Added: websites/staging/sling/trunk/content/jackrabbit-persistence.html
==============================================================================
--- websites/staging/sling/trunk/content/jackrabbit-persistence.html (added)
+++ websites/staging/sling/trunk/content/jackrabbit-persistence.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,216 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Jackrabbit Persistence</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Jackrabbit Persistence</h1>
+      <div>
+	    <p><a name="JackrabbitPersistence-JackrabbitPersistence"></a></p>
+<h1 id="jackrabbit-persistence">Jackrabbit Persistence</h1>
+<p>Out-of-the-box the embedded Jackrabbit repository used by Sling (the
+Embedded Jackrabbit Repository bundle) uses Derby to persist the JCR nodes
+and properties. For some applications or environments it may be required or
+required to replace Derby with another backing store such as PostgreSQL or
+Oracle.</p>
+<p>This page is based on the journey of Tony Giaccone to get Sling running
+with a PostgreSQL based Jackrabbit instance.</p>
+<p><a name="JackrabbitPersistence-ManagementSummary"></a></p>
+<h2 id="management-summary">Management Summary</h2>
+<p>To replace Derby as the persistence manager for Jackrabbit the following
+steps are required:</p>
+<ol>
+<li>Provide a JDBC driver for your database as an OSGi bundle</li>
+<li>Reconfigure Jackrabbit to use your database</li>
+<li>(Re-) Start the Embedded Jackrabbit bundle</li>
+</ol>
+<p>When you are not using the Derby persistence manager, you may safely remove
+the Derby bundle from your Sling instance.</p>
+<p><a name="JackrabbitPersistence-JDBCDriver"></a></p>
+<h2 id="jdbc-driver">JDBC Driver</h2>
+<p>The hardest thing to do is probably getting the JDBC driver for your
+database. One option is to look at the bundles provided by Spring Source in
+their repository at http://www.springsource.com/repository/.</p>
+<p>Another option is to create the bundle on your own using Peter Kriens' <a href="http://www.aqute.biz/Code/Bnd">BND Tool</a>
+:</p>
+<ol>
+<li>Get the JDBC driver for your database from the driver provider</li>
+<li>
+<p>Wrap the JDBC driver library into an OSGi bundle:</p>
+<h1 id="example-for-postgresql-jdbc-3-driver-84-701">Example for PostgreSQL JDBC 3 driver 8.4-701</h1>
+<p>$ java -jar bnd.jar wrap postgresql-8.4-701.jdbc3.jar
+$ mv postgresql-8.4-701.jdbc3.bar postgresql-8.4-701.jdbc3-bnd.jar</p>
+</li>
+<li>
+<p>Deploy the driver to your local Maven 2 Repository (Required if adding
+the JDBC driver to a Maven build, e.g. using the Sling Launchpad Plugin)</p>
+<p>$ mvn install:install-file -DgroupId=postgresql -DartifactId=postgresql
+-Dversion=8.4.701.jdbc3 \
+        -Dpackaging=jar -Dfile=postgresql-8.4-701.jdbc3-bnd.jar </p>
+</li>
+</ol>
+<p>Tony reports no success with the Spring Source bundle, whily the BND
+approach worked for the PostgreSQL JDBC driver.</p>
+<p><a name="JackrabbitPersistence-ReplaceDerbyinarunningSlingInstance"></a></p>
+<h2 id="replace-derby-in-a-running-sling-instance">Replace Derby in a running Sling Instance</h2>
+<p>To replace Derby in a running Sling instance follow these steps (e.g.
+through the Web Console at <em>/system/console</em>):</p>
+<ol>
+<li>Uninstall the Apache Derby bundle</li>
+<li>Install the JDBC bundle prepared in the first step</li>
+<li>Stop the Jackrabbit Embedded Repository bundle\
+This needs to be reconfigured and restarted anyway. So lets just stop it to
+prevent failures in the next step.</li>
+<li>Refresh the packages (click the <em>Refresh Packages</em> button)</li>
+</ol>
+<p>Alternatively, you may wish to stop Sling after uninstalling Derby and
+installing the JDBC bundle. Technically, this is not required, though.</p>
+<p><a name="JackrabbitPersistence-ReconfiguringJackrabbit"></a></p>
+<h2 id="reconfiguring-jackrabbit">Reconfiguring Jackrabbit</h2>
+<p>To actually use a persistence manager other than the default (Derby)
+persistence manager, you have to configure Jackrabbit to use it. Create a
+<em>repository.xml</em> file in the <em>sling/jackrabbit</em> folder before starting
+Sling for the first time. If the repository was already started, you can
+also modify the existing file.</p>
+<p>To prepare a repository.xml file before first startup, use the {{<a href="http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml">repository.xml</a>
+}} as a template and modify it by replacing the <em><PersistenceManager></em>
+elements to refer to the selected persistence manager.</p>
+<p>If the file already exists, you can modifiy this existing file and there is
+no need to get the original from the SVN repository.</p>
+<p>For example to use PostgreSQL instead of Derby modify the
+<em><PersistenceManager></em> elements as follows:</p>
+<div class="codehilite"><pre><span class="nt">&lt;Repository&gt;</span>
+    ...
+    <span class="nt">&lt;Workspace</span> <span class="na">name=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">wsp</span><span class="o">.</span><span class="n">name</span><span class="cp">}</span><span class="s">&quot;</span><span class="nt">&gt;</span>
+    ...
+    <span class="nt">&lt;PersistenceManager</span>
+</pre></div>
+
+
+<p>class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager"&gt;
+            <param name="driver" value="org.postgresql.Driver"/>
+            <param name="url"
+value="jdbc:postgresql://localhost:5432/YOUR_DB_NAME_HERE"/>
+            <param name="schema" value="postgresql"/>
+            <param name="user" value="YOUR_USER_HERE"/>
+            <param name="password" value="YOUR_PASSWORD_HERE"/>
+            <param name="schemaObjectPrefix" value="jcr_${wsp.name}_"/>
+            <param name="externalBLOBs" value="false"/>
+        </PersistenceManager>
+        ...
+        </Workspace></p>
+<div class="codehilite"><pre>    <span class="nt">&lt;Versioning</span> <span class="na">rootPath=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">rep</span><span class="o">.</span><span class="n">home</span><span class="cp">}</span><span class="s">/version&quot;</span><span class="nt">&gt;</span>
+    ...
+    <span class="nt">&lt;PersistenceManager</span>
+</pre></div>
+
+
+<p>class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager"&gt;
+            <param name="driver" value="org.postgresql.Driver"/>
+            <param name="url"
+value="jdbc:postgresql://localhost:5432/YOUR_DB_NAME_HERE"/>
+            <param name="schema" value="postgresql"/>
+            <param name="user" value="YOUR_USER_HERE"/>
+            <param name="password" value="YOUR_PASSWORD_HERE"/>
+            <param name="schemaObjectPrefix" value="version_"/>
+            <param name="externalBLOBs" value="false"/>
+        </PersistenceManager>
+        </Versioning>
+        ...
+    </Repository></p>
+<p>Modify the <em>url</em>, <em>user</em>, and <em>password</em> parameters to match your
+database setup.</p>
+<p>If you reconfigure Jackrabbit to use the new persistence manager, the
+existing repository data in the <em>sling/jackrabbit</em> directory, except the
+<em>repository.xml</em> file, of course, should now be removed.</p>
+<p>Finally either start Sling or start the Jackrabbit Embedded Repository
+bundle.</p>
+<p><a name="JackrabbitPersistence-Credits"></a></p>
+<h2 id="credits">Credits</h2>
+<p>This description is based on Tony Giaccone's description <a href="http://markmail.org/message/wlbfrukmjjsl33hh">Swapping Postgres for Derby</a>
+ sent to the Sling Users mailing list.</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/jcr-installer-provider.html
==============================================================================
--- websites/staging/sling/trunk/content/jcr-installer-provider.html (added)
+++ websites/staging/sling/trunk/content/jcr-installer-provider.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,253 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - JCR Installer Provider</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">JCR Installer Provider</h1>
+      <div>
+	    <p>The JCR installer provider scans the JCR repository for artifacts and
+provides them to the <a href="slingxsite:osgi-installer.html">OSGI installer</a>
+.</p>
+<p><a name="JCRInstallerProvider-ConfigurationandScanning"></a></p>
+<h2 id="configuration-and-scanning">Configuration and Scanning</h2>
+<p>The JCR installer provider can be configured with weighted paths which are
+scanned. By default, the installer scans in <em>/apps</em> and <em>/libs</em> where
+artifacts found in <em>/apps</em> get a higher priority. The installer does a deep
+scan and uses a regular expression to detect folders containing artifacts
+to be installed. By default, artifacts from within a folder named <em>install</em>
+are provided to the OSGi installer.</p>
+<p>If such an install folder contains a binary artifact (e.g. a bundle) this
+is provided to the OSGi installer. In addition a node of type
+<em>sling:OsgiConfig</em> is provided as a configuration to the installer.</p>
+<p>The jcr installer provider does not check or scan the artifacts itself, the
+detection and installation is deferred to the OSGi installer.</p>
+<p><a name="JCRInstallerProvider-RunmodeSupport"></a></p>
+<h3 id="runmode-support">Runmode Support</h3>
+<p>The JCR installer supports run modes for installing artifacts. By default folders named <em>install</em> are checked for artifacts. If Apache Sling is started with one (or more run modes), all folders named <em>install.<a href="runmode.html">RUNMODE</a>
+</em> are scanned as well. To be precise, the folder name can be followed by
+any number of run modes separated by comma. For example, if started with
+run modes <em>dev</em>, <em>a1</em>, and <em>public</em>, folders like <em>install.dev</em>,
+<em>install.a1</em>, <em>install.public</em> are searched as well as <em>install.dev.a1</em>, or
+<em>install.a1.dev</em>.</p>
+<p>Artifacts from folders with a run mode get a higher priority. For example
+by default, an <em>install</em> folder underneath <em>/libs</em> gets the priority <em>50</em>.
+For each run mode in the folder name, this priority is increased by <em>1</em>, so
+<em>install.dev</em> has <em>51</em> and <em>install.a1.dev</em> is <em>52</em>.</p>
+<p><a name="JCRInstallerProvider-Example"></a></p>
+<h1 id="example">Example</h1>
+<p>Here's a quick walkthrough of the JCR installer functionality.</p>
+<p><a name="JCRInstallerProvider-Installation"></a></p>
+<h2 id="installation">Installation</h2>
+<p>Start the Sling <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/app">launchpad/app</a>
+ and install and start the following additional bundles:
+<em> <a href="run-modes-(org.apache.sling.runmode).html">RunMode service</a>
+</em> OSGi installer service (<a href="http://svn.apache.org/repos/asf/sling/trunk/installer/core">org.apache.sling.osgi.installer</a>
+)
+* JCR installer provider (<a href="http://svn.apache.org/repos/asf/sling/trunk/installer/providers/jcr">org.apache.sling.jcr.jcrinstall</a>
+)</p>
+<p>To watch the logs produced by these modules, you can filter
+<em>sling/logs/error.log</em> using <em>egrep 'jcrinstall|osgi.installer'</em>.</p>
+<p><a name="JCRInstallerProvider-Installandremoveabundle"></a></p>
+<h2 id="install-and-remove-a-bundle">Install and remove a bundle</h2>
+<p>We'll use the <a href="http://www.knopflerfish.org/releases/2.0.5/jars/desktop_awt/desktop_awt_all-2.0.0.jar">Knopflerfish Desktop</a>
+ bundle for this example, it is convenient as it displays a graphical user
+interface when started.</p>
+<p>We use <em>curl</em> to create content, to make it easy to reproduce the example
+by copying and pasting the <em>curl</em> commands. Any other way to create
+content in the repository will work, of course.</p>
+<p>By default, JCRInstall picks up bundles found in folders named <em>install</em>
+under <em>/libs</em> and <em>/apps</em>, so we start by creating such a folder:</p>
+<div class="codehilite"><pre><span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">MKCOL</span>  <span class="n">http:</span><span class="sr">//</span><span class="n">admin:admin</span><span class="nv">@localhost:8888</span><span class="sr">/apps/</span><span class="n">jcrtest</span>
+<span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">MKCOL</span>  <span class="n">http:</span><span class="sr">//</span><span class="n">admin:admin</span><span class="nv">@localhost:8888</span><span class="sr">/apps/</span><span class="n">jcrtest</span><span class="o">/</span><span class="n">install</span>
+</pre></div>
+
+
+<p>And we copy the bundle to install in that folder (a backslash in command
+lines means <em>continued on next line</em>):</p>
+<div class="codehilite"><pre><span class="n">curl</span> <span class="o">-</span><span class="n">T</span> <span class="n">desktop_awt_all</span><span class="o">-</span><span class="mf">2.0.0</span><span class="o">.</span><span class="n">jar</span> <span class="o">\</span>
+</pre></div>
+
+
+<p>http://admin:admin@localhost:8888/apps/jcrtest/install/desktop_awt_all-2.0.0.jar</p>
+<p>That's it. After 2-3 seconds, the bundle should be picked up by JCRInstall,
+installed and started. If this works you'll see a small <em>Knopflerfish
+Desktop</em> window on your desktop, and Sling's OSGi console can of course be
+used to check the details.</p>
+<p>Removing the bundle from the repository will cause it to be uninstalled,
+so:</p>
+<div class="codehilite"><pre><span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">DELETE</span> <span class="o">\</span>
+</pre></div>
+
+
+<p>http://admin:admin@localhost:8888/apps/jcrtest/install/desktop_awt_all-2.0.0.jar</p>
+<p>Should cause the <em>Knopflerfish Desktop</em> window to disappear as the bundle
+is uninstalled.</p>
+<p><a name="JCRInstallerProvider-Install,modifyandremoveaconfiguration"></a></p>
+<h2 id="install-modify-and-remove-a-configuration">Install, modify and remove a configuration</h2>
+<p>JCRInstall installs OSGi configurations from nodes having the
+<em>sling:OsgiConfig</em> node type, found in folders named <em>install</em> under the
+installation roots (/apps and /libs).</p>
+<p>Let's try this feature by creating a configuration with two properties:</p>
+<div class="codehilite"><pre><span class="n">curl</span> <span class="o">\</span>
+  <span class="o">-</span><span class="n">F</span> <span class="s">&quot;jcr:primaryType=sling:OsgiConfig&quot;</span> <span class="o">\</span>
+  <span class="o">-</span><span class="n">F</span> <span class="n">foo</span><span class="o">=</span><span class="n">bar</span> <span class="o">-</span><span class="n">F</span> <span class="n">works</span><span class="o">=</span><span class="n">yes</span> <span class="o">\</span>
+  <span class="n">http:</span><span class="sr">//</span><span class="n">admin:admin</span><span class="nv">@localhost:8888</span><span class="sr">/apps/</span><span class="n">jcrtest</span><span class="sr">/install/som</span><span class="n">e</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+</pre></div>
+
+
+<p>And verify the contents of our config node:</p>
+<div class="codehilite"><pre><span class="n">curl</span> <span class="o">\</span>
+</pre></div>
+
+
+<p>http://admin:admin@localhost:8888/apps/jcrtest/install/some.config.pid.json</p>
+<p>Which should display something like</p>
+<div class="codehilite"><pre><span class="p">{</span><span class="s">&quot;foo&quot;</span><span class="p">:</span><span class="s">&quot;bar&quot;</span><span class="p">,</span>
+<span class="s">&quot;jcr:created&quot;</span><span class="p">:</span><span class="s">&quot;Wed Aug 26 2009 17:06:40GMT+0200&quot;</span><span class="p">,</span>
+<span class="s">&quot;jcr:primaryType&quot;</span><span class="p">:</span><span class="s">&quot;sling:OsgiConfig&quot;</span><span class="p">,</span><span class="s">&quot;works&quot;</span><span class="p">:</span><span class="s">&quot;yes&quot;</span><span class="p">}</span>
+</pre></div>
+
+
+<p>At this point, JCRInstall should have picked up our new config and
+installed it. The logs would confirm that, but we can also use the OSGi
+console's config status page (http://localhost:8888/system/console/config)
+to check it. That page should now contain:</p>
+<div class="codehilite"><pre><span class="n">PID</span><span class="o">=</span><span class="n">some</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+  <span class="n">BundleLocation</span><span class="o">=</span><span class="n">Unbound</span>
+  <span class="n">_jcr_config_path</span><span class="o">=</span><span class="n">jcrinstall:</span><span class="sr">/apps/</span><span class="n">jcrtest</span><span class="sr">/install/som</span><span class="n">e</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+  <span class="n">foo</span><span class="o">=</span><span class="n">bars</span>
+  <span class="n">service</span><span class="o">.</span><span class="n">pid</span><span class="o">=</span><span class="n">some</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+  <span class="n">works</span><span class="o">=</span><span class="n">yes</span>
+</pre></div>
+
+
+<p>Indicating that the configuration has been installed.</p>
+<p>Let's try modifying the configuration parameters:</p>
+<div class="codehilite"><pre><span class="n">curl</span> <span class="o">\</span>
+  <span class="o">-</span><span class="n">F</span> <span class="n">works</span><span class="o">=</span><span class="n">updated</span> <span class="o">-</span><span class="n">F</span> <span class="n">even</span><span class="o">=</span><span class="n">more</span> <span class="o">\</span>
+  <span class="n">http:</span><span class="sr">//</span><span class="n">admin:admin</span><span class="nv">@localhost:8888</span><span class="sr">/apps/</span><span class="n">jcrtest</span><span class="sr">/install/som</span><span class="n">e</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+</pre></div>
+
+
+<p>And check the changes in the console page:</p>
+<div class="codehilite"><pre><span class="n">PID</span><span class="o">=</span><span class="n">some</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+  <span class="n">BundleLocation</span><span class="o">=</span><span class="n">Unbound</span>
+  <span class="n">_jcr_config_path</span><span class="o">=</span><span class="n">jcrinstall:</span><span class="sr">/apps/</span><span class="n">jcrtest</span><span class="sr">/install/som</span><span class="n">e</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+  <span class="n">even</span><span class="o">=</span><span class="n">more</span>
+  <span class="n">foo</span><span class="o">=</span><span class="n">bars</span>
+  <span class="n">service</span><span class="o">.</span><span class="n">pid</span><span class="o">=</span><span class="n">some</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+  <span class="n">works</span><span class="o">=</span><span class="n">updated</span>
+</pre></div>
+
+
+<p>We can now delete the configuration node:</p>
+<div class="codehilite"><pre><span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">DELETE</span> <span class="o">\</span>
+  <span class="n">http:</span><span class="sr">//</span><span class="n">admin:admin</span><span class="nv">@localhost:8888</span><span class="sr">/apps/</span><span class="n">jcrtest</span><span class="sr">/install/som</span><span class="n">e</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">pid</span>
+</pre></div>
+
+
+<p>And verify that the corresponding configuration is gone in the console page
+(after 1-2 seconds, like for all other JCRInstall operations).</p>
+<p><em>TODO:</em> A node named like <em>o.a.s.foo.bar-a</em> uses <em>o.a.s.foo.bar</em> as its
+factory PID creating a configuration with an automatically generated PID.
+The value of <em>a</em> is stored as an alias property in the configuration to
+correlate the configuration object with the repository node - demonstrate
+that.</p>
+<p><a name="JCRInstallerProvider-AutomatedTests"></a></p>
+<h1 id="automated-tests">Automated Tests</h1>
+<p>The following modules contain lots of automated tests (under <em>src/test</em>,
+as usual):</p>
+<ul>
+<li>OSGi installer integration tests (<a href="http://svn.apache.org/repos/asf/sling/trunk/installer/it">org.apache.sling.installer.it</a>
+)</li>
+<li>JCR installer service (<a href="http://svn.apache.org/repos/asf/sling/trunk/installer/providers/jcr">org.apache.sling.installer.providers.jcr</a>
+)</li>
+</ul>
+<p>Many of these tests are fairly readable, and can be used to find out in
+more detail how these modules work.</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/jspc.html
==============================================================================
--- websites/staging/sling/trunk/content/jspc.html (added)
+++ websites/staging/sling/trunk/content/jspc.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,170 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - JspC</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">JspC</h1>
+      <div>
+	    <p><a name="JspC-MavenJspCPlugin"></a></p>
+<h1 id="maven-jspc-plugin">Maven JspC Plugin</h1>
+<p>{excerpt:hidden=true}Compiles JSP scripts into class files and generates
+Declarative Service Descriptors to register the compiled JSPs as
+services{excerpt}</p>
+<p>The Maven JspC Plugin provides a single goal <em>jspc</em> which is by default
+executed in the <em>compile</em> phase of the Maven build process. This goal
+takes all JSP source files from a configured location (<em>src/main/scripts</em>
+by default) and compiles them into classes in a configurable location
+(<em>target/jspc-plugin-generated</em> by default). In addition, for each
+compiled JSP a Declarative Services descriptor is generated and written to
+a descriptor file (<em>OSGI-INF/jspServiceComponents.xml</em> in the output
+location). This descriptor will then be read by the Service Component
+Runtime of the deployment OSGi framework to register all contained JSP as
+<em>javax.servlet.Servlet</em> services.</p>
+<p><a name="JspC-Use"></a></p>
+<h2 id="use">Use</h2>
+<p>To use the Maven JspC Plugin define the following elements in the
+<em><plugins></em> section of the POM:</p>
+<div class="codehilite"><pre><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;</span>
+<span class="nt">&lt;project&gt;</span>
+    ....
+    <span class="nt">&lt;build&gt;</span>
+    ....
+    <span class="nt">&lt;plugins&gt;</span>
+        ....
+        <span class="nt">&lt;plugin&gt;</span>
+        <span class="nt">&lt;groupId&gt;</span>org.apache.sling<span class="nt">&lt;/groupId&gt;</span>
+        <span class="nt">&lt;artifactId&gt;</span>maven-jspc-plugin<span class="nt">&lt;/artifactId&gt;</span>
+        <span class="nt">&lt;executions&gt;</span>
+            <span class="nt">&lt;execution&gt;</span>
+            <span class="nt">&lt;id&gt;</span>compile-jsp<span class="nt">&lt;/id&gt;</span>
+            <span class="nt">&lt;goals&gt;</span>
+                <span class="nt">&lt;goal&gt;</span>jspc<span class="nt">&lt;/goal&gt;</span>
+            <span class="nt">&lt;/goals&gt;</span>
+            <span class="nt">&lt;/execution&gt;</span>
+        <span class="nt">&lt;/executions&gt;</span>
+        <span class="nt">&lt;/plugin&gt;</span>
+        ....
+    <span class="nt">&lt;plugins&gt;</span>
+    ....
+    <span class="nt">&lt;build&gt;</span>
+    ....
+<span class="nt">&lt;project&gt;</span>
+</pre></div>
+
+
+<p><a name="JspC-Configuration"></a></p>
+<h2 id="configuration">Configuration</h2>
+<p>The Maven JspC Plugin may be configured in the <em><configuration></em> element
+using the following properties:</p>
+<table>
+<tr><th> Parameter </th><th> Default Value </th><th> Description </th></tr>
+<tr><td> *sourceDirectory* </td><td> *$\{project.build.scriptSourceDirectory*} </td><td>
+Location of the JSP source file; may be overwritten using the
+*jspc.sourceDirectory* system property. </td></tr>
+<tr><td> *outputDirectory* </td><td>
+*$\{project.build.directory}/jspc-plugin-generated* </td><td> Target directory
+for the compiled JSP classes; may be overwritten using the
+*jspc.outputDirectory* system propertiy. </td></tr>
+<tr><td> *compilerTargetVM* </td><td> *1.5* </td><td> The Target Virtual Machine Version to
+generate class files for; may be overwritten using the
+*jspc.compilerTargetVM* system property. </td></tr>
+<tr><td> *compilerSourceVM* </td><td> *1.5* </td><td> The Compiler Source Version of the Java
+source generated from the JSP files before compiling into classes; may be
+overwritten using the *jspc.compilerSourceVM* system property. </td></tr>
+<tr><td> *servletPackage* </td><td> *org.apache.jsp* </td><td> The root package name for the
+generated class files; may be overwritten using the *jspc.servletPackage*
+system property. </td></tr>
+</table>
+
+<p><a name="JspC-Notes"></a></p>
+<h2 id="notes">Notes</h2>
+<p>The generated JSP classes as well as the Declarative Services descriptor
+are automatically copied to the generated bundle jar file if the Maven
+Bundle Plugin (from the Apache Felix) project is used to build the project
+package.</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/launch-sling.html
==============================================================================
--- websites/staging/sling/trunk/content/launch-sling.html (added)
+++ websites/staging/sling/trunk/content/launch-sling.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Launch Sling</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Launch Sling</h1>
+      <div>
+	    <p>Please refer to <a href="the-sling-launchpad.html">The Sling Launchpad</a>
+ for up-to-date information on launching Sling.</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/links.html
==============================================================================
--- websites/staging/sling/trunk/content/links.html (added)
+++ websites/staging/sling/trunk/content/links.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Links</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Links</h1>
+      <div>
+	    <p><a name="Links-Links"></a></p>
+<h1 id="links">Links</h1>
+<p>Here are some links to other resources</p>
+<p><a name="Links-Articles"></a></p>
+<h2 id="articles">Articles</h2>
+<ul>
+<li><a href="http://java.dzone.com/articles/java-content-repository-best">Java Content Repository: The Best Of Both Worlds</a></li>
+<li>by Bertrand Delacretaz on Javalobby - uses the Sling HTTP interface to
+demonstrate JCR features.</li>
+<li><a href="http://www.lucamasini.net/Home/sling-and-cq5/accessing-relational-data-as-sling-restful-urls">Accessing Relational Data as SLING RESTful URLs</a></li>
+<li>by Luca Masini</li>
+<li><a href="http://confluence.sakaiproject.org/display/KERNDOC/Your+First+Day+With+Sakai+Nakamura">Your First Day With Sakai Nakamura</a></li>
+<li>Sakai Nakamura is based on Sling, that introductory article has very
+good explanations of REST and Sling basics, and on why hierarchies are
+useful on the Web.</li>
+</ul>
+<p><a name="Links-AboutSling"></a></p>
+<h2 id="about-sling">About Sling</h2>
+<ul>
+<li><a href="http://dev.day.com/microsling/content/blogs/main.html?category=sling">Sling on dev.day.com</a></li>
+<li>Day's developers blog, regularly includes articles on Sling and JCR.
+Powered by Sling, of course.</li>
+<li><a href="http://weblogs.goshaky.com/weblogs/lars/tags/sling">Sling on Lars Trieloff's Blog</a></li>
+<li>Lars regularly writes on his experiences with Sling. Most notably the
+mini series of three entries introducing Sling and microsling.</li>
+<li><a href="http://del.icio.us/tag/sling+jcr">Sling links at del.icio.us</a></li>
+<li>If you're a del.icio.us user, please tag Sling-related posts with both
+<em>sling</em> and <em>jcr</em> tags, so that they appear in that list.</li>
+<li><a href="http://fisheye6.atlassian.com/browse/sling">Sling on Fisheye</a></li>
+<li>code repository viewer, activity statistics, etc.</li>
+<li><a href="https://www.ohloh.net/p/sling">Sling on ohloh</a></li>
+<li>activity and community statistics.</li>
+<li><a href="http://sling.markmail.org/">Sling on MarkMail</a></li>
+<li>searchable mailing list archives.</li>
+</ul>
+<p><a name="Links-ProjectsusingSling"></a></p>
+<h2 id="projects-using-sling">Projects using Sling</h2>
+<ul>
+<li>Gert Vanthienen succeeded in installing Sling into the new Apache
+ServiceMix kernel and documented his experience <a href="http://servicemix.apache.org/SMX4KNL/running-apache-sling-on-servicemix-kernel.html">Sling On ServiceMix Kernel</a></li>
+</ul>
+<p><a name="Links-SlingPresentationsandScreencasts"></a></p>
+<h2 id="sling-presentations-and-screencasts">Sling Presentations and Screencasts</h2>
+<ul>
+<li><a href="http://www.slideshare.net/tag/sling">Presentations tagged with "sling" at slideshare</a></li>
+</ul>
+<p>The following screencasts demonstrate Day Software's CRX quickstart
+product, powered by Sling:
+   * <a href="http://dev.day.com/microsling/content/blogs/main/firststeps1.html">First Steps with CRX Quickstart</a>
+   * <a href="http://dev.day.com/microsling/content/blogs/main/firststeps2.html">TheServerSide.com in 15 minutes</a></p>
+<p><a name="Links-FromApacheConEU08"></a></p>
+<h2 id="from-apachecon-eu-08">From ApacheCon EU 08</h2>
+<ul>
+<li><a href="^apacheconeu08_fft_sling.pdf.html">ApacheCon EU 08 Fast Feather Track Presentation on Sling</a></li>
+<li><a href="^apacheconeu08_jcr_meetup_sling_architecture.pdf.html">JCR Meetup Presentation on Sling Architecture</a></li>
+</ul>
+<p><a name="Links-FromApacheConUS07"></a></p>
+<h2 id="from-apachecon-us-07">From ApacheCon US 07</h2>
+<ul>
+<li><a href="^apacheconus07_fft_sling.pdf.html">ApacheCon US 07 Fast Feather Track Presentation on Sling</a></li>
+<li><a href="http://feathercast.org/?p=59">Feathercast On Day 4 with an interview on Sling with Felix</a></li>
+</ul>
+<p><a name="Links-TechnologyusedbySling"></a></p>
+<h2 id="technology-used-by-sling">Technology used by Sling</h2>
+<ul>
+<li><a href="http://jackrabbit.apache.org">Apache Jackrabbit</a></li>
+<li>The reference implementation of the Content Repository for Java (JCR)
+Specification. This implementation is used in Sling as the primary
+repository.</li>
+<li><a href="http://www.jcp.org/en/jsr/detail?id=170">JSR 170: Content Repository for Java{tm} technology API</a></li>
+<li>The specification of the repository API.</li>
+<li><a href="http://felix.apache.org">Apache Felix</a></li>
+<li>The OSGi Framework implementation we use in Sling.</li>
+<li><a href="http://www.osgi.org">The OSGi Alliance</a></li>
+<li>The OSGi Alliance is the specification body defining the OSGi Core and
+Compendium Services. These specifications are at the center of making Sling
+possible.</li>
+</ul>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>

Added: websites/staging/sling/trunk/content/logging.html
==============================================================================
--- websites/staging/sling/trunk/content/logging.html (added)
+++ websites/staging/sling/trunk/content/logging.html Sun Apr 22 16:52:28 2012
@@ -0,0 +1,281 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  <head>
+    <title>Apache Sling - Logging</title>
+    <link rel="stylesheet" href="http://sling.apache.org/site/media.data/site.css" type="text/css" media="all">
+    <link rel="icon" href="http://sling.apache.org/site/media.data/favicon.ico">
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="http://sling.apache.org/site/index.html">
+          <img border="0" alt="Apache Sling" src="http://sling.apache.org/site/media.data/logo.png">
+        </a>
+      </div>
+      <div class="header">
+        <a href="http://www.apache.org/">
+          <img border="0" alt="Apache" src="http://sling.apache.org/site/media.data/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="getting-started.html">Getting Started</a></li>
+<li><a href="the-sling-engine.html">The Sling Engine</a></li>
+<li><a href="development.html">Development</a></li>
+<li><a href="bundles.html">Bundles</a></li>
+<li><a href="tutorials-&amp;-how-tos.html">Tutorials &amp; How-Tos</a></li>
+<li><a href="configuration.html">Configuration</a></li>
+<li><a href="http://sling.apache.org/apidocs/sling5/index.html">API docs</a></li>
+<li><a href="http://s.apache.org/sling.wiki">Wiki</a></li>
+<li><a href="http://s.apache.org/sling.faq">FAQ</a></li>
+</ul>
+<h1 id="project-info">Project info</h1>
+<ul>
+<li><a href="http://sling.apache.org/site/downloads.cgi">Downloads</a></li>
+<li><a href="http://www.apache.org/licenses/">License</a></li>
+<li><a href="contributing.html">Contributing</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="links.html">Links</a></li>
+<li><a href="project-information.html">Project Information</a></li>
+<li><a href="https://issues.apache.org/jira/browse/SLING">Issue Tracker</a></li>
+<li><a href="http://svn.apache.org/viewvc/sling/trunk">Browse Source Repository</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+<h1 id="sponsorship">Sponsorship</h1>
+<ul>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/foundation/buy_stuff.html">Buy Stuff</a></li>
+</ul>
+<iframe 
+    src="http://www.apache.org/ads/button.html"
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+		(TODO: breadcrumb here)
+      </div>
+      <h1 class="title">Logging</h1>
+      <div>
+	    <p><a name="Logging-Logging"></a></p>
+<h1 id="logging">Logging</h1>
+<p><a name="Logging-Introduction"></a></p>
+<h2 id="introduction">Introduction</h2>
+<p>Logging in Sling is supported by the <em>org.apache.sling.commons.log</em>
+bundle, which is one of the first bundles installed and started by the
+Sling Launcher. The <em>org.apache.sling.commons.log</em> bundle has the
+following tasks:</p>
+<ul>
+<li>Implements the OSGi Log Service Specification and registers the
+<em>LogService</em> and <em>LogReader</em> services</li>
+<li>Exports three commonly used logging APIs:
+      <strong> <a href="-http://www.slf4j.org.html">Simple Logging Facade for Java (SLF4J)</a>
+    <br />
+</strong> <a href="http://jakarta.apache.org/commons/logging">Apache Commons Logging</a>
+      <strong> <a href="http://logging.apache.org/log4j/index.html">log4j</a>
+    <br />
+</strong> <a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html">java.util.logging</a>
+ (as of r1169918)</li>
+<li>Configures logging through our own implementation of the SLF4J backend
+API</li>
+</ul>
+<p><a name="Logging-InitialConfiguration"></a></p>
+<h2 id="initial-configuration">Initial Configuration</h2>
+<p>The <em>org.apache.sling.commons.log</em> bundle gets the initial configuration
+from the following <em>BundleContext</em> properties:</p>
+<table>
+<tr><th> Property </th><th> Default </th><th> Description </th></tr>
+<tr><td> *org.apache.sling.commons.log.level* </td><td> *INFO* </td><td> Sets the initial
+logging level of the root logger. This may be any of the defined logging
+levels *DEBUG*, *INFO*, *WARN*, *ERROR* and *FATAL*. </td></tr>
+<tr><td> *org.apache.sling.commons.log.file* </td><td> undefined </td><td> Sets the log file to
+which log messages are written. If this property is empty or missing, log
+messages are written to *System.out*. </td></tr>
+<tr><td> *org.apache.sling.commons.log.file.number* </td><td> 5 </td><td> The number of rotated
+files to keep. </td></tr>
+<tr><td> *org.apache.sling.commons.log.file.size* </td><td> '.'yyyy-MM-dd </td><td> Defines how
+the log file is rotated (by schedule or by size) and when to rotate. See
+the section _Log File Rotation_ below for full details on log file
+rotation. </td></tr>
+<tr><td> *org.apache.sling.commons.log.pattern* </td><td> \{0,date,dd.MM.yyyy HH:mm:ss.SSS\} \*\{4\}\* \[\{2\}\](\{2\}\.html)
+ \{3\} \{5\} </td><td> The *MessageFormat* pattern to use for formatting log
+messages with the root logger. </td></tr>
+<tr><td> *org.apache.sling.commons.log.julenabled* </td><td> n/a </td><td> Enables the
+*java.util.logging* support. </td></tr>
+</table>
+
+<p><a name="Logging-UserConfiguration"></a></p>
+<h2 id="user-configuration">User Configuration</h2>
+<p>User Configuration after initial configuration is provided by the
+Configuration Admin Service. To this avail two
+<em>org.osgi.services.cm.ManagedServiceFactory</em> services are registered
+under the PIDs <em>org.apache.sling.commons.log.LogManager.factory.writer</em>
+and <em>org.apache.sling.commons.log.LogManager.factory.config</em> which may
+receive configuration.</p>
+<p><a name="Logging-LoggerConfiguration"></a></p>
+<h3 id="logger-configuration">Logger Configuration</h3>
+<p>Loggers (or Categories) can be configured to log to specific files at
+specific levels using configurable patterns. To this avail factory
+configuration instances with factory PID
+<em>org.apache.sling.commons.log.LogManager.factory.config</em> may be created
+and configured with the Configuration Admin Service.</p>
+<p>The following properties may be set:</p>
+<table>
+<tr><th> Property </th><th> Type </th><th> Default </th><th> Description </th></tr>
+<tr><td> *org.apache.sling.commons.log.level* </td><td> String </td><td> *INFO* </td><td> Sets the
+logging level of the loggers. This may be any of the defined logging levels
+*DEBUG*, *INFO*, *WARN*, *ERROR* and *FATAL*. </td></tr>
+<tr><td> *org.apache.sling.commons.log.file* </td><td> String </td><td> undefined </td><td> Sets the log
+file to which log messages are written. If this property is empty or
+missing, log messages are written to *System.out*. This property should
+refer to the file name of a configured Log Writer (see below). If no Log
+Writer is configured with the same file name an implicit Log Writer
+configuration with default configuration is created. </td></tr>
+<tr><td> *org.apache.sling.commons.log.pattern* </td><td> String </td><td> \{0,date,dd.MM.yyyy HH:mm:ss.SSS\} \*\{4\}\* \[\{2\}\](\{2\}\.html)
+ \{3\} \{5\} </td><td> The *java.util.MessageFormat* pattern to use for
+formatting log messages with the root logger. This is a
+*java.util.MessageFormat* pattern supporting up to six arguments: \{0\}
+The timestamp of type *java.util.Date*, \{1\} the log marker, \{2\} the
+name of the current thread, \{3\} the name of the logger, \{4\} the debug
+level and \{5\} the actual debug message. If the log call includes a
+Throwable, the stacktrace is just appended to the message regardless of the
+pattern. </td></tr>
+<tr><td> *org.apache.sling.commons.log.names* </td><td> String[](.html)
+ </td><td> -- </td><td> A list of logger names to which this configuration applies. </td></tr>
+</table>
+
+<p>Note that multiple Logger Configurations may refer to the same Log Writer
+Configuration. If no Log Writer Configuration exists whose file name
+matches the file name set on the Logger Configuration an implicit Log
+Writer Configuration with default setup (daily log rotation) is internally
+created. </p>
+<p><a name="Logging-LogWriterConfiguration"></a></p>
+<h3 id="log-writer-configuration">Log Writer Configuration</h3>
+<p>Log Writer Configuration is used to setup file output and log file rotation
+characteristics for log writers used by the Loggers.</p>
+<p>The following properties may be set:</p>
+<table>
+<tr><th> Property </th><th> Default </th><th> Description </th></tr>
+<tr><td> *org.apache.sling.commons.log.file* </td><td> undefined </td><td> Sets the log file to
+which log messages are written. If this property is empty or missing, log
+messages are written to *System.out*. </td></tr>
+<tr><td> *org.apache.sling.commons.log.file.number* </td><td> 5 </td><td> The number of rotated
+files to keep. </td></tr>
+<tr><td> *org.apache.sling.commons.log.file.size* </td><td> '.'yyyy-MM-dd </td><td> Defines how
+the log file is rotated (by schedule or by size) and when to rotate. See
+the section _Log File Rotation_ below for full details on log file
+rotation. </td></tr>
+</table>
+
+<p>See the section <em>Log File Rotation</em> below for full details on the
+<em>org.apache.sling.commons.log.file.size</em> and
+<em>org.apache.sling.commons.log.file.number</em> properties.</p>
+<p><a name="Logging-LogFileRotation"></a></p>
+<h2 id="log-file-rotation">Log File Rotation</h2>
+<p>Log files can grow rather quickly and fill up available disk space. To cope
+with this growth log files may be rotated in two ways: At specific times or
+when the log file reaches a configurable size. The first method is called
+<em>Scheduled Rotation</em> and is used by specifying a <em>SimpleDateFormat</em>
+pattern as the log file "size". The second method is called <em>Size Rotation</em>
+and is used by setting a maximum file size as the log file size.</p>
+<p>As of version 2.0.6 of the Sling Commons Log bundle, the default value for
+log file scheduling is <em>'.'yyyy-MM-dd</em> causing daily log rotation.
+Previously log rotation defaulted to a 10MB file size limit.</p>
+<p><a name="Logging-ScheduledRotation"></a></p>
+<h3 id="scheduled-rotation">Scheduled Rotation</h3>
+<p>The rolling schedule is specified by setting the
+<em>org.apache.sling.commons.log.file.size</em> property to a
+<em>java.text.SimpleDateFormat</em> pattern. Literal text (such as a leading
+dot) to be included must be <em>enclosed</em> within a pair of single quotes. A
+formatted version of the date pattern is used as the suffix for the rolled
+file name.</p>
+<p>For example, if the log file is configured as <em>/foo/bar.log</em> and the
+pattern set to <em>'.'yyyy-MM-dd</em>, on 2001-02-16 at midnight, the logging
+file <em>/foo/bar.log</em> will be renamed to <em>/foo/bar.log.2001-02-16</em> and
+logging for 2001-02-17 will continue in a new <em>/foo/bar.log</em> file until
+it rolls over the next day.</p>
+<p>It is possible to specify monthly, weekly, half-daily, daily, hourly, or
+minutely rollover schedules.</p>
+<table>
+<tr><th> DatePattern </th><th> Rollover schedule </th><th> Example </th></tr>
+<tr><td> *'.'yyyy-MM* </td><td> Rollover at the beginning of each month </td><td> At midnight of
+May 31st, 2002 */foo/bar.log* will be copied to */foo/bar.log.2002-05*.
+Logging for the month of June will be output to */foo/bar.log* until it
+is also rolled over the next month. </td></tr>
+<tr><td> *'.'yyyy-ww* </td><td> Rollover at the first day of each week. The first day of
+the week depends on the locale. </td><td> Assuming the first day of the week is
+Sunday, on Saturday midnight, June 9th 2002, the file */foo/bar.log* will
+be copied to */foo/bar.log.2002-23*. Logging for the 24th week of 2002
+will be output to */foo/bar.log* until it is rolled over the next week. </td></tr>
+<tr><td> *'.'yyyy-MM-dd* </td><td> Rollover at midnight each day.</td><td> At midnight, on March
+8th, 2002, */foo/bar.log* will be copied to */foo/bar.log.2002-03-08*.
+Logging for the 9th day of March will be output to */foo/bar.log* until
+it is rolled over the next day.</td></tr>
+<tr><td> *'.'yyyy-MM-dd-a* </td><td> Rollover at midnight and midday of each day.</td><td> at
+noon, on March 9th, 2002, */foo/bar.log* will be copied to 
+*/foo/bar.log.2002-03-09-AM*. Logging for the afternoon of the 9th will
+be output to */foo/bar.log* until it is rolled over at midnight.</td></tr>
+<tr><td> *'.'yyyy-MM-dd-HH* </td><td> Rollover at the top of every hour.</td><td> At
+approximately 11:00.000 o'clock on March 9th, 2002, */foo/bar.log* will
+be copied to */foo/bar.log.2002-03-09-10*. Logging for the 11th hour of
+the 9th of March will be output to */foo/bar.log* until it is rolled over
+at the beginning of the next hour.</td></tr>
+<tr><td> *'.'yyyy-MM-dd-HH-mm* </td><td> Rollover at the beginning of every minute.</td><td> At
+approximately 11:23,000, on March 9th, 2001, */foo/bar.log* will be
+copied to */foo/bar.log.2001-03-09-10-22*. Logging for the minute of
+11:23 (9th of March) will be output to */foo/bar.log* until it is rolled
+over the next minute.</td></tr>
+</table>
+
+<p>Do not use the colon ":" character in anywhere in the pattern option. The
+text before the colon is interpeted as the protocol specificaion of a URL
+which is probably not what you want.</p>
+<p>Note that Scheduled Rotation ignores the
+<em>org.apache.sling.commons.log.file.number</em> property since the old log
+files are not numbered but "dated".</p>
+<p><a name="Logging-SizeRotation"></a></p>
+<h3 id="size-rotation">Size Rotation</h3>
+<p>Log file rotation by size is specified by setting the
+<em>org.apache.sling.commons.log.file.size</em> property to a plain number or a
+number plus a size multiplier. The size multiplier may be any of <em>K</em>,
+<em>KB</em>, <em>M</em>, <em>MB</em>, <em>G</em>, or <em>GB</em> where the case is ignored and the
+meaning is probably obvious.</p>
+<p>When using Size Rotation, the <em>org.apache.sling.commons.log.file.number</em>
+defines the number of old log file generations to keep. For example to keep
+5 old log files indexed by 0 through 4, set the
+<em>org.apache.sling.commons.log.file.number</em> to <em>5</em> (which happens to be
+the default).</p>
+      </div>
+    </div>
+    
+    <div class="trademarkFooter"> 
+		Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+	</div>
+  </body>
+</html>



Mime
View raw message