Package javax.naming

Examples of javax.naming.Context.composeName()


        // error
        name = ProviderConstants.ROOT_ZONE_NAME_OBJ;
        prefix = new CompositeName("schema33:/domain.com");
        try {
            result = ctx.composeName(name, prefix);
            fail("NamingException should be thrown");
        } catch (NamingException e) {}

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
View Full Code Here


            result = ctx.composeName(name, prefix);
            fail("NamingException should be thrown");
        } catch (NamingException e) {}

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
        assertEquals("/host1.example.com/file1.html", resultStr);
        resultStr = ctx.composeName("host1", "example.com");
        assertEquals("host1.example.com", resultStr);
        resultStr = ctx.composeName("host1/mamba", "example.com");
        assertEquals("host1.example.com/mamba", resultStr);
View Full Code Here

        } catch (NamingException e) {}

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
        assertEquals("/host1.example.com/file1.html", resultStr);
        resultStr = ctx.composeName("host1", "example.com");
        assertEquals("host1.example.com", resultStr);
        resultStr = ctx.composeName("host1/mamba", "example.com");
        assertEquals("host1.example.com/mamba", resultStr);
        resultStr = ctx.composeName("host1.subdomain", "schema17:/example.com");
        assertEquals("schema17:/host1.subdomain.example.com", resultStr);
View Full Code Here

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
        assertEquals("/host1.example.com/file1.html", resultStr);
        resultStr = ctx.composeName("host1", "example.com");
        assertEquals("host1.example.com", resultStr);
        resultStr = ctx.composeName("host1/mamba", "example.com");
        assertEquals("host1.example.com/mamba", resultStr);
        resultStr = ctx.composeName("host1.subdomain", "schema17:/example.com");
        assertEquals("schema17:/host1.subdomain.example.com", resultStr);
        // error
        try {
View Full Code Here

        assertEquals("/host1.example.com/file1.html", resultStr);
        resultStr = ctx.composeName("host1", "example.com");
        assertEquals("host1.example.com", resultStr);
        resultStr = ctx.composeName("host1/mamba", "example.com");
        assertEquals("host1.example.com/mamba", resultStr);
        resultStr = ctx.composeName("host1.subdomain", "schema17:/example.com");
        assertEquals("schema17:/host1.subdomain.example.com", resultStr);
        // error
        try {
            ctx.composeName(".", "schema17:/example.com");
            fail("NamingException should be thrown");
View Full Code Here

        assertEquals("host1.example.com/mamba", resultStr);
        resultStr = ctx.composeName("host1.subdomain", "schema17:/example.com");
        assertEquals("schema17:/host1.subdomain.example.com", resultStr);
        // error
        try {
            ctx.composeName(".", "schema17:/example.com");
            fail("NamingException should be thrown");
        } catch (NamingException e) {}
    }

    public void testConstructor() throws NoSuchFieldException,
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.