deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.framework.jndi
Class JndiUtils

java.lang.Object
  extended by org.deegree.framework.jndi.JndiUtils

public final class JndiUtils
extends Object

Utility class for retrieving home interfaces and environment values.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Torsten Friebe, last edited by: $Author: mschneider $

Method Summary
static NamingEnumeration<?> getNamingList(String rootNode)
          Returns a list of naming entries for the given root node.
static Object lookup(String name, Class<?> classForNarrow)
          Lookup using no caching functionality.
static Object lookupEnv(String name, Class<?> classForNarrow)
          Lookup at Enterprise Java Beans environment value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookup

public static Object lookup(String name,
                            Class<?> classForNarrow)
                     throws NamingException
Lookup using no caching functionality.

Parameters:
name - the environment name
classForNarrow - the class to narrow
Returns:
if an entry exists, an instance of the given class with a value retrieved from the JNDI tree otherwise null.
Throws:
NamingException

lookupEnv

public static Object lookupEnv(String name,
                               Class<?> classForNarrow)
                        throws NamingException
Lookup at Enterprise Java Beans environment value. For home interfaces use EJBRemoteFactory instead.

Parameters:
name - the environment name
classForNarrow - the class to narrow
Returns:
if an entry exists, an instance of the given class with a value retrieved from the JNDI tree otherwise null.
Throws:
NamingException - if the given lookup name is not in the JNDI tree

getNamingList

public static NamingEnumeration<?> getNamingList(String rootNode)
                                          throws NamingException
Returns a list of naming entries for the given root node.

Parameters:
rootNode -
Returns:
list of naming entries
Throws:
NamingException - when the given root node doesn't exists

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org