what is the difference between <osgi:reference>
and <osgi:service>
in the xml config file of spring DM.
<osgi:reference> can be used to get a reference to existing OSGi service so your bean can use it. <osgi:service> can be used to export a bean as an OSGi service so it can be used by others. Follow this answer to receive notifications.
The OSGi Service Platform provides a mechanism for developing applications by using a component model and deploying those applications into an OSGi framework. The OSGi architecture is separated into a number of layers that provide benefits to creating and managing Java™ applications.
The OSGi service registry enables a bundle to publish objects to a shared registry, advertised via a given set of Java interfaces. Published services also have service properties associated with them in the registry.
<osgi:reference>
can be used to get a reference to existing OSGi service so your bean can use it.
<osgi:service>
can be used to export a bean as an OSGi service so it can be used by others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With