Is there a good primer or any examples of how to install and load Eclipse plug-ins in Virgo, and how Eclipse extension point contributions are handled w.r.t. the bundle lifecycle?
I am trying to deploy an Eclipse help infocenter application in Virgo. The org.eclipse.help.webapp plugin contributes servlets to the servlets extension point of the org.eclipse.equinox.http.registry plugin.
That plug-in in turn is supposed to dynamically register the servlets with the OSGI HTTP service.
I have installed both plugins, and tried to start/load/deploy them in different orders; I can see the Activators being called, but not the extension point handlers - no servlet gets registered.
The org.eclipse.equinox.registry is started with the initialArtifacts in the user region, but I don't know what I need to do to get plugin extension contributions activated... any pointers welcome!
Went a bit further with this: it looks like the Eclipse registry is working fine, however the org.eclipse.equinox.http.registry plugin is installing a ServiceTracker on the "org.osgi.service.http.HttpService" service, and won't do anything until it finds the service.
So the question becomes, is the OSGI HTTP service started by Virgo available to a ServiceTracker in the user region?
Will it work to have an eclipse plugin trying to register context, servlets, resources etc using the service APIs (or will it bypass Virgo plumbing and thus cause major headaches)?
Looking more and more like I will have to manually create a web bundle to deploy the Eclipse infocenter...
Chris Frost Messages: 230 Registered: January 2010 Location: Southampton, England
It depends on which version of Virgo you are running. On Nano and Kernel there is a HTTPService available for use in the user region. On the Nana Web, Tomcat and Jetty distributions there is web application bundle container instead. If you are on one of these distributions I recommend just adding in your own HTTPService instead of re-writing your application. The best way to check what is available and see the wirings is with the admin console '/admin'. None of this will cause any problems to Virgo, the HTTPService is there to be used.
Initial Artifacts property is the right place to start the registry. I'm afraid I don't know about plugins though so I can't help with how start plugin extensions.
As an alternative you can look at the source code for the Admin Console, it will run, without change, on both the HTTPService or as a Web Bundle.
I am using the Tomcat version, so it looks like I will need to add my own HTTP Service.
We are looking into InfoCenter alternatives (triggered by this but for other reasons as well), if that doesn't pan out I will give this a try.