Package org.rioproject.rmi

Examples of org.rioproject.rmi.ResolvingLoader


        }
    }

    @Test
    public void testCreation() {
        ResolvingLoader loader = new ResolvingLoader();
        assertNotNull(loader);
    }
View Full Code Here


        assertNotNull(loader);
    }

    @Test
    public void testGetClassLoader() throws MalformedURLException, ClassNotFoundException {
        ResolvingLoader loader = new ResolvingLoader();
        assertNotNull(loader);
        ClassLoader sysCL = ClassLoader.getSystemClassLoader();
        ClassLoader classLoader = loader.getClassLoader("artifact:com.sun.jini/reggie-dl/2.1.1;http://www.rio-project.org/maven2;http://repo1.maven.org/maven2/@central;http://10.0.1.9:52117@Provision Monitor ");
        assertNotNull(classLoader);
        assertTrue("Returned ClassLoader should not be the same as the system ClassLoader", !(classLoader.equals(sysCL)));
        Class c = classLoader.loadClass("com.sun.jini.reggie.ConstrainableAdminProxy");
        assertNotNull(c);
    }
View Full Code Here

        assertNotNull(c);
    }

    @Test
    public void testGetClassLoaderAndCheckURLsAreFileBased() throws MalformedURLException, ClassNotFoundException {
        ResolvingLoader loader = new ResolvingLoader();
        assertNotNull(loader);
        /*ClassLoader classLoader = loader.getClassLoader("artifact:com.sun.jini/reggie/jar/dl/2.1;http://www.rio-project.org/maven2");*/
        ClassLoader classLoader = loader.getClassLoader("artifact:com.sun.jini/reggie-dl/2.1.1;http://www.rio-project.org/maven2");
        assertNotNull(classLoader);
        assertTrue("Returned ClassLoader should be an instanceof URLClassLoader", classLoader instanceof URLClassLoader);
        for(URL u : ((URLClassLoader)classLoader).getURLs())
            assertTrue(u.getProtocol().equals("file"));
    }
View Full Code Here

    @Test
    public void testGetClassAnnotation() throws MalformedURLException, ClassNotFoundException {
        URL[] u = new URL[]{new URL("artifact:com.sun.jini/reggie-dl/2.1.1;http://www.rio-project.org/maven2")};
        URLClassLoader cl = new URLClassLoader(u);
        ResolvingLoader loader = new ResolvingLoader();
        Class<?> c = cl.loadClass("com.sun.jini.reggie.ConstrainableAdminProxy");
        String annotation = loader.getClassAnnotation(c);
        assertNotNull(annotation);
    }
View Full Code Here

TOP

Related Classes of org.rioproject.rmi.ResolvingLoader

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.