> I didn’t mean ManagedService using DS, I meant using DS configuration (which
> is basically a managed service.
Ok - but you can see the source of confusion right? Your post does not
reference DS at all, and ManagedService is an interface defined by
ConfigurationAdmin. If someone looks up Mana
> Timothy Ward :
> None of the above. When it comes to configuration you should always be
> using Configuration Admin to inject you, not getting a service. If
> you’re using DS then this configuration can be directly injected into
> your activate method, either as a Map or a Component Property
I didn't mean ManagedService using DS, I meant using DS configuration (which is
basically a managed service.
When using @Component, we implicitly have a configuration link to the component
injected via activate and the ComponentContext (getProperties).
I disagree about @Referece to Configurat
> I would more recommend a ManagedService or inject the ConfigAdmin service.
This is really bad advice, and Steinar should definitely not do either of these
things (nor should other readers of this mail chain).
Steinar has already indicated that he wants to use Declarative Services, so
impleme
I would more recommend a ManagedService or inject the ConfigAdmin service.
Regards
JB
On 12/03/2017 09:41 AM, Steinar Bang wrote:
What's the recommended way for an OSGi bundle running inside karaf to
access its configuration?
Get an OSGi service of type ConfigMBean[1]?
Get an OSGi servie of ty
Hi Steinar,
> What's the recommended way for an OSGi bundle running inside karaf to
> access its configuration?
>
> Get an OSGi service of type ConfigMBean[1]?
> Get an OSGi servie of type ConfigRepository[2]?
>
> Or maybe avoid karaf dependencies, and get an OSGi service of type
> Configuration
> Steinar Bang :
> What's the recommended way for an OSGi bundle running inside karaf to
> access its configuration?
To be more specific: I'm looking for the best and simplest way to
retrieve the configuration that in a plain Java application typically
would be put in .properties files, like
What's the recommended way for an OSGi bundle running inside karaf to
access its configuration?
Get an OSGi service of type ConfigMBean[1]?
Get an OSGi servie of type ConfigRepository[2]?
Or maybe avoid karaf dependencies, and get an OSGi service of type
ConfigurationAdmin[3]...?
Does anyone kno