package com.iluwatar.servicelocator;

/**
 * Service locator pattern, used to lookup JNDI-services
 * and cache them for subsequent requests.
 *
 * @author saifasif
 * 
 */
public class App {
	
	/**
	 * Program entry point
	 * @param args command line args
	 */
    public static void main(String[] args) {
        Service service = ServiceLocator.getService("jndi/serviceA");
        service.execute();
        service = ServiceLocator.getService("jndi/serviceB");
        service.execute();
        service = ServiceLocator.getService("jndi/serviceA");
        service.execute();
        service = ServiceLocator.getService("jndi/serviceA");
        service.execute();
    }
}

@@ -38,16 +38,387 @@
 %0A/**%0A * 
+%0A * The Service Locator pattern is a design pattern used in software development %0A * to encapsulate the processes involved in obtaining a service with a strong %0A * abstraction layer. This pattern uses a central registry known as the %22service %0A * locator%22, which on request returns the information necessary to perform a certain task.%0A * %3Cp%3E%0A * In this example we use the 
 Service 
@@ -436,14 +436,8 @@
 tern
-, used
  to 
@@ -502,16 +502,20 @@
 ests.%0A *
+ %3Cp%3E
 %0A * @aut

Improve Service Locator Javadoc