Package com.sun.enterprise.naming.impl
Class WrappedSerialContext
- java.lang.Object
-
- javax.naming.InitialContext
-
- com.sun.enterprise.naming.impl.WrappedSerialContext
-
- All Implemented Interfaces:
Context
public class WrappedSerialContext extends InitialContext
This is a Wrapper forSerialContext. This is used bySerialInitContextFactorywhen NamingManager is set up with an InitialContextFactoryBuilder. The reason for having this class is described below: When there is no builder setup,InitialContextuses a discovery mechanism to handle URL strings as described inNamingManager.getURLContext(String, java.util.Hashtable). But, when a builder is set up, it by-passes this logic and delegates to whatever Context is returned by builder.createInitialContextFactory(env).getInitialContext(env). In our case, this results in SerialContext, which does not know how to handle all kinds of URL strings. So, we want to returns a WrapperSerialContext that delegates to appropriate URLContext whenever possible.- Author:
- Sanjeeb.Sahoo@Sun.COM
-
-
Field Summary
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContextgetDefaultInitCtx()protected ContextgetURLOrDefaultInitCtx(String name)protected ContextgetURLOrDefaultInitCtx(Name name)protected voidinit(Hashtable environment)-
Methods inherited from class javax.naming.InitialContext
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, doLookup, doLookup, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
-
-
-
-
Method Detail
-
init
protected void init(Hashtable environment) throws NamingException
- Overrides:
initin classInitialContext- Throws:
NamingException
-
getDefaultInitCtx
protected Context getDefaultInitCtx() throws NamingException
- Overrides:
getDefaultInitCtxin classInitialContext- Throws:
NamingException
-
getURLOrDefaultInitCtx
protected Context getURLOrDefaultInitCtx(String name) throws NamingException
- Overrides:
getURLOrDefaultInitCtxin classInitialContext- Throws:
NamingException
-
getURLOrDefaultInitCtx
protected Context getURLOrDefaultInitCtx(Name name) throws NamingException
- Overrides:
getURLOrDefaultInitCtxin classInitialContext- Throws:
NamingException
-
-