public class JNDIUtil extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
logger |
private static String[] |
PATHS |
static String |
PROPERTY_FILE |
Constructor and Description |
---|
JNDIUtil() |
Modifier and Type | Method and Description |
---|---|
private void |
doDump(int level,
StringBuilder text,
Context context,
String name) |
String |
dump()
Produces a debug string listing the JNDI contents of the current, default
Context.
|
String |
dump(Context context,
String name)
Produces a debug string listing the JNDI contents of the specified
Context.
|
static Properties |
getJNDIProperties(String prefix)
This method will return a jndi.properties object that is based on the
properties found in ejava-jndi.properties that start with the provided
prefix.
|
protected String |
getPad(int level) |
protected boolean |
isContext(String className) |
static <T> T |
lookup(Context ctx,
Class<T> type,
String name,
int waitSecs)
Performs a JNDI lookup and will wait supplied number of seconds before
giving up.
|
private static final org.slf4j.Logger logger
public static final String PROPERTY_FILE
private static final String[] PATHS
public static Properties getJNDIProperties(String prefix) throws IOException
prefix
- IOException
public static <T> T lookup(Context ctx, Class<T> type, String name, int waitSecs) throws NamingException
ctx
- type
- name
- waitSecs
- NamingException
public String dump() throws NamingException
NamingException
public String dump(Context context, String name)
context
- name
- private void doDump(int level, StringBuilder text, Context context, String name) throws NamingException
NamingException
protected boolean isContext(String className)
protected String getPad(int level)
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.