Hi guys,
is it possible to set a OSGI config variable through a dialog?
For Example I want enable the authors to change an API Key, but not only to change it I want to create a variable according to the baseurl the component/service is running on.
Test.com uses one config variable which is created on startup -> com.test.apikey
Test-test.com uses another config which is created on startup -> com.test-test.apikey
Br,
Tim
Solved! Go to Solution.
Hi,
Don't use OSGI for this. Setting OSGI configs might cause internal rebindings of services, potentially causing temporary failures on requests. Also this requires sufficient privileges, and I would not want to grant an ordinary author (even he's allowed to update the API keys) these privileges.
Rather use the Sling Context Aware Configuration, which is more appropriate and gives you multitenancy for free :-)
Hi,
I think you cannot create and set OSGI config variable through dialog. Instead you can set and read it from ConfigMgr. See this below article for your reference.
Reading OSGi Configuration Values for Adobe Experience Manager 6.3
Views
Replies
Total Likes
Thanks Ratna
So there is really no possibility to create them during runtime? Maybe someone knows a little bit more?
Views
Replies
Total Likes
I agree with Ratna - never have I seen or read any material that suggests OSGI configuration values can be dynamically created. Lets see if other community members know of a way - if there is a way - its hidden functionality - not documented in docs or community articles.
Read this - you can change the values of them using code - not create them:
Yes that's all I found. Is there maybe another way? start a the same service for every domain with different configs, without duplicating the service with another name?
GooglemapsService --> config.pl
GooglemapsService --> config.com
GooglemapsService --> config.nl
...
Views
Replies
Total Likes
Hi,
Don't use OSGI for this. Setting OSGI configs might cause internal rebindings of services, potentially causing temporary failures on requests. Also this requires sufficient privileges, and I would not want to grant an ordinary author (even he's allowed to update the API keys) these privileges.
Rather use the Sling Context Aware Configuration, which is more appropriate and gives you multitenancy for free :-)
Views
Likes
Replies
Views
Likes
Replies