You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Guillaume Nodet <gn...@gmail.com> on 2010/02/03 18:42:10 UTC
ConfigAdmin and asynchronous storage update
I'm not completely intimate with the config admin code, but my
understanding is that configuration updates are done asynchronously.
The spec section 104.7.3.1 says:
The update method calls in Configuration objects are not executed
synchronously
with the related target service updated method. This method must be called
asynchronously. The Configuration Admin service, however, must
have updated
the persistent storage before the update method returns.
However, looking at the CM code, it looks like everything is executed
asynchronously.
I haven't tried, but it looks like if the same thread updates a
configuration and just after that
retrieve the configuration again, it may not see the updated values,
while I think it should
be the case.
Thoughts ?
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Re: ConfigAdmin and asynchronous storage update
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
On 03.02.2010 18:42, Guillaume Nodet wrote:
> I'm not completely intimate with the config admin code, but my
> understanding is that configuration updates are done asynchronously.
> The spec section 104.7.3.1 says:
>
> The update method calls in Configuration objects are not executed
> synchronously
> with the related target service updated method. This method must be called
> asynchronously. The Configuration Admin service, however, must
> have updated
> the persistent storage before the update method returns.
>
> However, looking at the CM code, it looks like everything is executed
> asynchronously.
> I haven't tried, but it looks like if the same thread updates a
> configuration and just after that
> retrieve the configuration again, it may not see the updated values,
> while I think it should
> be the case.
>
> Thoughts ?
Peristing configuration is synchronous: As soon as you call
Configuration.update(Dictionary) the configuration is persisted and thus
available through the ConfigurationAdmin service.
Any notifications and updates -- ConfigurationListener and
ManagedService[Factory] -- take place asynchronously.
Hope this helps.
Regards
Felix