Skip to main content

Posts

Showing posts from March, 2017

OSGI Component and Services

Component are those classes which are marked with @Component annotation and whose life cycle is managed by felix.  A component is an active participant in the OSGi system , a component can be reinitialized through osgi properties through the methods annotated in the class using the activate and deactivate methods. In order to mark class as component in  aem ecosystem provide @component annotation provided through java package "org.apache.felix.scr.annotations.Component".Please refer the example below. Code sample are for illustration purpose only Following are annotation used are some of basic annotation which should always be used while you are creating component. @label-This is generally used as a title for the object described by the meta type. @description-This is generally used as a description for the object described by the meta type. @metatype-If marked as true it will create a metatype.xml within meta type folder in meta-inf folder in bundle and als