Package org.datanucleus

Examples of org.datanucleus.JDOClassLoaderResolver


        catch(NucleusUserException e){}
    }

    public void testRequireBundle()
    {
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        NonManagedPluginRegistry mgr = new NonManagedPluginRegistry(clr, "EXCEPTION");
        assertEquals(0,mgr.getExtensionPoints().length);
        Bundle bundle3 = mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST3.MF",null));
        Bundle bundle4 = mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST4.MF",null));
        Bundle bundle5 = mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST5.MF",null));
        assertEquals(1,bundle3.getRequireBundle().size());
        assertEquals("org.datanucleus.plugin.test4",((Bundle.BundleDescription)bundle3.getRequireBundle().iterator().next()).getBundleSymbolicName());
        assertEquals(0,bundle4.getRequireBundle().size());
        assertEquals(2,bundle5.getRequireBundle().size());
        assertEquals("org.datanucleus.plugin.test6",((Bundle.BundleDescription)bundle5.getRequireBundle().get(0)).getBundleSymbolicName());
View Full Code Here


            public void close(){}
            public void clearFilters(){}
            public void addFilter(Filter arg0){}
       
        });
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        NonManagedPluginRegistry mgr = new NonManagedPluginRegistry(clr, "EXCEPTION");
        assertEquals(0,mgr.getExtensionPoints().length);
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST3.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST4.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST5.MF",null));
        mgr.resolveConstraints();
        try
        {
            assertEquals(2,messages.size());
            assertTrue(messages.contains("Bundle \"org.datanucleus.plugin.test5\" requires \"org.datanucleus.plugin.test6\" but it cannot be resolved."));
View Full Code Here

            public void close(){}
            public void clearFilters(){}
            public void addFilter(Filter arg0){}
       
        });
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        NonManagedPluginRegistry mgr = new NonManagedPluginRegistry(clr, "EXCEPTION");
        assertEquals(0,mgr.getExtensionPoints().length);
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST10.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST11.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST12.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST13.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST14.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST15.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST16.MF",null));
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST17.MF",null));
        mgr.resolveConstraints();
        try
        {
            assertEquals(3,messages.size());
            assertTrue(messages.contains("Bundle \"org.datanucleus.plugin.test12\" requires \"org.datanucleus.plugin.test11\" version \"(1.2.0.b2\" but the resolved bundle has version \"1.2.0.b2\" which is outside the expected range."));
View Full Code Here

     * Create a TypeManager for testing.
     */
    protected void setUp() throws Exception
    {
        ApiAdapter api = new JDOAdapter();
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        PluginManager pluginMgr = new PluginManager(new PersistenceConfiguration() {}, clr);
        pluginMgr.registerExtensionPoints();
        pluginMgr.registerExtensions();
        pluginMgr.resolveConstraints();
        typeMgr = new TypeManager(api, pluginMgr, clr);
View Full Code Here

TOP

Related Classes of org.datanucleus.JDOClassLoaderResolver

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.