Activate method not getting executed
Hi All, I have created a simple service in Sling and deployed the same on my AEM instance. However, the activate method is not getting called for this class. Here is my implementation class: package com.company.project.auth.impl; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.metatype.annotations.Designate; import org.slf4j.Logger; @Designate(ocd=MyConfiguration.class) @Component(service = MyRequestImpl.class, immediate = true, configurationPid = "com.company.project.auth.impl.MyRequestImpl") public class MyRequestImpl implements MyRequest{ protected final transient Logger logger = LoggerFactory.getLogger(this.getClass()); @Activate protected void activate( final MyConfiguration config) { logger.info("Calling Activate"); } @Override public String myFunction() { logger.info("Calling my function"); } } I am able to see the log, "Calling my function" but not the one, "Calling Activate". Please suggest a solution.