Class NamingEntryUtil
java.lang.Object
org.eclipse.jetty.plus.jndi.NamingEntryUtil
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic booleanLink a name in a webapp's java:/comp/env namespace to a pre-existing resource.static voiddestroyContextForScope(Object scope) static ContextgetContextForScope(Object scope) static NamegetNameForScope(Object scope) static Objectstatic <T> List<? extends T> lookupNamingEntries(Object scope, Class<T> clazz) Get all NameEntries of a certain type in the given naming scope.static NamingEntrylookupNamingEntry(Object scope, String jndiName) Find a NamingEntry in the given scope.static NamemakeNamingEntryName(NameParser parser, String jndiName) static NamemakeNamingEntryName(NameParser parser, NamingEntry namingEntry)  
- 
Constructor Details
- 
NamingEntryUtil
public NamingEntryUtil() 
 - 
 - 
Method Details
- 
bindToENC
public static boolean bindToENC(Object scope, String asName, String mappedName) throws NamingException Link a name in a webapp's java:/comp/env namespace to a pre-existing resource. The pre-existing resource can be either in the webapp's naming environment, or in the container's naming environment. Webapp's environment takes precedence over the server's namespace.- Parameters:
 scope- the scope of the lookupasName- the name to bind asmappedName- the name from the environment to link to asName- Returns:
 - true if bind success, false if not bound
 - Throws:
 NamingException- if unable to bind
 - 
lookupNamingEntry
Find a NamingEntry in the given scope.- Parameters:
 scope- the object scopejndiName- the jndi name- Returns:
 - the naming entry for the given scope
 - Throws:
 NamingException- if unable to lookup naming entry
 - 
lookup
- Throws:
 NamingException
 - 
lookupNamingEntries
public static <T> List<? extends T> lookupNamingEntries(Object scope, Class<T> clazz) throws NamingException Get all NameEntries of a certain type in the given naming scope.- Parameters:
 scope- the object scopeclazz- the type of the entry- Returns:
 - all NameEntries of a certain type in the given naming scope
 - Throws:
 NamingException- if unable to lookup the naming entries
 - 
makeNamingEntryName
public static Name makeNamingEntryName(NameParser parser, NamingEntry namingEntry) throws NamingException - Throws:
 NamingException
 - 
makeNamingEntryName
- Throws:
 NamingException
 - 
getNameForScope
 - 
getContextForScope
- Throws:
 NamingException
 - 
destroyContextForScope
- Throws:
 NamingException
 
 -