2.2. Service Locator

Service Locator encapsulates the implementation mechanisms for looking up business service components. A Business Delegate uses a Service Locator to connect to a Session Façade. Other clients that need to locate and connect to Session Façade, other business-tier services, and web services can use a Service Locator. The Service Locator pattern uses a consistent approach to locating business components regardless of the type of components. 

UML representation


The following is a benefit of using the Service Locator pattern:
  • Standardized approach to retrieving business components

When to Use

You should use the Service Locator pattern when:
  • You have many different business services that are located in different ways.