jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "JackrabbitOsgi" by FelixMeschberger
Date Fri, 29 Jan 2010 10:20:19 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The "JackrabbitOsgi" page has been changed by FelixMeschberger.
http://wiki.apache.org/jackrabbit/JackrabbitOsgi?action=diff&rev1=1&rev2=2

--------------------------------------------------

  = Embedding A Jackrabbit Repository in an OSGi Framework =
  The Apache Sling project has provided an infrastructure for embedding and accessing JCR
Repositories right from the start. With Jackrabbit 2 it is about time, that Jackrabbit itself
becomes more OSGi friendly and provides many of the features which are currently part of Apache
Sling.
  
- This page is about the changes and enhancements proposed in the [[http://svn.apache.org/repos/asf/jackrabbit/sandbox/jackrabbit2-bundle][Jackrabbit
2 Bundle Sandbox]].
+ This page is about the changes and enhancements proposed in the [[http://svn.apache.org/repos/asf/jackrabbit/sandbox/jackrabbit2-bundle|Jackrabbit
2 Bundle Sandbox]].
  
  == Apache Sling JCR Bundles ==
  Apache Sling currently provides the following JCR related bundles:
  
  Bundle Current Version Jackrabbit Version Description
+ || '''Bundle''' || '''Current Version''' || '''Jackrabbit Version''' || '''Description'''
||
- 
- ||<tablestyle="width: 957px; height: 116px;">Bundle||Current Version||Jackrabbit Version||Description||
- 
- ||<tablestyle="width: 957px; height: 116px;">Sling JCR API||2.0.6||--||Provides additional
API to simplify use. Most notably contains the SlingRepository interface to ease configuration
pain for bundles requiring administrative repository access. This bundle used to include and
provide the JCR 1.0 API in the OSGi framework. This has been removed to allow the provision
of the JCR 2.0 API as a proper bundle. ||
+ ||Sling JCR API ||2.0.6 ||-- ||Provides additional API to simplify use. Most notably contains
the SlingRepository interface to ease configuration pain for bundles requiring administrative
repository access. This bundle used to include and provide the JCR 1.0 API in the OSGi framework.
This has been removed to allow the provision of the JCR 2.0 API as a proper bundle. ||
- ||Sling JCR Base||2.0.4||1.5||Provides an abstract default implementation of the SlingRepository
interface and includes the Jackrabbit RMI library at version 1.5 to access a repository over
RMI. This abstract base implementation supports accessing repositories both through JNDI and
RMI.||
+ ||Sling JCR Base ||2.0.4 ||1.5 ||Provides an abstract default implementation of the SlingRepository
interface and includes the Jackrabbit RMI library at version 1.5 to access a repository over
RMI. This abstract base implementation supports accessing repositories both through JNDI and
RMI. ||
- ||Sling JCR Classloader||3.0|| ||Provides support to load classes from the repository. This
bundle was based on the Jackrabbit Repository Classloader. Now it contains a stripped-down
copy of the class loader with a few fixes.||
+ ||Sling JCR Classloader ||3.0 || ||Provides support to load classes from the repository.
This bundle was based on the Jackrabbit Repository Classloader. Now it contains a stripped-down
copy of the class loader with a few fixes. ||
- ||Sling Jackrabbit Client||2.0.2|| ||A concrete extension of the AbstractSlingRepository
in the Sling JCR Base bundle. This extension is almost empty, since the basic support is already
provided by the abstract class.||
+ ||Sling Jackrabbit Client ||2.0.2 || ||A concrete extension of the AbstractSlingRepository
in the Sling JCR Base bundle. This extension is almost empty, since the basic support is already
provided by the abstract class. ||
- ||Sling Jackrabbit Server||2.0.4||1.6||Embeds Jackrabbit Core and most of its dependencies
like Lucene, Derby, PDFBox, etc.||
+ ||Sling Jackrabbit Server ||2.0.4 ||1.6 ||Embeds Jackrabbit Core and most of its dependencies
like Lucene, Derby, PDFBox, etc. ||
- ||Sling Jackrabbit Access Manager||2.0.2||1.6||Supports Access Control Management in a Jackrabbit
Repository using the Sling Features.||
+ ||Sling Jackrabbit Access Manager ||2.0.2 ||1.6 ||Supports Access Control Management in
a Jackrabbit Repository using the Sling Features. ||
- ||Sling Jackrabbit User Manager||2.0.2||1.6||Supports User Management in a Jackrabbit Repository
using the Sling features.||
+ ||Sling Jackrabbit User Manager ||2.0.2 ||1.6 ||Supports User Management in a Jackrabbit
Repository using the Sling features. ||
  
  
  Note: The future of the Jackrabbit Repository Classloader library has not yet been decided
