views:

16

answers:

1

I have a plugin which at present doesn't have any extension points (neither does it extend any other plugin). To resolve a certain issue I have to create an extension-point for this plugin and an appropriate extension somewhere else.

When doing this eclipse forced me to set singleton:=true in the Manifest file. I know the reason why this parameter has to be set, but I wanted to know if there are any implications on the functioning of the plugin within the product by introducing this parameter.

Thank you.

+1  A: 

"singleton:=true" means that bundle only have one version could exist in the OSGi runtime.

Eclipse automatically adds the flag due to you provide an extension point in your bundle. If there are two version of your bundles providing the same extension point(have the same identity, might different attributes or elements) would make things mess.

Kane
@Kane: Thanks for your reply! Could you tell me what happens when `singleton:=true` is not set in a bundle (if it has no extension and extension points)?
Sagar V
The bundle is allowed to have multiple versions in OSGi runtime. For example, org.eclipse.junit. It have 3.x and 4.x in eclipse, which provide different services with different versions.
Kane