public class NamingUtilites extends Object
Constructor | Description |
---|---|
NamingUtilites() |
Modifier and Type | Method | Description |
---|---|---|
static Context |
getDefaultInitialContext() |
get a default initial context
|
static Context |
getDefaultInitialContext(Hashtable<?,?> environment) |
get a default initial context
|
static String |
getStringValue(Context ctx,
String lookupName,
String defaultValue) |
Read a String value of any type of object
|
static Object |
lookup(Context ctx,
String lookupName) |
savely get object from naming context
|
public static final String getStringValue(Context ctx, String lookupName, String defaultValue)
ctx
- -
Context for lookuplookupName
- -
lookup namedefaultValue
- -
default valuepublic static Object lookup(Context ctx, String lookupName)
IllegalArgumentException
- -
if any argument is null, or the lookup name was emptypublic static final Context getDefaultInitialContext(Hashtable<?,?> environment) throws NamingException
IllegalStateException
- - if initial context was nullNamingException
public static final Context getDefaultInitialContext() throws NamingException
IllegalStateException
- - if initial context was nullNamingException
Copyright © 2002–2019 itracker. All rights reserved.