Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] e4, conventions, OSGi, ... - We need to set up rules

Thomas Watson schrieb:
>> From:
>>
>> Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx>
>> 3. Declarative Services vs Extension Points
>> -------------------------------------------
>> I think we should use DS instead of extension points because using
>> extension points forces our bundles to be a singleton - which is not
>> needed OSGi experts please correct me - with Declarative Services
>>
> 
> Both tools have their purposes.  I don't think we should move 100%
> towards one or the other.  If singletons are a big deal then lets work
> on removing that restriction from the eclipse extension registry.  Even
> when using OSGi services with the white board pattern you have to use
> singletons implementations in many cases.  For example, the event admin
> specification uses the white board pattern to allow multiple bundles
> register as many EventHanders as they want.  But you still would only
> want one singleton implementation of the event admin service to actually
> use and fire events to all the EventHandlers.
> 
> I think the eclipse extension registry is very similar to this.  You
> only want one version of a bundle to process the extension point but you
> could imagine multiple versions of a bundle contributing an extension to
> an extension point implementation.
> 

I see your point though I worry if we are not setting up rules on this
possible contributers will get confused because we are using one next to
the other (e.g. ui.workbench).

Another thing I came across [1] was that when we are using Extension
Points we need to reflect the OSGi lifecycle which has to be managed
manually when using Extension Registry but one gets for free using DS.

We should set up a best practice example (if not already existing
somewhere) how we expect people to use/implement:
* Extension Point contributions
* DS contributions

We could naturally point people to one of the implementation in our code
base where OSGi experts like you have taken a look at together with us
(the referenced bug [1] would probably be a good candidate for it)?

Tom

[1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=289293

-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                                        geschaeftsfuehrer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5/1    A-6020 innsbruck      phone    ++43 512 935834


Back to the top