public class NamingEntryUtil extends Object
Constructor and Description |
---|
NamingEntryUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
bindToENC(Object scope,
String asName,
String mappedName)
Link a name in a webapp's java:/comp/evn namespace to a pre-existing
resource.
|
static Context |
getContextForNamingEntries(Object scope) |
static Context |
getContextForScope(Object scope) |
static Name |
getNameForScope(Object scope) |
static Object |
lookup(Object scope,
String jndiName) |
static List<Object> |
lookupNamingEntries(Object scope,
Class<?> clazz)
Get all NameEntries of a certain type in the given naming
environment scope (server-wide names or context-specific names)
|
static NamingEntry |
lookupNamingEntry(Object scope,
String jndiName)
Find a NamingEntry in the given scope.
|
static Name |
makeNamingEntryName(NameParser parser,
NamingEntry namingEntry) |
static Name |
makeNamingEntryName(NameParser parser,
String jndiName) |
public static boolean bindToENC(Object scope, String asName, String mappedName) throws NamingException
scope
- the scope of the lookupasName
- the name to bind asmappedName
- the name from the environment to link to asNameNamingException
public static NamingEntry lookupNamingEntry(Object scope, String jndiName) throws NamingException
scope
- jndiName
- NamingException
public static Object lookup(Object scope, String jndiName) throws NamingException
NamingException
public static List<Object> lookupNamingEntries(Object scope, Class<?> clazz) throws NamingException
scope
- clazz
- the type of the entryNamingException
public static Name makeNamingEntryName(NameParser parser, NamingEntry namingEntry) throws NamingException
NamingException
public static Name makeNamingEntryName(NameParser parser, String jndiName) throws NamingException
NamingException
public static Context getContextForScope(Object scope) throws NamingException
NamingException
public static Context getContextForNamingEntries(Object scope) throws NamingException
NamingException
Copyright © 1995-2015 Webtide. All Rights Reserved.