Alex Blewitt created FELIX-4373:
-----------------------------------
Summary: Felix does not appear to set org.osgi.* values as System
properties
Key: FELIX-4373
URL: https://issues.apache.org/jira/browse/FELIX-4373
Project: Felix
Issue Type: Bug
Reporter: Alex Blewitt
Priority: Minor
>From the command line console, the value returned by context:getProperty
>appears to differ from the property set on the JVM:
g! (getProperties) get "java.version"
1.7.0_45
g! (getProperties) get "org.osgi.supports.framework.extension"
g! context:getProperty "java.version"
1.7.0_45
g! context:getProperty "org.osgi.supports.framework.extension"
true
g! (getProperties) get "org.osgi.framework.version"
g! (getProperties) get "org.osgi.framework.vendor"
g! context:getProperty org.osgi.framework.version
1.5
g! context:getProperty org.osgi.framework.vendor
Apache Software Foundation
It looks like context:getProperty is doing something different than that
returned by System.getProperties(). On the other hand, when running under
Equinox, these both return the same result:
osgi> context:getProperty org.osgi.supports.framework.extension
true
osgi> (getProperties) get "org.osgi.supports.framework.extension"
true
osgi> (getProperties) get "org.osgi.framework.vendor"
Eclipse
osgi> (getProperties) get "org.osgi.framework.version"
1.7.0
>From the OSGi specification:
"Additionally, frameworks must implement fragments, require bundle, and
extensions. They must therefore set the following properties to true.
org.osgi.supports.framework.requirebundle org.osgi.supports.framework.fragments
org.osgi.supports.framework.extension"
It is not clear if the spec suggests the properties should be set as System
properties, or merely the system bundlecontext's properties (which is what
Felix appears to do).
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)