Hello everyone,

I'm playing with the latest SCR from the trunk (and with felix 2.0.2).
More specifically, I am testing the new DS 1.1 "modified" attribute, which allows to invoke a callback when the service component configuration is updated (using config admin). it works fine, but once my component is invoked it it's "modified" callback, the component is then deactivated and reactivated, and I am wondering why ?

Here is my SCR xml descriptors:

<?xml version="1.0" encoding="utf-8"?>
<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0";>
 <scr:component
     name="englishdico"
     activate="activate"
     deactivate="deactivate"
     modified="updated"
     configuration-policy="require">

   <service>
     <provide interface="com.alcatel_lucent.dictionary.DictionaryService"/>
   </service>
   <property name="Language" value="en"/>

<implementation class="com.alcatel_lucent.dictionary.english.EnglishDictionary" />
 </scr:component>
</components>

and here is my component ->

public class EnglishDictionary implements DictionaryService {
private final static Logger _logger = Logger.getLogger(EnglishDictionary.class);

 protected void activate(Map conf) {
   _logger.warn("Activate: config:" + conf);
 }

 protected void deactivate() {
   _logger.warn("Deactivate");
 }

 public void updated(Map conf) {
   _logger.warn("updated: " + conf);
 }

 // ...
}

So, when I update my configuration using the pid "englishdico", I see that my "updated" method is nicely invoked ... but the component is then deactivated/reactivated ?
Is it a normal behaviour ?

thanks;
/pierre


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to