[
https://issues.apache.org/jira/browse/OAK-6917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16264365#comment-16264365
]
Marcel Reutegger commented on OAK-6917:
---------------------------------------
bq. Given DocumentNodeStoreServiceConfiguration is already using ConfigAdmin
may be we use it to fetch config for preset also and thus avoid all this dummy
reference
This would also work, but make it more difficult to fall back to the preset
configuration. Right now the DocumentNodeStoreServiceConfiguration can simply
invoke the method on the preset configuration instead of the regular
configuration. I would rather keep the preset service because it simplifies the
DocumentNodeStoreServiceConfiguration implementation.
bq. Would it ensure that if config is already present in config admin then it
uses that always for first activation post start?
I think it would. The specification says for {{configuration-policy}}:
bq. optional - (default) Use the corresponding Configuration object if present
but allow the component to be satisfied even if the corresponding Configuration
object is not present.
I understand the component *must* use the Configuration object if present.
Given the preset configuration is something set when an application is
assembled and should not be changed at runtime, I think the current patch
should be fine.
> Configuration presets for DocumentNodeStoreService
> --------------------------------------------------
>
> Key: OAK-6917
> URL: https://issues.apache.org/jira/browse/OAK-6917
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: documentmk
> Reporter: Marcel Reutegger
> Assignee: Marcel Reutegger
> Priority: Minor
> Fix For: 1.8
>
> Attachments: OAK-6917-alternative-approach.patch, OAK-6917.patch,
> OAK-6917.patch
>
>
> When Oak is deployed in an OSGi container, applications usually want to ship
> a default configuration which is different from the defaults present in Oak.
> E.g. an application may want to use a default cache size of 1G for the
> DocumentNodeStoreService instead of the default 256M. Now if a user of the
> application provides a custom configuration and does not specify the cache
> size, the value for this configuration will flip back to the Oak default of
> 256M.
> There should be a way to configure presets for the application that are
> different from the Oak defaults and then allow a user to customize the
> configuration while still respecting the presets.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)