concept service registry in category spring

appears as: service registry, The service registry
Spring Dynamic Modules in Action

This is an excerpt from Manning's book Spring Dynamic Modules in Action.

The service registry is an important part of OSGi because it allows bundles to be used and to interact in a way that takes the dynamic nature of the system into account. Through the service registry, OSGi offers the ability to register one or several access points to components through services. Figure 1.6 shows how modules can communicate by registering and consuming services.

Figure 1.6. Thanks to the service registry, modules can publish and consume services. They can then communicate in a loosely coupled manner, which enforces modularity.

The OSGi API provides access to all services present in the OSGi service registry. As explained in chapter 1, the service registry is the feature that makes it possible for bundles to interact with each other in a way that takes the dynamic nature of the system into account. As with registering services, the OSGi API must be used to obtain, and then use, service instances. The OSGi technology offers two specific approaches for accomplishing this.

The OSGi services feature is based on the service registry, which provides name-and property-based lookup, registration, and management of all service instances registered in the container. It also can be used to notify components when changes occur, to prevent errors from occurring. Figure 2.10 summarizes the possible interactions between the service registry and OSGi components.

Figure 2.10. Possible interactions between OSGi components and the service registry
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest