[ 
https://issues.apache.org/jira/browse/FELIX-4698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14212549#comment-14212549
 ] 

David Jencks commented on FELIX-4698:
-------------------------------------

If possible I would like to avoid using SynchronousConfigurationListener.  If I 
understand correctly the situation you are seeing could be imitated in a test 
by providing a ConfigurationAdmin implementation that supplies a Configuration 
which throws IllegalStateException when getProperties() (and possibly some 
other methods) is called?

> SynchronousConfigurationListener
> --------------------------------
>
>                 Key: FELIX-4698
>                 URL: https://issues.apache.org/jira/browse/FELIX-4698
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.8.2
>            Reporter: Jens Offenbach
>              Labels: configuration, configurationadmin, scr
>
> When you directly create/update a configuration and delete it right after 
> creation, the component instance creation of components which preconditions 
> become fulfilled (using ConfigurationPolicy.REQUIRE) often fails. The reason 
> is that events from the ConfigurationAdmin are delivered to SCR 
> asynchronously. This results in the following behavior: SCR receives a 
> configuration update event and accesses e.g. its properties. The call fails 
> because the configuration was deleted in the meantime. A solution would be to 
> implement  SynchronousConfigurationListener in the class CongurationSupport 
> instead of ConfigurationListener. That forces the ConfigurationAdmin to 
> deliver the update events before someone can delete the configuration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to