[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re[2]: [equinox-dev] Embedding Equinox OSGi and EclipseStarter
|
JM> http://wiki.eclipse.org/index.php/Equinox_FrameworkAdmin
Does this not have an overlap or at least touches on the Initial
Provisioning service in R4?
Kind regards,
Peter Kriens
JM>
JM> Jeff
JM>
JM>
JM> Jason Sankey <jason@xxxxxxxxxx>
JM> Sent by: equinox-dev-bounces@xxxxxxxxxxx
JM> 02/05/2007 06:55 PM
JM>
JM> Please respond to
JM> Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
JM>
JM>
JM> To
JM> Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
JM> cc
JM>
JM> Subject
JM> Re: [equinox-dev] Embedding Equinox OSGi and EclipseStarter
JM>
JM>
JM>
JM>
JM> Hi Alex,
JM>
JM> My responses inline.
JM>
JM> Alex Blewitt wrote:
>> I've been playing around with embedding the OSGi/Equinox platform into
>> an existing Java system (as opposed to the other way around). I'm
>> using the EclipseStarter to bring up the framework, and once it's up
>> and running with the bundles it works like a charm. I can start up a
>> remote console and reconfigure it if necessary etc.
JM>
JM> This is exactly what we are doing at the moment (i.e. embedding Equinox).
JM>
>> What I'd really like to do is give some control over to the Java
>> system that contains it, particularly with reference to installing new
>> bundles, starting and stopping existing bundles and so forth. All I'd
>> need to do is get hold of a suitable BundleContext and I should be
>> able to do this.
>>
>> Unfortunately, there doesn't seem to be any way of getting this back
>> from an EclipseStarter. I could duplicate the code but it seems
>> somewhat wasteful; there's an OSGi instance in EclipseStarter that has
>> a getBundleContext() that would probably do me, if it weren't for the
>> fact that OSGi is a private field of EclipseStarter.
JM>
JM> How are you starting the framework? We use EclipseStarter.startup,
JM> which returns the BundleContext from the static OSGi instance. This
JM> sounds like exactly what you need.
JM>
>> I'm wondering whether you think it's a good idea to add something like
>> this to EclipseStarter:
>>
>> public static BundleContext getSystemBundleContext() {
>> return osgi.getBundleContext();
>> }
JM>
JM> This addition probably also wouldn't hurt.
JM>
>> I'd then be able to use that to stop/start the various bundles,
>> install others etc. Of course, whilst I can do this via the console, I
>> really want to have a programmatic hook up to make it work. And no, I
>> can't refactor the old system to be a bundle of the Equinox runtime;
>> this is strictly a subset of an existing system.
JM>
JM> Yep, we use this context to (un)install and start bundles from our own
JM> PluginManager.
JM>
>> I note that other places do this kind of thing e.g. the servlet
>> bridge, which maps a URL onto commands that get processed. I'm
>> wondering if the direct way has some obvious flaw that I'm missing?
JM>
JM>
JM> Hope that helps,
JM> Jason
JM>
JM> --
JM> Jason Sankey
JM> http://zutubi.com/
JM> _______________________________________________
JM> equinox-dev mailing list
JM> equinox-dev@xxxxxxxxxxx
JM> https://dev.eclipse.org/mailman/listinfo/equinox-dev
JM>
JM>
--
Peter Kriens Tel +33467542167
9C, Avenue St. Drézéry AOL,Yahoo: pkriens
34160 Beaulieu, France ICQ 255570717
Skype pkriens Fax +1 8153772599