Equinox and extension-points forces singleton:=true [message #96542] |
Tue, 04 September 2007 17:42 |
Eclipse User |
|
|
|
Originally posted by: martin.tomcat.org
Hi forum,
We are doing some initals trials with server side OSGi (Equinox). One of the
things we are exploring is
the ability to use the extension-point paradigm even here (nice!!!!)
One of the things I have found is that I'm forced (by PDE) to set
singleton:=true in the manifest when my bundle implements an extension-point
(or rather the project contians a plugin.xml file) . To me this seams
somewhat limits the usage of extension-points for a server side
implementaion, since we must handle concurrent calls.
How I missunderstod this or can someone confirm my finding.
BR
M
|
|
|
Re: Equinox and extension-points forces singleton:=true [message #96570 is a reply to message #96542] |
Tue, 04 September 2007 21:29 |
Eclipse User |
|
|
|
Originally posted by: alex_blewitt.yahoo.com
That's basically a restriction of the extension registry, though in reality it only really applies to UI components. The idea is that if you have two plugins (say, two versions of the same plugin) that contribute a menu called 'foo', you don't want to see two 'foo' menus, only one. So the bundle is defined as a singleton so that there is only one bundle present (usually the newest) and so hence one button.
You don't have to have singleton:=true, though PDE might give a warning if that's the case. You could also use OSGi services instead of the extension registry; you have teh same kinds of benefits that you can use in both places. We've run a couple of Getting Started with OSGi and Eclipse on EclipseZone that you can look through for more.
Alex.
|
|
|
Powered by
FUDForum. Page generated in 0.03181 seconds