What's the difference between "service property" and "property" at http://felix.apache.org/site/how-to-use-ipojo-annotations.html#HowtouseiPOJOAnnotations-@ServiceProperty?
Asked
Active
Viewed 487 times
1 Answers
2
A @ServiceProperty is published with the (OSGi) services provided by the component. On the other side, @Property are kept private.
For example:
@Component
@Provides
public class MyComponent implements MyService {
@Property
private String hidden;
@ServiceProperty
private String shown;
[...]
}
This component publishes the MyService 'service' with the 'shown' property. 'hidden' is not published.

Clement
- 2,817
- 1
- 12
- 11
-
What if different services component provides need different properties? Is this unsupported? – Alexey Romanov May 03 '12 at 13:13