#107 Service Locator JavaDoc
This commit is contained in:
parent
488e5dd281
commit
743b6e69c5
@ -1,12 +1,18 @@
|
|||||||
package com.iluwatar.servicelocator;
|
package com.iluwatar.servicelocator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service locator pattern, used to lookup jndi services
|
* Service locator pattern, used to lookup JNDI-services
|
||||||
* and cache them for subsequent requests.
|
* and cache them for subsequent requests.
|
||||||
*
|
*
|
||||||
* @author saifasif
|
* @author saifasif
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class App {
|
public class App {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Program entry point
|
||||||
|
* @param args command line args
|
||||||
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Service service = ServiceLocator.getService("jndi/serviceA");
|
Service service = ServiceLocator.getService("jndi/serviceA");
|
||||||
service.execute();
|
service.execute();
|
||||||
|
@ -6,6 +6,7 @@ package com.iluwatar.servicelocator;
|
|||||||
* <li>service name</li>
|
* <li>service name</li>
|
||||||
* <li>unique id</li>
|
* <li>unique id</li>
|
||||||
* <li>execution work flow</li>
|
* <li>execution work flow</li>
|
||||||
|
*
|
||||||
* @author saifasif
|
* @author saifasif
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
package com.iluwatar.servicelocator;
|
package com.iluwatar.servicelocator;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.iluwatar.servicelocator.App;
|
import com.iluwatar.servicelocator.App;
|
||||||
|
|
||||||
public class AppTest {
|
/**
|
||||||
|
*
|
||||||
@Test
|
* Application test
|
||||||
public void test() {
|
*
|
||||||
String[] args = {};
|
*/
|
||||||
App.main(args);
|
public class AppTest {
|
||||||
}
|
|
||||||
}
|
@Test
|
||||||
|
public void test() {
|
||||||
|
String[] args = {};
|
||||||
|
App.main(args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user