felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@adobe.com>
Subject Re: {config admin] Changing a ManagedService[Factory] pids
Date Fri, 01 Mar 2013 13:49:03 GMT
Hi,

Am 26.02.2013 um 21:19 schrieb David Jencks:

> I was looking at the code for ManagedServiceTracker.modifiedService and it looks odd
to me.  Before I spend a lot of time verifying what does happen I thought I should ask about
what should happen :-)
> 
> Lets say you have a MS registered with pids {1, 2} and you change the service registration
so its interested in pids {2, 3} and there are existing configs for 1, 2, 3.  What should
happen?
> 
> I think that:
> 
> -- MS stops getting updates for pid 1

Yes

> -- continues to get updates for changes to pid 2, but does not receive an update for
the existing config for pid 2 (it already got one

Yes

> -- gets an update with the current state of the existing config for pid 3

Yes

> 
> Is this what should happen?  The code looks to me like MS will get an update for the
existing config for pid 2, which would be a duplicate notification.  As I said, I didn't check
that this is what happens, its just based on looking at the code.

Before actually supplying the configuration, the ConfigurationMap.shallTake method is called
which makes sure the configuration to be supplied has a higher revision counter than any configuration
of the same PID already supplied.

So, no, pid2 is only applied once.

I have just added a test case to verify that.

Regards
Felix

> 
> thanks!
> david jencks
> 


--
Felix Meschberger | Principal Scientist | Adobe








Mime
View raw message