How do you build and install your bundle? Make sure the resulting JAR actually 
contains the SCR descriptor for the component and also ensure the DS service is 
actually available in the runtime. Other than that, the actual code can be 
correct (depending on your actual imports which was not shown).
If this contains Felix Services and gogo Shell you can use scr:list command to 
verify.

Gruss
Bernd
-- 
http://bernd.eckenfels.net




On Wed, Oct 26, 2016 at 7:07 AM +0200, <manoj.vrajam...@wipro.com> wrote:




















Hi All,



@Component(immediate = true)

public class SampleImpl {

  

    @Activate

    public void activate()

    {

        System.out.println("starting.....");

    }

}

    


How to invoke this ? activate() is not getting invoked when I run this simple 
application.







Thanks,


Manoj






The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should
 not disseminate, distribute or copy this e-mail. Please notify the sender 
immediately and destroy all copies of this message and any attachments. 
WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments
 for the presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email. www.wipro.com







_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to