org.springframework.jndi
Class JndiLocatorDelegate

java.lang.Object
  extended by org.springframework.jndi.JndiAccessor
      extended by org.springframework.jndi.JndiLocatorSupport
          extended by org.springframework.jndi.JndiLocatorDelegate

public class JndiLocatorDelegate
extends JndiLocatorSupport

JndiLocatorSupport subclass with public lookup methods, for convenient use as a delegate.

Since:
3.0.1
Author:
Juergen Hoeller

Field Summary
 
Fields inherited from class org.springframework.jndi.JndiLocatorSupport
CONTAINER_PREFIX
 
Fields inherited from class org.springframework.jndi.JndiAccessor
logger
 
Constructor Summary
JndiLocatorDelegate()
           
 
Method Summary
 Object lookup(String jndiName)
          Perform an actual JNDI lookup for the given name via the JndiTemplate.
<T> T
lookup(String jndiName, Class<T> requiredType)
          Perform an actual JNDI lookup for the given name via the JndiTemplate.
 
Methods inherited from class org.springframework.jndi.JndiLocatorSupport
convertJndiName, isResourceRef, setResourceRef
 
Methods inherited from class org.springframework.jndi.JndiAccessor
getJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiLocatorDelegate

public JndiLocatorDelegate()
Method Detail

lookup

public Object lookup(String jndiName)
              throws NamingException
Description copied from class: JndiLocatorSupport
Perform an actual JNDI lookup for the given name via the JndiTemplate.

If the name doesn't begin with "java:comp/env/", this prefix is added if "resourceRef" is set to "true".

Overrides:
lookup in class JndiLocatorSupport
Parameters:
jndiName - the JNDI name to look up
Returns:
the obtained object
Throws:
NamingException - if the JNDI lookup failed
See Also:
JndiLocatorSupport.setResourceRef(boolean)

lookup

public <T> T lookup(String jndiName,
                    Class<T> requiredType)
         throws NamingException
Description copied from class: JndiLocatorSupport
Perform an actual JNDI lookup for the given name via the JndiTemplate.

If the name doesn't begin with "java:comp/env/", this prefix is added if "resourceRef" is set to "true".

Overrides:
lookup in class JndiLocatorSupport
Parameters:
jndiName - the JNDI name to look up
requiredType - the required type of the object
Returns:
the obtained object
Throws:
NamingException - if the JNDI lookup failed
See Also:
JndiLocatorSupport.setResourceRef(boolean)