Package javax.naming

Examples of javax.naming.InitialContext.destroySubcontext()


    public void tearDown ()
    throws Exception
    {
        InitialContext ic = new InitialContext();
        ic.destroySubcontext("a");
    }
   
   
    public void testLocal ()
    throws Exception
View Full Code Here


        Context c = (Context)ic.lookup("a/b/c");
        o = c.lookup("d");
        assertNotNull(o);
        assertEquals("333", (String)o);       
        assertEquals("333", ic.lookup(name));
        ic.destroySubcontext("a");
       
        name = parser.parse("");
        name.add("x");
        Name suffix = parser.parse("y/z");
        name.addAll(suffix);
View Full Code Here

        name.add("x");
        Name suffix = parser.parse("y/z");
        name.addAll(suffix);
        NamingUtil.bind(ic, name.toString(), "555");       
        assertEquals("555", ic.lookup(name));
        ic.destroySubcontext("x");
    }

}
View Full Code Here

        assertNotNull(o);
        Session fooSession = (Session)o;
        assertEquals(props, fooSession.getProperties());
        assertTrue(fooSession.getDebug());
       
        icontext.destroySubcontext("mail");
        icontext.destroySubcontext("foo");
    }
}
View Full Code Here

        Session fooSession = (Session)o;
        assertEquals(props, fooSession.getProperties());
        assertTrue(fooSession.getDebug());
       
        icontext.destroySubcontext("mail");
        icontext.destroySubcontext("foo");
    }
}
View Full Code Here

        assertEquals("7", ic.lookup("java:comp/env/zzz/e"));//webapp does NOT override web.xml
        config.bindEnvEntry("zzz/f", "7");
        assertEquals("500", ic.lookup("java:comp/env/zzz/f"));//server overrides web.xml
       
        ((Context)ic.lookup("java:comp")).destroySubcontext("env");
        ic.destroySubcontext("xxx");
        ic.destroySubcontext("yyy");
        ic.destroySubcontext("zzz");
    }
}
View Full Code Here

        config.bindEnvEntry("zzz/f", "7");
        assertEquals("500", ic.lookup("java:comp/env/zzz/f"));//server overrides web.xml
       
        ((Context)ic.lookup("java:comp")).destroySubcontext("env");
        ic.destroySubcontext("xxx");
        ic.destroySubcontext("yyy");
        ic.destroySubcontext("zzz");
    }
}
View Full Code Here

        assertEquals("500", ic.lookup("java:comp/env/zzz/f"));//server overrides web.xml
       
        ((Context)ic.lookup("java:comp")).destroySubcontext("env");
        ic.destroySubcontext("xxx");
        ic.destroySubcontext("yyy");
        ic.destroySubcontext("zzz");
    }
}
View Full Code Here

            assertEquals("7", ic.lookup("java:comp/env/zzz/e"));//webapp does NOT override web.xml
            plusProcessor.bindEnvEntry("zzz/f", "7");
            assertEquals("500", ic.lookup("java:comp/env/zzz/f"));//server overrides web.xml

            ((Context)ic.lookup("java:comp")).destroySubcontext("env");
            ic.destroySubcontext("xxx");
            ic.destroySubcontext("yyy");
            ic.destroySubcontext("zzz");
        }
        finally
        {
View Full Code Here

            plusProcessor.bindEnvEntry("zzz/f", "7");
            assertEquals("500", ic.lookup("java:comp/env/zzz/f"));//server overrides web.xml

            ((Context)ic.lookup("java:comp")).destroySubcontext("env");
            ic.destroySubcontext("xxx");
            ic.destroySubcontext("yyy");
            ic.destroySubcontext("zzz");
        }
        finally
        {
            Thread.currentThread().setContextClassLoader(old_loader);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.