directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <akaras...@apache.org>
Subject Re: OSGi startup and shutdown problems
Date Wed, 11 May 2011 13:42:27 GMT
Thanks Guillaume for your thoughts. Responding in this post to both of you
in line ...

On Wed, May 11, 2011 at 12:19 PM, Emmanuel Lecharny <elecharny@gmail.com>wrote:

> On 5/11/11 10:47 AM, Guillaume Nodet wrote:
>
>> Just my thoughts, as I had a discussion with Emmanuel yesterday on
>> this subject.  I must admit I don't know directory very much, so maybe
>> I'm off track.
>>
>>
No worries, we work with ApacheDS a lot and sometimes we're really off track
:).


> Unless I misunderstood, the OSGi container is only used for
>> classloading and want to hide it.
>
>
I don't think we want to hide it.

I guess to put it as simply as possible, we want to make it so users can
extend the API to add new controls and extended requests. We need a
modularity layer for this.


> However, if you try to hide the
>> OSGi stuff,
>
>
By "hide the OSGi stuff", do you mean embed the OSGi container in the
application?


> the first time you'll have a resolution problem for a
>> bundle, you'll have a hard time explaining that to the user.
>>
>>
Yep.


> Let's take a simple example.  I see in your code at
>>
>> https://github.com/apache/directory-shared/blob/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java
>>
>
> This part of the code is really a bad hack, we are supposed to deduce the
> versions to use from some configuration file.
>
>
Yes this needs some TLC. It was more an experiment to see how embedding the
container will manifest itself. We need some more precautionary code and
better handling treating the system packages exported to a minimum.


>  that you export the slf4j pacakge in version 1.6.0 from the system
>> bundle.   What if a user start using a [1.6.1,2) range when importing
>> that package ?
>
>
Do you mean to say the user, writes and added a new bundle for an extension,
and the extension bundle depends on slf4j 1.6.1 for example?


> That will happen as soon as he's using the latest
>> version of slf4j in its maven dependencies (and people tend to upgrade
>> to latest version).    In that case, felix will start up correctly and
>> you won't see any problem,
>
>
Should we see a problem in the scenario you're describing?


> unless you're monitoring the bundles state
>> to check that everything has been resolved, etc...
>>
>
> Plain agree. We have to fix this part.


I'm not sure I fully understand this scenario yet.


>
>  I'm not saying OSGi is bad, I'm using it everyday and it's really
>> powerful.  But I've also learned that it's not a simple container to
>> manage.   I'm not sure hiding it will really work at the end.
>>
>

Again do you [Guillaume] mean embedding a OSGi container when you say
hiding?


> Usually, we are just hiding it if the user does not have its own OSGi
> container.
>
>
Please clarify.

Thanks,
Alex

Mime
View raw message