sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Sling > Jackrabbit 2 in Sling
Date Tue, 01 Dec 2009 11:57:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=SLING&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="">Jackrabbit
2 in Sling</a></h2>
     <h4>Page <b>edited</b> by             <a href="">Felix
     <div class="notificationGreySide">
         <h1><a name="Jackrabbit2inSling-UsingJackrabbitVersion2.0"></a>Using
Jackrabbit Version 2.0</h1>

    <li><a href='#Jackrabbit2inSling-Introduction'>Introduction</a></li>
    <li><a href='#Jackrabbit2inSling-Changes'>Changes</a></li>
    <li><a href='#Jackrabbit2inSling-jcr%2Fbase'>jcr/base</a></li>
    <li><a href='#Jackrabbit2inSling-jcr%2Fjackrabbitserver'>jcr/jackrabbit-server</a></li>
    <li><a href='#Jackrabbit2inSling-jcr%2Fwebdav'>jcr/webdav</a></li>
    <li><a href='#Jackrabbit2inSling-jcr%2Fjackrabbitusermanager'>jcr/jackrabbit-usermanager</a></li>
    <li><a href='#Jackrabbit2inSling-jcr%2Fjackrabbitaccessmanager'>jcr/jackrabbit-accessmanager</a></li>
    <li><a href='#Jackrabbit2inSling-contrib%2Fjcr%2Fjackrabbitapi'>contrib/jcr/jackrabbit-api</a></li>
    <li><a href='#Jackrabbit2inSling-launchpad%2Fbundles'>launchpad/bundles</a></li>
    <li><a href='#Jackrabbit2inSling-Requirements'>Requirements</a></li>
    <li><a href='#Jackrabbit2inSling-TikaExtension'>Tika Extension</a></li>

<h2><a name="Jackrabbit2inSling-Introduction"></a>Introduction</h2>

<p>The upcoming Jackrabibt 2.0 release will be the first Jackrabbit release supporting
the recently publish <a href="" rel="nofollow">JCR
2.0</a> specification. With support for this new release, currently available from the
central maven repository as the third beta release (2.0-beta3), I also propose to split the
embedded Jackrabbit Repository module and take out two important helper libraries:</p>

	<li>The Derby core library (providing the embedded Derby database used as the default
persistence layer by Jackrabbit 2.0) is available as a bundle and thus the embedded Jackrabbit
Repository bundle will have an optional import of the Derby JDBC driver package (nothing more
is needed, since Jackrabbit accesses Derby using plain JDBC).</li>
	<li>Starting with Jackrabbit 2.0 the built-in indexer uses the Apache Tika library
to parse and index content. Since the raw Tika libraries are available as bundles (and TIKA-XXXX
proposes a convenience full Tika bundle) the dependencies to the Tika packages are imported.</li>

<p>This dramatically reduces the sice of the Jackrabbit bundle.</p>

<p>The following libraries will (for now) remain in the embedded Jackrabbit Repository

	<li>Xerces &#8211; traditionally it has been very hard to bundleize the XML based
libraries. Also version 2.8.1 of the <tt>xercesImpl</tt> library used by Jackrabbit
is not available as a bundle. Thus it is easiest to keep this library in the bundle.</li>
	<li>Lucene Core &#8211; Same as Xerces, the lucene core library is not available
as a bundle currently (not even the most recent 3.0 version). Thus we keep this library inside
Jackrabbit, too.</li>
	<li>Helpers &#8211; further support libraries from the Jackrabbit project itself
and other projects are kept with the embedded Jackrabbit Repository bundle: <tt>jackrabbit-jcr-commons</tt>,
<tt>jackrabbit-spi-commons</tt>, <tt>jackrabbit-spi</tt>, <tt>concurrent</tt>,

<p>Further investigation will have to show to what extent the SPI and SPI Commons libraries
can and should be used as bundles.</p>

<p><b>NOTE</b> We do <b>not</b> upgrade the default JCR API
import defined in the parent POM to version 2.0 to ensure that by default Sling is still able
to run on plain JCR 1.0 repositories. Those parts of Sling really requiring JCR 2.0 functionality
will have to explicitly set the required JCR API version to 2.0.</p>

<p>Progress in this upgrade is tracked in <a href=""
rel="nofollow">SLING-1212</a>. Prototype implementation can befound in my whiteboard
at <a href=""

<h2><a name="Jackrabbit2inSling-Changes"></a>Changes</h2>

<h3><a name="Jackrabbit2inSling-jcr%2Fbase"></a>jcr/base</h3>

