Package org.mortbay.naming

Examples of org.mortbay.naming.NamingContext


            n = n.getSuffix(1);
            if(Log.isDebugEnabled())Log.debug("getSuffix(1)="+n);
            if(Log.isDebugEnabled())Log.debug("get(0)="+n.get(0));
            if(Log.isDebugEnabled())Log.debug("getPrefix(1)="+n.getPrefix(1));

            NamingContext ncontext = (NamingContext)sub0;

            Name nn = ncontext.toCanonicalName(ncontext.getNameParser("").parse("/yellow/blue/"));
            Log.debug(nn.toString());
            assertEquals (2, nn.size());

            nn = ncontext.toCanonicalName(ncontext.getNameParser("").parse("/yellow/blue"));
            Log.debug(nn.toString());
            assertEquals (2, nn.size());

            nn = ncontext.toCanonicalName(ncontext.getNameParser("").parse("/"));
            if(Log.isDebugEnabled())Log.debug("/ parses as: "+nn+" with size="+nn.size());
            Log.debug(nn.toString());
            assertEquals (1, nn.size());

            nn = ncontext.toCanonicalName(ncontext.getNameParser("").parse(""));
            Log.debug(nn.toString());
            assertEquals (0, nn.size());

            Context fee = ncontext.createSubcontext("fee");
            fee.bind ("fi", "88");
            assertEquals("88", initCtxA.lookup("java:/fee/fi"));
            assertEquals("88", initCtxA.lookup("java:/fee/fi/"));
            assertTrue (initCtxA.lookup("java:/fee/") instanceof javax.naming.Context);
View Full Code Here

TOP

Related Classes of org.mortbay.naming.NamingContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.