3 Replies Latest reply on Nov 14, 2017 8:05 AM by smacdonald2008

    Custom Component doesn't bind to Service

    Krishna_C Level 1

      Hi Everyone,


      I am trying change the default the ContentSyncManager implmentaion provided by Adobe . So I created a class CustomContentSyncManagerImpl class as shown below


      @Component(metatype=true, label="Day CQ Content Sync Manager", description="Responsible for cache updates and content delivery using zip files.",immediate=true)


      @Properties({@org.apache.felix.scr.annotations.Property(name = "service.ranking", intValue=10000)})

      public class CustomContentSyncManagerImpl   implements ContentSyncManager


      I am able to achieve my use case but the only issue is until the I restart the bundle "com.day.cq.wcm.cq-wcm-content-sync"(id =412 , AEM 6.3 ) my custom component is not being called only the default implementation is being called.


      I am using high ranking and immediate=true,I could see both the custom and default components in Active status.  I wonder why my component is not getting attached to the service.

      Is there is way to achieve this without restarting the other bundle ? I had thought like restarting the bundle programatically using bundle activator which doesnt sound like a good option .