I understand that the ManagedService has to handle the missing number
property.  What is the expected way for this to happen?

Is each configuration considered to be complete and self-contained, so
the answer below would be number:7?  If this is the case, then the
ManagedService is reset to the default configuration before the passed
configuration is applied.

Is each configuration considered an update to the current configuration,
so the answer below would be number:1?  If this is the case, then the
ManagedService is NOT reset before the passed configuration is applied.

At first, I thought it was the latter (inferred by the name of the
update method).  However, the few examples I've seen appear to implement
the former.  Looking at the source code also suggests the former since
Configuration.update() calls Configuration.configureFromPersistence()
and Configuration.update(Dictionary) simply replaces the Dictionary used
for persistence.


Tim Moloney                            The reasonable man adapts himself
to 
ManTech Real-time Systems Laboratory   the world; the unreasonable one
persists
2015 Cattlemen Road                    in trying to adapt the world to
himself.
Sarasota, FL  34232                    Therefore all progress depends on
the
(941) 377-6775 x208                    unreasonable man. - George
Bernard Shaw
 

> -----Original Message-----
> From: Felix Meschberger [mailto:[email protected]] 
> Sent: Wednesday, May 13, 2009 14:17
> To: [email protected]
> Subject: Re: How are configurations received from ConfigAdmin 
> service expected to be used?
> 
> Hi Tim,
> 
> Moloney, Tim M schrieb:
> > I've starting working with the ConfigurationAdmin service 
> and I need to
> > know how a configuration that a ManagedService recieves is 
> expected to
> > be used.
> > Is the received Dictionary an augmentation of the current 
> configuration
> > or is it a complete configuration.  For example,
> > 
> > ManagedService Foo (default color: blue, default number: 7)
> > 
> > Foo receives (color: red, number: 1) and is set to (color: 
> red, number:
> > 1).
> > 
> > If Foo then receives (color: yellow) should Foo's configuration be
> > (color: yellow, number: 1) or (color: yellow, number: 7)?
> 
> The ManagedService.update method receives the exact contents of the
> dictionary ues by the managemant agent for calling the
> Configuration.update(Dictionary) method with three additional 
> properties
> managed by the ConfigurationAdmin service (service.pid,
> service.factoryPid, service.bundleLocation).
> 
> So when the configuraiton is updated with just (color:yellow), the Foo
> service has to cope with the missing "number" property.
> 
> Hope this helps.
> 
> Regards
> Felix
> > 
> > Thanks.
> > 
> > 
> > Tim Moloney                 The reasonable man adapts himself to
> > MRSL                        the world; the unreasonable one persists
> > 2015 Cattlemen Road         in trying to adapt the world to himself.
> > Sarasota, FL  34232         Therefore all progress depends on the
> > (941) 377-6775 x208         unreasonable man. - George Bernard Shaw
> > 
> > 
> 
> ---------------------------------------------------------------------
> 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