tags:

views:

263

answers:

2

Apache Felix has the concept of an "extension bundle". This seems to be a bundle that contributes to the system bundle. There is also a special URL "felix://extensions/" being registered for them.

When would I need to use extensions as opposed to regular bundles?

Are there examples of bundles that use this approach?

Is this a Felix-only feature or part of the OSGi spec?

+2  A: 

Please, read paragraph 3.15 (Extension bundles) of the official OSGi Service Platform Core Specification. There are answers on all your questions.

Here is quote from the Specification:

Extension bundles can deliver optional parts of the Framework implementation or provide functionality that must reside on the boot class path. These packages cannot be provided by the normal import/export mechanisms.

Boot class path extensions are necessary because certain package implementations assume that they are on the boot class path or are required to be available to all clients. An example of a boot class path extension is an implementation of java.sql such as JSR 169.

Artyom Sokolov
+1  A: 

according to the felix Implement extension bundles issue, extension bundles are described in section 3.15 of the OSGi R4 specification - so it is part of the OSGi spec. both that issue and the spec answers your question about when to use them. for examples, i would check google.

ax