public class JndiObjectLocator extends Object
Modifier and Type | Method and Description |
---|---|
static JndiObjectLocator |
getInstance()
Gets the singleton instance.
|
Object |
lookup(String name)
Gets the JNDI object bound as
name if it exists. |
public Object lookup(String name) throws NamingException
name
if it exists.name
- the name to lookupnull
if no object is bound with the
given name
or if the initial context for the lookup
could not be created (indicating that we're not running in a container)NamingException
public static JndiObjectLocator getInstance() throws NamingException
NamingException
- if an unrecoverable JNDI error occurs in
creating the singleton instanceCopyright © 2014–2015. All rights reserved.