mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-16 00:59:02 +00:00
Fixed package name and some spelling mistakes.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.iluwatar;
|
||||
/**
|
||||
* Service locator pattern, used to lookup jndi services
|
||||
* and cache them for subsequent requests.
|
||||
* @author saifasif
|
||||
*
|
||||
*/
|
||||
public class App {
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user