deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.framework.jndi
Class JndiUtils

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

public final class JndiUtils
extends java.lang.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 javax.naming.NamingEnumeration<?> getNamingList(java.lang.String rootNode)
          Returns a list of naming entries for the given root node.
static java.lang.Object lookup(java.lang.String name, java.lang.Class<?> classForNarrow)
          Lookup using no caching functionality.
static java.lang.Object lookupEnv(java.lang.String name, java.lang.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 java.lang.Object lookup(java.lang.String name,
                                      java.lang.Class<?> classForNarrow)
                               throws javax.naming.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:
javax.naming.NamingException

lookupEnv

public static java.lang.Object lookupEnv(java.lang.String name,
                                         java.lang.Class<?> classForNarrow)
                                  throws javax.naming.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:
javax.naming.NamingException - if the given lookup name is not in the JNDI tree

getNamingList

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

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

deegree 2.5 (2011/06/29 09:44 build-8-official)

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