Class WrappedSerialContext

  • All Implemented Interfaces:
    Context

    public class WrappedSerialContext
    extends InitialContext
    This is a Wrapper for SerialContext. This is used by SerialInitContextFactory when NamingManager is set up with an InitialContextFactoryBuilder. The reason for having this class is described below: When there is no builder setup, InitialContext uses a discovery mechanism to handle URL strings as described in NamingManager.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:
    [email protected]