title: AEM 6.3 - Migrate Felix to OSGi annotations: How to deal with propertyPrivate?
body: <p>I'm migrating an AEM 6.1 application to AEM 6.3. Since Felix annotations (org.apache.felix.scr.annotations.*) are deprecated, I decided to migrate my components to the OSGi annotations (org.osgi.service.component.annotations.*).</p>
  
  <p>Once I figured out how it works, it is pretty easy. But there is one case I don't know how to handle: Properties with <em>propertyPriavte = true</em>.</p>
  
  <p>The old implementation looks like this:</p>
  
  <pre><code>@Component(metatype = true)
  @Service(Servlet.class)
  @Properties({
          @Property(name = "sling.servlet.selectors", value = "overlay", propertyPrivate = true),
  })
  public class OverlayServletImpl extends OverlayServlet {
  ...
  }
  </code></pre>
  
  <p>The property <em>sling.servlet.selectors</em> would not be configurable in the Configuration Manager at the AEM console, but it would be configurable due to a config file, right? So, I still need to define this property.</p>
  
  <p>For other properties I changed my implementation like this:</p>
  
  <pre><code>// OverlayServletImpl
  @Component(
          service = Servlet.class,
          configurationPid = "my.package.path.OverlayServletImpl"
  )
  @Designate(
          ocd = OverlayServletImplConfiguration.class
  )
  public class OverlayServletImpl extends OverlayServlet {
  ...
  }
  
  // Configuration
  @ObjectClassDefinition(name = "Overlay Servlet")
  public @interface OverlayServletImplConfiguration {
  
      String sling_servlet_selectors() default "overlay";
  ...
  }
  </code></pre>
  
  <p>Now, I have the property <em>sling.servlet.selectors</em>, but it is also available in Configuration Manager and it'S value can be changed there. But I don't want that.</p>
  
  <p>How can I do that? Is this possible with the OSGi annotations?</p>
  
  <p>Thank you and best regards!</p>