-
JNDIObjectLocator is used to centralize JNDI lookups. It minimizes the overhead of JNDI lookups by caching the objects it looks up.
Implements the ServiceLocator design pattern.
Major features are:
- thread-safe
- immutable
- serializable
- selectively disables the cache if objects are remote
Example:
locator = JNDIObjectLocator.builder().build();
MyEJB myEJB1 = locator.getObject(MyEJB.class);
MyEJB myEJB2 = locator.getObject("java:module/MyEJB");
Documentation & Sources