Examples of registerBundle()


Examples of org.apache.sling.jcr.base.internal.loader.Loader.registerBundle()

        Loader theLoader = this.loader;
        if (theLoader != null) {
            switch (event.getType()) {
                case BundleEvent.INSTALLED:
                    // register types when the bundle gets installed
                    theLoader.registerBundle(event.getBundle());
                    break;

                case BundleEvent.UNINSTALLED:
                    theLoader.unregisterBundle(event.getBundle());
                    break;
View Full Code Here

Examples of org.apache.sling.jcr.base.internal.loader.Loader.registerBundle()

        Loader theLoader = this.loader;
        if (theLoader != null) {
            switch (event.getType()) {
                case BundleEvent.INSTALLED:
                    // register types when the bundle gets installed
                    theLoader.registerBundle(event.getBundle());
                    break;

                case BundleEvent.UNINSTALLED:
                    theLoader.unregisterBundle(event.getBundle());
                    break;
View Full Code Here

Examples of org.apache.sling.jcr.ocm.impl.classloader.MapperClassLoader.registerBundle()

                log.debug("registerMapperClient: Bundle {} has no mappings",
                    bundle.getSymbolicName());
                continue;
            }

            newMapperClassLoader.registerBundle(bundle);

            StringTokenizer tokener = new StringTokenizer(mapperHeader, ",");
            while (tokener.hasMoreTokens()) {
                String mapping = tokener.nextToken().trim();
                URL mappingURL = bundle.getResource(mapping);
View Full Code Here

Examples of org.apache.sling.jcr.ocm.impl.classloader.MapperClassLoader.registerBundle()

                log.debug("registerMapperClient: Bundle {} has no mappings",
                    bundle.getSymbolicName());
                continue;
            }

            newMapperClassLoader.registerBundle(bundle);

            StringTokenizer tokener = new StringTokenizer(mapperHeader, ",");
            while (tokener.hasMoreTokens()) {
                String mapping = tokener.nextToken().trim();
                URL mappingURL = bundle.getResource(mapping);
View Full Code Here

Examples of org.apache.sling.jcr.ocm.impl.classloader.MapperClassLoader.registerBundle()

                log.debug("registerMapperClient: Bundle {} has no mappings",
                    bundle.getSymbolicName());
                continue;
            }

            newMapperClassLoader.registerBundle(bundle);

            StringTokenizer tokener = new StringTokenizer(mapperHeader, ",");
            while (tokener.hasMoreTokens()) {
                String mapping = tokener.nextToken().trim();
                URL mappingURL = bundle.getResource(mapping);
View Full Code Here

Examples of org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle()

    {
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        NonManagedPluginRegistry mgr = new NonManagedPluginRegistry(clr, "EXCEPTION", true);
        assertEquals(0,mgr.getExtensionPoints().length);

        Bundle bundle0 = mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST0.MF",null));
        mgr.registerExtensionsForPlugin(clr.getResource("/org/datanucleus/samples/plugin/plugin1expoint.xml",null),bundle0);
        assertEquals(2,mgr.getExtensionPoints().length);
        assertNull(mgr.getExtensionPoint("testID"));
        assertNull(mgr.getExtensionPoint("testID2"));
        assertNotNull(mgr.getExtensionPoint("org.datanucleus.testID"));
View Full Code Here

Examples of org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle()

    public void testParseSymbolicName()
    {
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        NonManagedPluginRegistry mgr = new NonManagedPluginRegistry(clr, "EXCEPTION", true);

        Bundle bundle1 = mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST1.MF",null));
        mgr.registerExtensionsForPlugin(clr.getResource("/org/datanucleus/samples/plugin/plugin1expoint.xml",null),bundle1);
        assertEquals(2,mgr.getExtensionPoints().length);
        assertNull(mgr.getExtensionPoint("testID"));
        assertNull(mgr.getExtensionPoint("testID2"));
        assertNotNull(mgr.getExtensionPoint("org.datanucleus.plugin.test1.testID"));
View Full Code Here

Examples of org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle()

        assertNull(mgr.getExtensionPoint("testID"));
        assertNull(mgr.getExtensionPoint("testID2"));
        assertNotNull(mgr.getExtensionPoint("org.datanucleus.plugin.test1.testID"));
        assertNotNull(mgr.getExtensionPoint("org.datanucleus.plugin.test1.testID2"));

        Bundle bundle2 = mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST2.MF",null));
        mgr.registerExtensionsForPlugin(clr.getResource("/org/datanucleus/samples/plugin/plugin1expoint.xml",null),bundle2);
        assertEquals(4,mgr.getExtensionPoints().length);
        assertNotNull(mgr.getExtensionPoint("org.datanucleus.plugin.test2.testID"));
        assertNotNull(mgr.getExtensionPoint("org.datanucleus.plugin.test2.testID2"));
View Full Code Here

Examples of org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle()

     */
    public void testDuplicatedBundleSymbolicNameSameOrDifferentVersion()
    {
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        NonManagedPluginRegistry mgr = new NonManagedPluginRegistry(clr, "EXCEPTION", true);
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST1.MF",null));
        try
        {
            mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST1-1.MF",null));
          fail("Expected JPOXException");
        }
View Full Code Here

Examples of org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle()

        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        NonManagedPluginRegistry mgr = new NonManagedPluginRegistry(clr, "EXCEPTION", true);
        mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST1.MF",null));
        try
        {
            mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST1-1.MF",null));
          fail("Expected JPOXException");
        }
        catch(NucleusException ex)
        {
          //expected
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.