[osgi-dev] Inserting Properties at runtime

Kevin Riff kriff at espial.com
Tue Sep 5 16:14:05 EDT 2006


I'm curious, Tom. What is the use case for running multiple frameworks
in the same VM? 

 

 

-----Original Message-----
From: osgi-dev-bounces at membercvs.osgi.org
[mailto:osgi-dev-bounces at membercvs.osgi.org] 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/IBM at IBMUS 
Sent by: osgi-dev-bounces at membercvs.osgi.org 

09/05/2006 02:17 PM 

Please respond to
OSGi Developer Mail List <osgi-dev at membercvs.osgi.org>

To

OSGi Developer Mail List <osgi-dev at membercvs.osgi.org> 

cc

 

Subject

Re: [osgi-dev] Inserting Properties at runtime

 

 

 





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
aeberbac at us.ibm.com 

Andrew Eberbach/Durham/IBM at IBMUS 
Sent by: osgi-dev-bounces at membercvs.osgi.org 

09/05/2006 02:21 PM 

Please respond to
OSGi Developer Mail List <osgi-dev at membercvs.osgi.org>

To

osgi-dev at membercvs.osgi.org 

cc

 

Subject

[osgi-dev] Inserting Properties at runtime

 

 

 






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
aeberbac at us.ibm.com_______________________________________________
osgi-dev mailing list
osgi-dev at bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
osgi-dev mailing list
osgi-dev at bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://bundles.osgi.org/pipermail/osgi-dev/attachments/20060905/076514b5/attachment-0001.html 


More information about the osgi-dev mailing list