Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Proposals » OSGi Enterprise Tools » OSGI ExtensionPoints(Contribution with OSGI Services)
OSGI ExtensionPoints [message #1721389] Wed, 27 January 2016 01:05
Aurélien Mora is currently offline Aurélien MoraFriend
Messages: 38
Registered: July 2014
Member
Hello,

Let's see an example of my problem :

In a first Bundle, I declare a Service "ResourceLoader" and an Interface "IModelExtension".
In the ResourceLoader, I have something like this :
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.STATIC)
public void addExtension(IModelExtension modelExtension){
 myExtensions.add(modelExtension);
}

=> I want services that implements IModelExtension are attached automatically to my resource loader.

Then I made some other bundles that share implementations of ModelExtension and declare them as OSGI Services.


I supposed I could use OSGI that way, but one of my handler is just not activated when TaskManager finish its initialization. And since I don't see any use of services that way on Internet, I think I'm doing something wrong).

My ModelExtension doesn't have any references (at all) that could delay it activation. It just start later (even if I ask him to start immediately)

I need all of my extension declared on the ResourceLoader before it is loaded (to load my resources), and of course, I don't want that my ResourceLoader have a dependency to the ModelExtension


So my questions :

Should I use OSGI that way ? (the contribution pattern)
if yes :
- Any Ideas why my extension service just start after the loader that need it ?
else
- Ok, This is not the way I should use OSGI, so what is the best solution to setting up a contribution architecture in OSGI ?


Thanks Smile
Previous Topic:Restricting Plug-in Dependency to fixed version
Next Topic:Need to know how to plug bundles
Goto Forum:
  


Current Time: Wed Apr 24 19:37:45 GMT 2024

Powered by FUDForum. Page generated in 0.03092 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top