Hi guys,

I had tie this week to think a bit more about the current OSGi usage in the API, and the need we have to manage extension points correctly in the various environments. Here are a brain dump where I will gather what we discussed on the mailing list, and what I understood. Feel free to comment.

First, let's list the extension points, and the components where those extensions are useful :
- controls (API)
- Extended Operations(API)
- Partitions(Server)
- Stored Procedures(Server)
- Interceptors(Server)
- Authenticators (Server)
- Network Layer(API)
- Syntax Checkers(API)
- Normalizers(API)
- Comparators(API)

Note that as the server uses the API, it's likely that the extensions managed by the API will be also useful for the server. It's the very same for Studio.

We now have to list the different use cases :
1) API used by the server
2) API used by Studio
3) API used by an OSGified application
4) API used by a standard application (not OSGified)

For (1), we will consider that the server will use Felix internally, so it will be soon like (3). Right now, as the server is not containing any OSGi container, the use case to pick is (4) In (2), Studio uses Equinox which is an OSGi container. We have to be sure that all the extensions point are correctly loaded as bundle. For (3), it's really like use case (2) : each extension point must be loaded as a bundle For (4), the best is to consider that the extensions points are defined at startup, and loaded from the application classpath. That means if we want to extend the API, then one should put the associated jar in a place it will be visible when the application will be started. That also means that hot addition of extensions will not be possible (at least for 1.0.0)

Now, that raises a few questions :
1) How do we initialize the default extension points ?
A suggestion would be that they are provided in the default version, as plain java classes, and loaded using reflection, assuming we have a list of those extensions in Maven.
2) How do we fo the same thing if the application has an OSGi container ?
We must have an activator which loads those extensions.


I think I captured the spirit of the various discussion we had with Alex and Guillaume in this mail.


--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to