Skip to main content

Introduction to Service Locator

This chapter describes the steps to install and run the Service Locator. The Service Locator is a technical service that provides service consumers with a mechanism to discover service endpoints at runtime, thus isolating consumers from the knowledge about the physical location of the endpoint.

Additionally, it allows service providers to automatically register and unregister their service endpoints. In this way, the providers actively advertise the availability of their service endpoints to consumers.

The Service Locator consists of two parts:

  • The Service Locator server hosting an endpoint repository.

  • The CXF feature used to enable usage of the locator for CXF service consumers and providers.

Like any standard CXF feature, it has separate functionalities for service and consumer:

  • when the provider becomes available or unavailable, a provider-side Locator Feature extension registers and deregisters service endpoints respectively in the endpoint repository.

  • when a service call to a provider is about to be made, a consumer-side Locator Feature extension transparently retrieves service endpoint addresses from the endpoint repository.

It is also possible to restrict access to the Service Locator (for example, to restrict updates permissions), please see Restricting access to the Service Locator for more details.

Since creating a distributed, fault-tolerant endpoint repository is a non-trivial task, the Service Locator server implementation is based on proven open source technology - Apache ZooKeeper. This is a highly reliable service that provides coordination between distributed processes. To learn more about Apache ZooKeeper, see http://zookeeper.apache.org/.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!