upon. At the moment, we have a relatively stable release in the Commons subproject and Apache
Sling has a stripped-down fork of that class loader. It will have to be discussed where we
are heading with this beast and what the requirements of the Community will be around this.
  
  Of these bundles, the ''Sling Jackrabbit Server'' bundle is probably the one which should
be integrated in the Jackrabbit Core library. Over time I could imagine to also merge most
of the ''Sling JCR Base'' and ''Sling JCR Client'' bundles into the Jackrabbit project.
  
+ 
+ == Current State of OSGi Support in Jackrabbit ==
+ 
+ Currently many helper libraries of Jackrabbit are already setup as proper OSGi bundles.
Most notably this includes the Jackrabbit API, JCR Commons, SPI, and SPI Commons libraries.
+ 
+ The major missing link is the Jackrabbit Core library, which is the actual implementation
of the repository.
+ 
+ 
+ == Extensions to Jackrabbit Core ==
+ 
+ The goal of turning the Jackrabbit Core library into an OSGi bundle is to preserve as much
of the functionality of the current Sling Jackrabbit Server bundle as possible. Concretely
this means:
+ 
+   * Build the Jackrabbit Core library as a bundle (obviously)
+   * Embed only as much dependencies as are really needed (goal: none)
+   * Support easy startup and access to the embedded repository instances
+   * Provide some degree of dynamic extensibility (at least provide the pluggability currently
supported by the Sling Jackrabbit Server bundle)
+ 
+ 
+ === Jackrabbit Core Bundle and Embedded Dependencies ===
+ 
+ The biggest issue when bundelizing the Jackrabbit Core bundle is the is the list of dependencies
and extensibility. 
+ 
+ The problem with dependencies is, that Jackrabbit Core has quite big number of dependencies.
To launch a Jackrabbit repository a number of libraries have been collected and put together.
Some of these libraries are available as OSGi bundles (e.g. the Jackrabbit helper libraries,
the JCR 2.0 API, Derby) and some are not (yet) (e.g. Lucene, Concurrent, Commons Pool, Commons
DBCP). Tika is special in that it will be available as a bundle starting with release 0.6.
+ 
+ The problem with extensibility is, that Jackrabbit Core has not been built with the kind
of modularity in mind as provided by OSGi. This means internal extension API is not properly
separated from internal implementations. This makes it close to impossible to expose the API
as OSGi {{{Export-Package}}} without also requiring to exposing internal packages.
+ 
+ The current approach followed in the [[http://svn.apache.org/repos/asf/jackrabbit/sandbox/jackrabbit2-bundle|Jackrabbit
2 Bundle Sandbox]] is to embed libraries, which are not available as bundles and to not embed
libraries available as bundles.
+ 
+ 
+ === Easy Startup and Access ===
+ 
+ For easy startup and access the OSGi specification offers great functionalities: To startup
an embedded repository instance, we need a location to store the filesystem data to and a
location to access a configuration. Both properties can easily be provided through the OSGi
Configuration Admin Service. This is what we do in the Sling Jackrabbit Server bundle and
thus this is also implemented in the current approach.
+ 
+ Accessing an embedded repository is equally easy: As soon as a repository has been configured
and started, it will be registered as an OSGi service and can be referenced like any other
service using the service name. An embedded Jackrabbit Repository is registered under the
two names implemented by Jackrabbit Core: {{{javax.jcr.Jackrabbit}}} and {{{org.apache.jackrabbit.api.JackrabbitRepository}}}.
+ 
+ The Jackrabbit Core bundle also contains an OSGi {{{BundleActivator}}} which ensures configuration
can be provided by the Configuration Admin Service and which also ensures an initial configuration
to have a running repository as soon as the bundle is started.
+ 
+ As for the configuration file: The Jackrabbit Core library contains a default repository.xml
file ({{{OSGI-INF/repository_osgi.xml}}}) which is used as a configuration file if none is
provided.
+ 
+ 
+ === Extensibility ===
+ 
+ 
+ Jackrabbit configuration is the subject of a book of its own. Yet some things may be setup
rather dynamically in the sense of extensible at runtime by the system administrator. Things
in this area, we have at the moment in the Sling Jackrabbit Server bundle are a framework
to extend login modules and a support to plugin extensible access controllers.
+ 
+ Both should, if possible, be migrated to the Jackrabbit Core bundle; possibly even enhancing
it. Of course such extensibility points will have to be exported from the Jackrabbit Core
bundle and as such will be placed into separate locations.
+ 

Mime
View raw message