directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <>
Subject Re: [LDAP API] Codec extension mechanism direction (WAS: Re: OSGi startup and shutdown problems)
Date Wed, 11 May 2011 17:23:03 GMT
In Karaf, we have a simple provisioning mechanism called 'features'.
You can see an example at [1]
In its simpliest form, it's a list of urls pointing to OSGi bundles.
We usually use maven urls (which are real urls with a custom url
handler) so that we can download easily from configured maven
We're working on automatic generation of such features from maven for
karaf 3.x, not sure when that'll be ready though (but we've lived with
hand-written ones for a while without problems).

Another way is to use OBR (OSGi Bundle Repository) and the maven
bundle plugin can easily generate obr xmls from an existing repo using
the bundle:index goal at [2]

Anyway, as long as Directory provide bundles, that should be enough.
If a user wants to install it in its own framework, he'll use a
provisioning mechanism of his choice.  Directory can help by providing
pre-built files as described above, but at the end, what's really
needed is a list of bundles to install.


On Wed, May 11, 2011 at 18:46, Alex Karasulu <> wrote:
> On Wed, May 11, 2011 at 6:56 PM, Emmanuel Lecharny <>
> wrote:
>> On 5/11/11 5:35 PM, Alex Karasulu wrote:
>>> Hi dev peeps,
>>> So after a long thread I just wanted to summarize the realizations and
>>> conclusions so we can set a clear direction for managing the codec
>>> extension
>>> mechanism. I created a separate clean thread for this here with
>>> Guillaume's
>>> core recommendation following.
>>> For the sake of speed I will define a direction and people can opine:
>>> 1). Expose a means in the LDAP API (really SPI) to have codec extensions
>>> programmatically registered. I this already exists.
>> +1
>>> 2). Remove the standalone codec factory implementation that starts up
>>> Felix.
>> Ok, that would be a relief.
>>> 3). Add a simple ClassLoader component to be used in standalone mode to
>>> load
>>> the plugin classes (from the plugin bundles defaulting to regular jars
>>> presumed to be on the classpath). Some configuration information drives
>>> how
>>> this component discovers what plugin classes to attempt to class load.
>> Ok, fine.
>>> 4). Set it up so by default, the LDAP API uses the simple ClassLoader
>>> based
>>> discover/load/register mechanism. In an OSGi environment this is disabled
>>> to
>>> enable plugins to self register.
>> Ok.
>>> This should serious remove some ugly and dangerous code we've got at this
>>> point in the LDAP API.
>> Absolutely.
>> Question : are we sure that teh API will continue to work in Studio, using
>> Equinox ? And are we sure we will be able to have felix started in ApacheDS
>> ?
> Actually I think it is using equinox at the present moment. If I remember
> correctly we're not using the standalone mechanism when in the eclipse
> environment. PAM I think found a way to get the bundle loaded under eclipse
> OSGi (a.k.a. equinox). Might want to get confirmation from PAM though.
>> That raises another related issue for ADS : what if an application is
>> already using an OSGi framework and wants to embed ADS ?
> That's not a problem since basically they can load just the bundles. We can
> carry ApacheDS with installers inside Karaf with our standalone
> distribution. Those loading ADS into an existing environment need only issue
> a load from the bundle repository. I think there's some magic there making
> your local maven repository into an OSGi bundle repository. I wonder if
> Karaf knows how to pull bundles down too from remote repositories, I bet
> Guillaume can answer that :).
> Regards,
> Alex

Guillaume Nodet
Open Source SOA

Connect at CamelOne May 24-26
The Open Source Integration Conference

View raw message