[
https://issues.apache.org/jira/browse/FELIX-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13862855#comment-13862855
]
Felix Meschberger commented on FELIX-4373:
------------------------------------------
IMHO the framework is not to set the system properties just to manage the
framework properties.
Setting system properties is a VM-wide operation which may be causing trouble
if you have multiple OSGi frameworks running within the same VM.
As to the spec: I would assume the intent is to set the framework properties
and not the system properties as well.
As such, I would expect the Felix Framework implementation to do the right
thing (not setting the system properties) and the Felix Gogo shell to do the
right thing (to no expose framework properties for the getProperties call.
> 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)