<p>The <tt>jcr/base</tt> bundle contains a utility class providing access
to the Jackrabbit Access control implementation. This utility class has to be updated to use
the new JCR 2.0 API instead of the transient Jackrabbit API previously used.</p>

<p>In addition we finally remove the SessionPool support we have disabled for a quite
some time now. Though in the early days of Jackrabbit session setup was quite expensive, nowadays
this setup is fairly quick and a session pool poses more issues &#8211; mainly for cleaning
up and reusing sessions &#8211; than it solves problems.</p>

<h3><a name="Jackrabbit2inSling-jcr%2Fjackrabbitserver"></a>jcr/jackrabbit-server</h3>

<p>The biggest changes are concerned with the embedded Jackrabbit Repository bundle.
As described above, one change is the exclusion of the indexing (parsing) and derby libraries
from the bundle itself. This reduces the size of this bundle considerably. In addition all
Jackrabbit dependencies are upgraded to the 2.0-beta3 version.</p>

<p>Finally the security plugin support classes are converted to the new JCR 2.0 API.
The pluggable DefaultLoginModule and DefaultAccessManager classes still remain to provide
dynamic extensibility based on the OSGi service registry.</p>

<h3><a name="Jackrabbit2inSling-jcr%2Fwebdav"></a>jcr/webdav</h3>

<p>The upgrade of the WebDAV provider requires integration of Tika API because starting
with Jackrabbit 2.0 Tika is also used for MIME type resolution in the Jackrabbit project.
For this reason, the Sling WebDAV bundle will convert the existing wrapper to a Tika <tt>Detector</tt>
baking decisions &#8211; as before &#8211; on the Sling MimeTypeService.</p>

<p>The Sling WebDAV bundle will import the Tika API as does the jcr/jackrabbit-server

<h3><a name="Jackrabbit2inSling-jcr%2Fjackrabbitusermanager"></a>jcr/jackrabbit-usermanager</h3>

<p>The Jackrabbit User Manager bundle must of course be upgraded.</p>


<h3><a name="Jackrabbit2inSling-jcr%2Fjackrabbitaccessmanager"></a>jcr/jackrabbit-accessmanager</h3>

<p>The Jackrabbit Access Manager bundle must of course be upgraded.</p>


<h3><a name="Jackrabbit2inSling-contrib%2Fjcr%2Fjackrabbitapi"></a>contrib/jcr/jackrabbit-api</h3>

<p>This project is obsolete because the Jackrabbit project provides the Jackrabbit API
library as a bundle for quite some time now. Thus this project can safely be removed.</p>

<h3><a name="Jackrabbit2inSling-launchpad%2Fbundles"></a>launchpad/bundles</h3>

<p>The <tt>launchpad/bundles</tt> project is modified to include the required
JCR and Jackrabbit bundles:</p>

	<li><tt>javax.jcr:jcr:2.0</tt> &#8211; The JCR 2.0 library comes ready-set
as a bundle and directly be deployed</li>
	<li><tt>org.apache.jackrabbit:jackrabbit-api:2.0-beta3</tt> &#8211;
The Jackrabbit API must be upgraded to the correct version</li>
	<li><tt>org.apache.jackrabbit:jackrabbit-jcr-commons:2.0-beta3</tt> &#8211;
Likewise the Jackrabbit JCR Commons library is to be upgraded</li>
	<li><tt>org.apache.derby:derby:</tt> &#8211; imported by
the embedded Jackrabbit Repository bundle</li>
	<li><tt>org.apache.tika:tika-full:0.6-SNAPSHOT</tt> &#8211; imported
by the embedded Jackrabbit Repository bundle and the WebDAV support bundle (requires manual
	<li><tt>commons-fileupload:commons-fileupload:1.2.1</tt> &#8211; imported
by the WebDAV support bundle</li>

<p>Besides that the current SNAPSHOTs of the Jackrabbit embedding bundles must of course
be included.</p>

<h2><a name="Jackrabbit2inSling-Requirements"></a>Requirements</h2>

<h3><a name="Jackrabbit2inSling-TikaExtension"></a>Tika Extension</h3>

<p>To be able to simply import the Apache Tika packages a convenience full bundle of
the Tika Core and Parser libraries as well as some of the core support libraries would be
very helpful. As such I prepared such a bundling and created <a href=""
rel="nofollow">TIKA-340</a> to propose this addition to the Tika project. To build
and use the Jackrabbit 2.0 support yourself checkout the Tika project, apply the patch and
install (at least) the tika-full bundle in your local maven repository.</p>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>

       <a href="">View
       <a href="">View
       <a href=";showCommentArea=true#addcomment">Add

View raw message