incubator-sling-commits mailing list archives

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

<div>
<ul>
    <li><a href='#Jackrabbit2inSling-Introduction'>Introduction</a></li>
    <li><a href='#Jackrabbit2inSling-Changes'>Changes</a></li>
<ul>
    <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>
</ul>
    <li><a href='#Jackrabbit2inSling-Requirements'>Requirements</a></li>
<ul>
    <li><a href='#Jackrabbit2inSling-TikaExtension'>Tika Extension</a></li>
    <li><a href='#Jackrabbit2inSling-NewBundles'>New Bundles</a></li>
</ul>
</ul></div>


<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="http://www.jcp.org/en/jsr/summary?id=283" 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>

<ul>
	<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>
</ul>


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

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

<ul>
	<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>,
<tt>jackrabbit-jcr-rmi</tt>.</li>
</ul>


<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="https://issues.apache.org/jira/browse/SLING-1212"
rel="nofollow">SLING-1212</a>. Prototype implementation can befound in my whiteboard
at <a href="https://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jackrabbit2upgrade"
rel="nofollow">https://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jackrabbit2upgrade</a></p>


<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
bundle.</p>


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

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

<p>TBD</p>


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

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

<p>TBD</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>

<ul>
	<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>
</ul>


<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="https://issues.apache.org/jira/browse/TIKA-340"
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>

<h3><a name="Jackrabbit2inSling-NewBundles"></a>New Bundles</h3>

<p>The following bundles have been added in order to setup Sling:</p>

<ul>
	<li>javax.jcr:jcr:2.0</li>
	<li>org.apache.derby:derby:10.5.3.0_1</li>
	<li>org.apache.tika:tika-full:0.6-SNAPSHOT (requires manual build)</li>
	<li>commons-fileupload:commons-fileupload:1.2.1</li>
</ul>

     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/SLING/Jackrabbit+2+in+Sling">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9011230&revisedVersion=6&originalVersion=5">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/SLING/Jackrabbit+2+in+Sling?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message