DEVFYI - Developer Resource - FYI

What is Service Locator pattern?

Java Interview Questions and Answers (part 3)


(Continued from previous question...)

416.What is Service Locator pattern?

The Service Locator pattern locates J2EE (Java 2 Platform, Enterprise Edition) services for clients and thus abstracts the complexity of network operation and J2EE service lookup as EJB (Enterprise JavaBean) Home and JMS (Java Message Service) component factories. The Service Locator hides the lookup process's implementation details and complexity from clients. To improve application performance, Service Locator caches service objects to eliminate unnecessary JNDI (Java Naming and Directory Interface) activity that occurs in a lookup operation.

(Continued on next question...)

Other Interview Questions