So the ConfigAdmin can actually be used to dynamically set either, but only the 
Service Property is used for lookups (filters) and such?

- Joel

> -----Original Message-----
> From: Marcel Offermans [mailto:[email protected]]
> Sent: Wednesday, August 26, 2009 3:16 PM
> To: [email protected]
> Subject: Re: ServiceProperty vs Property
> 
> On Aug 26, 2009, at 23:07 , Joel Schuster wrote:
> 
> > Maybe... Actually, that's why I ask the question. What's the
> > difference then b/t properties of configuration objects and
> > properties with which services are registered that sounds very
> > similar to me.
> >
> > Or, more to the point, in what cases would I use one over the other?
> 
> ConfigAdmin is used to centrally/exernally provide configuration for
> your components.
> 
> Registering properties on services is done so you can query the
> service registry based on them.
> 
> Sometimes the two are used together to first externally configure a
> component and then pass on this configuration to interested parties as
> part of the service properties.
> 
> An example. Let's assume you have a component that is a servlet, and
> you want to be able to configure the endpoint for that servlet
> externally. You'd use ConfigAdmin to do that. Let's also assume that
> the OSGi HttpService supports the whiteboard pattern (by default it
> doesn't but that doesn't matter). By registering your servlet service
> with an endpoint property, HttpService could pick that up and register
> the servlet at the correct endpoint.
> 
> Greetings, Marcel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to