Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » ExtensionPoint or RegisterService?
ExtensionPoint or RegisterService? [message #77987] Mon, 27 November 2006 12:01 Go to next message
Eclipse UserFriend
Originally posted by: ridcully560.yahoo.com

Hello,

in one of my bundles - some kind of main-bundle of a webapp that
consists of many bundles - I'm using a ServiceTracker together with an
ServiceTrackerCustomizer to react when classes (inside other Plugins)
that implement a certain Interface are registered with the system as a
Service. I use it as a way to get a representation of those other
plugins insinde some kind of PluginService inside the main-plugin.

I think that I somehow just do the same that I could achive by using
ExtesionPoints. It seems to me that by using ExtensionPoints I would not
have to bother about the registering, but still about searching for
installed plugins of a certain kind. And would then have to get them
inside my PluginService on my own just as I'm doing it now. Am I right
there? So is there a point in switching to ExtensionPoints or can I keep
it the way I'm using it? My way seems to work - but I don't think I'm
using the classes - that I register as a Service just to find them - the
way that registering Services is meant to be.

I hope that was understandable and I got the right newsgroup to ask this.

Johannes
Re: ExtensionPoint or RegisterService? [message #78230 is a reply to message #77987] Fri, 01 December 2006 04:43 Go to previous message
Eclipse UserFriend
Originally posted by: jeff_mcaffer.REMOVE.ca.ibm.com

Johannes,

Certainly doing what you are doing will work as you have seen. Services
and Extensions are both mechanisms useful when you are trying to glue
components together and allow them to interact. They have a number of
differences in terms of how they work and the nature of the contracts
between the parties involved. You should choose the right approach for
your needs. BJ Hargrave and I gave a talk at the last EclipseCon that
includes some information on this subject. Check out
http://www.eclipsecon.org/2006/Sub.do?id=185
(there should be slides available there).

Jeff

Johannes wrote:
> Hello,
>
> in one of my bundles - some kind of main-bundle of a webapp that
> consists of many bundles - I'm using a ServiceTracker together with an
> ServiceTrackerCustomizer to react when classes (inside other Plugins)
> that implement a certain Interface are registered with the system as a
> Service. I use it as a way to get a representation of those other
> plugins insinde some kind of PluginService inside the main-plugin.
>
> I think that I somehow just do the same that I could achive by using
> ExtesionPoints. It seems to me that by using ExtensionPoints I would not
> have to bother about the registering, but still about searching for
> installed plugins of a certain kind. And would then have to get them
> inside my PluginService on my own just as I'm doing it now. Am I right
> there? So is there a point in switching to ExtensionPoints or can I keep
> it the way I'm using it? My way seems to work - but I don't think I'm
> using the classes - that I register as a Service just to find them - the
> way that registering Services is meant to be.
>
> I hope that was understandable and I got the right newsgroup to ask this.
>
> Johannes
Previous Topic:Jetty servlet filter bundle?
Next Topic:ClassNotFound error when using 3rd party jars in bundle
Goto Forum:
  


Current Time: Wed Sep 25 16:39:08 GMT 2024

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

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

Back to the top