title: OSGi Declarative Services and Config Admin
body: <p>I'm writting bundle with declarative services usage. For configuration I'm using properties in DS declaration. Those props can be normally changed by Config Admin, but they are not persisted. After container restart, component has default values.</p>
  
  <p>I'am using Config admin like this:</p>
  
  <pre><code>Configuration c = configurationAdmin.getConfiguration(UserAgent.SERVICE_PID, null);
  System.out.println(c.getProperties()); // every time is null!
  Dictionary props = new Hashtable();
  props.put(UserAgent.PROPERTY_PORT, 5555);
  c.update(props);
  </code></pre>
  
  <p>and in component I have:</p>
  
  <pre><code>// ...
  
  @Modified
  public void updated(ComponentContext context) {
      config = context.getProperties();
      init();
  }
  
  @Activate
  protected void activate(ComponentContext context) {
      config = context.getProperties();
      init();
  }
  //...
  </code></pre>
  
  <p>I'm using Felix, properties file is stored in cache</p>
  
  <pre><code>service.bundleLocation="file:bundles/cz.b2m.osgi.phonus.core_1.0.0.SNAPSHOT.jar"
  service.pid="cz.b2m.osgi.phonus.sip"
  port=I"5555"
  </code></pre>
  
  <p>But after restart isn't loaded. What I'm doing wrong? Thanks for all tips.</p>