felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: iPOJO and Configuration Admin Service
Date Fri, 09 Jun 2006 09:40:39 GMT
Clement Escoffier wrote:
> and thank you for the feedback.

Definitely, thanks for taking the time to play with this. It is nice to 
get feedback from outsiders, since they tend to find issues that we do 
not, since we are too close to the work.

Let us know if the latest changes resolve your remaining issues with 
Config Admin support and I will try to get the source into Felix' svn 
repo ASAP.

-> richard

>
>>
>> <iPOJO>
>> <component
>> className="com.verticon.experiment.ipojo.configuration.ConfiguribleEventHandler"
  
>> name="com.verticon.experiment.ipojo.configuration" architecture="true">
>>   <Provides    interface="org.osgi.service.event.EventHandler">
>>    <DynamicProperty         name="event.topics"
>> field="topics"
>> value="com/verticon/rfid/MOVEMENT"/>
>> </Provides>
>>   <ConfigurableProperty             field="topics" 
>> name="event.topics" />
>>     <callback              final="VALID" initial="INVALID" 
>> method="starting"/>
>>     <callback              final="INVALID" initial="VALID" 
>> method="stopping"/>
>> </component>
>> </iPOJO>
>>   
> These metadata mean that only the field "topics" is configurable. Then 
> all other field's name are rejected. Nevertheless, your field is a 
> dynamic property too, so it should propagate your value to the service 
> registration. The version that you used does not handle property's 
> name but only property's field. I change this to support property name 
> too (if no name, I use the property field). So with the new deployed 
> version (always 2.6), your metadata should be correct.
>
>> 1. The first issue (problem?) that I see is that the iPOJO container
>> (org.apache.felix.ipojo.handlers.configuration.ConfigurationHandler)
>> registers, unregisters, and registers a second time as a ManagedService
>> with the framework. Note the ConfiguationAdmin
>> (org.apache.configuration.impl) implementation uses a separate thread
>> for callbacks to invoke the updated method on the service.   
> It was a small bugs when the handler start and when the component 
> state changes. So I correct it. I test it and it seems to work. 
> (reinstall the 2.6 version, at the same location).
>
>>
>> 2. The second issue I have seen is that the container
>> (ConfigurationHandler) is rejecting all configuration properties.
>> (Would have expected at least that the event.topics would be accepted
>> and propagated as it is specified in the metadata.  Or did I setup the
>> metadata wrong?)
>>
>> Don't think the container can be so picky with the configs. As specified
>> in the OSGi Compendium Spec R4 p 70-432 All Configuration Properties
>> should be accepted and propagated to the service registration by the
>> ManagedService (in this case the iPOJO container). Here is a log output:
>>   
>
> The new pushed values are propagated to the service registration if 
> the provided services contains a dynamic property with the same field 
> name than the configurable property.
> My configuration handler does not do anything with all other 
> configuration, I changed the log level of the message form SEVERE to 
> WARNING. It means that you push a non consistent configuration to the 
> component (there is no configurable property with this name).
>
>
> Clement
>
>

Mime
View raw message