public class NamingEntryUtil
extends java.lang.Object
Constructor and Description |
---|
NamingEntryUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
bindToENC(java.lang.Object scope,
java.lang.String asName,
java.lang.String mappedName)
Link a name in a webapp's java:/comp/evn namespace to a pre-existing
resource.
|
static javax.naming.Context |
getContextForNamingEntries(java.lang.Object scope) |
static javax.naming.Context |
getContextForScope(java.lang.Object scope) |
static javax.naming.Name |
getNameForScope(java.lang.Object scope) |
static java.lang.Object |
lookup(java.lang.Object scope,
java.lang.String jndiName) |
static java.util.List<java.lang.Object> |
lookupNamingEntries(java.lang.Object scope,
java.lang.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(java.lang.Object scope,
java.lang.String jndiName)
Find a NamingEntry in the given scope.
|
static javax.naming.Name |
makeNamingEntryName(javax.naming.NameParser parser,
NamingEntry namingEntry) |
static javax.naming.Name |
makeNamingEntryName(javax.naming.NameParser parser,
java.lang.String jndiName) |
public static boolean bindToENC(java.lang.Object scope, java.lang.String asName, java.lang.String mappedName) throws javax.naming.NamingException
scope
- the scope of the lookupasName
- the name to bind asmappedName
- the name from the environment to link to asNamejavax.naming.NamingException
- if unable to bindpublic static NamingEntry lookupNamingEntry(java.lang.Object scope, java.lang.String jndiName) throws javax.naming.NamingException
scope
- the object scopejndiName
- the jndi namejavax.naming.NamingException
- if unable to lookup naming entrypublic static java.lang.Object lookup(java.lang.Object scope, java.lang.String jndiName) throws javax.naming.NamingException
javax.naming.NamingException
public static java.util.List<java.lang.Object> lookupNamingEntries(java.lang.Object scope, java.lang.Class<?> clazz) throws javax.naming.NamingException
scope
- the object scopeclazz
- the type of the entryjavax.naming.NamingException
- if unable to lookup the naming entriespublic static javax.naming.Name makeNamingEntryName(javax.naming.NameParser parser, NamingEntry namingEntry) throws javax.naming.NamingException
javax.naming.NamingException
public static javax.naming.Name makeNamingEntryName(javax.naming.NameParser parser, java.lang.String jndiName) throws javax.naming.NamingException
javax.naming.NamingException
public static javax.naming.Name getNameForScope(java.lang.Object scope)
public static javax.naming.Context getContextForScope(java.lang.Object scope) throws javax.naming.NamingException
javax.naming.NamingException
public static javax.naming.Context getContextForNamingEntries(java.lang.Object scope) throws javax.naming.NamingException
javax.naming.NamingException
Copyright © 1995–2023 Webtide. All rights reserved.