Service Locator

Context

Service lookup and creation involves complex interfaces and network operations.

Problem

J2EE clients interact with service components, such as EJB and JMS components, which provide business services and persistence capabilities. To interact with these components, clients must either locate the service component (referred to as a lookup operation) or create a new component. For instance, an EJB client must locate the enterprise bean's home object, which the client then uses either to find an object or to create or remove one or more enterprise beans. Similarly, a JMS client must first locate the JMS Connection Factory to obtain a JMS Connection or a JMS Session.

All J2EE application clients use the JNDI common facility ...

Get Core J2EE™ Patterns: Best Practices and Design Strategies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.