Equinox has API that allows it to be embedded into another application. Once this API was available people start doing interesting things that we did not really anticipate. For example, web application developers have included Equinox in their own web application to componentize their web application. If multiple web applications do this then each one will get its own framework instance running in the same VM which is running the application server. It starts getting more complicated now that application servers are starting to use OSGi as their underlying runtime. This introduces scenarios where an OSGi framework is used to launch a J2EE application server, then within that runtime an application will launch its own OSGi framework.
There are lots of issues to work around when running with multiple OSGi frameworks in the same VM. For example, the URL stream handler and security manager are singletons. We have worked around most of these issues in the server-side incubator in Equinox.
Tom
"Kevin Riff"
<[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 09/05/2006 03:14 PM
|
|
I’m curious, Tom. What is the use case for running multiple frameworks in the same VM?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Watson
Sent: September 5, 2006 3:59 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Inserting Properties at runtime
This will lead to issues when you run in an environment where there is more than one OSGi framework running in the VM at the same time. In this environment some framework implementations will have instance specific properties for BundleContext properties. I know Equinox does this when running multiple frameworks in the same VM and I think Felix does the same thing.
In this case you may not see the system property changes in the BundleContext properties because they only represent the properties for the specific instance of the framework while the System properties represent global properties for the whole VM environment. If you can live with the property being global to the whole VM then you should get the property using the System.getProperty instead of BundleContext.getProperty.
Another option would be to request OSGi add a BundleContext.setProperty method. This way we can set the instance specific framework properties in the case where multiple Frameworks are running in the same VM.
Tom
Andrew Eberbach/Durham/[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED] 09/05/2006 02:17 PM
|
|
Well, I managed to find the answer myself. I didn't realize that even after startup you can do a System.setProperty() and the Context will pick it up. I'm not sure if this is 100% pure, but it works in my environment (equinox) so that's all I need.
Thanks,
Andrew
Andrew Eberbach
Autonomic Computing
(919) 254-2645
T/L: 444-2645
[EMAIL PROTECTED]
Andrew Eberbach/Durham/[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED] 09/05/2006 02:21 PM
|
|
Hi,
Is it possible to set a property without using ConfigurationAdmin? What I'm trying to do is insert one property during my bundle's startup so that other bundles can see it.
Thanks,
Andrew
Andrew Eberbach
Autonomic Computing
(919) 254-2645
T/L: 444-2645
[EMAIL PROTECTED]_______________________________________________
osgi-dev mailing list
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
osgi-dev mailing list
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev_______________________________________________
osgi-dev mailing list
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ osgi-dev mailing list osgi-dev@bundles.osgi.org http://bundles.osgi.org/mailman/listinfo/osgi-dev