SCR annotation VS ds Annotation(OSGI annotation):
"First change is that @Service and @Component are now combined, via service you specify which service you are implementing @Component(service = MySimpleService.class)"
What does it mean now to declare any component as a service there is no need of using @service annotation?
I found somewhere this in net
Before : In SCR Annotations:
@Component(name=”Test Service”,immediate=true,description="this is description") @Service(TestService.class) public class TestService { public String getName() { return "testService"; } } |
@Component(name=”Test Service” service=TestService.class,immediate=true) public class TestService { public String getName() { return "testService"; } } |
Solved! Go to Solution.
Hi,
Yes, when you use osgi annotations, you need to use @component with service attribute annotation to mark component as service.
e.g.
@Component(name=”Test Service” service=TestService.class,immediate=true)
Views
Replies
Total Likes
Hi,
Yes, when you use osgi annotations, you need to use @component with service attribute annotation to mark component as service.
e.g.
@Component(name=”Test Service” service=TestService.class,immediate=true)
Views
Replies
Total Likes
Hi,
Yes Arun is right. when you use OSGI annotations, you need to use @component annotation with service attribute annotation to mark component as service.
Thanks,
Ratna Kumar.
Views
Likes
Replies
Views
Likes
Replies