Package org.nuxeo.runtime.jtajca
Class InitialContextAccessor
- java.lang.Object
-
- javax.naming.InitialContext
-
- org.nuxeo.runtime.jtajca.InitialContextAccessor
-
- All Implemented Interfaces:
Context
public class InitialContextAccessor extends InitialContext
Utility class used for testing JNDI space provider.- Since:
- 5.5
- Author:
- Stephane Lacoin (aka matic)
-
-
Field Summary
Fields Modifier and Type Field Description static String
ENV_CTX_NAME
-
Fields inherited from class javax.naming.InitialContext
defaultInitCtx, gotDefault, myProps
-
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
InitialContextAccessor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Context
_getInitCtx()
static Context
getInitialContext()
Get access to the default initial context implementationstatic boolean
isAvailable()
Check for JNDI space availabilitystatic boolean
isWritable(Context ctx, String prefix)
Try writing in JNDI space-
Methods inherited from class javax.naming.InitialContext
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, doLookup, doLookup, getDefaultInitCtx, getEnvironment, getNameInNamespace, getNameParser, getNameParser, getURLOrDefaultInitCtx, getURLOrDefaultInitCtx, init, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
-
-
-
-
Field Detail
-
ENV_CTX_NAME
public static final String ENV_CTX_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InitialContextAccessor
protected InitialContextAccessor() throws NamingException
- Throws:
NamingException
-
-
Method Detail
-
_getInitCtx
protected Context _getInitCtx()
-
isAvailable
public static boolean isAvailable()
Check for JNDI space availability- Returns:
- true if JNDI space exists
-
isWritable
public static boolean isWritable(Context ctx, String prefix)
Try writing in JNDI space- Returns:
- true if JNDI space is writable
-
getInitialContext
public static Context getInitialContext()
Get access to the default initial context implementation- Returns:
- the initial context implementation
-
-