What are three reasons to use the Service Locator pattern?

You have a large number of stateless session beans, entities, and JMS components in your
system. What are three reasons to use the Service Locator pattern? (Choose three.)

You have a large number of stateless session beans, entities, and JMS components in your
system. What are three reasons to use the Service Locator pattern? (Choose three.)

A.
To provide a single point of control

B.
To improve performance by caching

C.
To receive asynchronous client requests and messages

D.
To reduce the number of business objects exposed to clients

E.
To simplify initial context creation, object lookup, and object recreation

Explanation:



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Ashishkumar

Ashishkumar

ABE

Use a Service Locator object to abstract all JNDI usage and to hide the complexities of initial context creation, EJB home object lookup, and EJB object re-creation. Multiple clients can reuse the Service Locator object to reduce code complexity, provide a single point of control, and improve performance by providing a caching facility.
Ref : http://www.oracle.com/technetwork/java/servicelocator-137181.html