[ 
https://issues.apache.org/jira/browse/OAK-11686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17948145#comment-17948145
 ] 

Konrad Windszus commented on OAK-11686:
---------------------------------------

As Oak is supposed to also be used outside OSGi runtimes this requires too much 
reflection work to make it work when the classpath does not contain 
{{org.osgi.framework}}. Therefore closing as won't fix. Even in OSGi runtimes 
one can leverage system properties...

> Add lookup of configuration without providing BundleContext or 
> ComponentContext
> -------------------------------------------------------------------------------
>
>                 Key: OAK-11686
>                 URL: https://issues.apache.org/jira/browse/OAK-11686
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core-spi
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>
> In OSGi runtimes it is preferable to first check the framework properties 
> before falling back to the regular system properties. As not in all contexts 
> a suitable BundleContext is available there should be a dedicated method in 
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiUtil.java
>  which works without it.
> The implementation of that method can look like 
> https://github.com/apache/jackrabbit-filevault/blob/c475237b2f529429a47ad029791561f7d9a6413c/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/OsgiAwarePropertiesUtil.java#L34
> This should also be used from within the {{SystemPropertySupplier}} to 
> preferably use framework properties.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to