Examples of BundleDelegatingClassLoader


Examples of org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader

    @Override
    protected void findRouteBuildersByPackageScan(String[] packages, PackageScanFilter filter, List<RoutesBuilder> builders) throws Exception {
        // add filter to class resolver which then will filter
        getContext().getPackageScanClassResolver().addFilter(filter);
        ClassLoader classLoader = new BundleDelegatingClassLoader(bundleContext.getBundle());
        PackageScanRouteBuilderFinder finder = new PackageScanRouteBuilderFinder(getContext(), packages, classLoader,
                                                                                 getContext().getPackageScanClassResolver());
        finder.appendBuilders(builders);

        // and remove the filter
View Full Code Here

Examples of org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader

    @Override
    public void afterPropertiesSet() throws Exception {
        super.afterPropertiesSet();
        // setup the application context classloader with the bundle delegating classloader
        ClassLoader cl = new BundleDelegatingClassLoader(bundleContext.getBundle());
        LOG.debug("Set the application context classloader to: {}", cl);
        getContext().setApplicationContextClassLoader(cl);
        getContext().getManagementStrategy().addEventNotifier(new OsgiCamelContextPublisher(bundleContext));
        try {
            getClass().getClassLoader().loadClass("org.osgi.service.event.EventAdmin");
View Full Code Here

Examples of org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader

        // and these are blueprint specific
        setComponentResolver(new BlueprintComponentResolver(bundleContext));
        setLanguageResolver(new BlueprintLanguageResolver(bundleContext));
        setDataFormatResolver(new BlueprintDataFormatResolver(bundleContext));
        setApplicationContextClassLoader(new BundleDelegatingClassLoader(bundleContext.getBundle()));
    }
View Full Code Here

Examples of org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader

        // and these are blueprint specific
        setComponentResolver(new BlueprintComponentResolver(bundleContext));
        setLanguageResolver(new BlueprintLanguageResolver(bundleContext));
        setDataFormatResolver(new BlueprintDataFormatResolver(bundleContext));
        setApplicationContextClassLoader(new BundleDelegatingClassLoader(bundleContext.getBundle()));
    }
View Full Code Here

Examples of org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader

    @Override
    protected void findRouteBuildersByPackageScan(String[] packages, PackageScanFilter filter, List<RoutesBuilder> builders) throws Exception {
        // add filter to class resolver which then will filter
        getContext().getPackageScanClassResolver().addFilter(filter);
        ClassLoader classLoader = new BundleDelegatingClassLoader(((ExtendedBlueprintContainer) blueprintContainer).getBundleContext().getBundle());
        PackageScanRouteBuilderFinder finder = new PackageScanRouteBuilderFinder(getContext(), packages, classLoader,
                                                                                 getContext().getPackageScanClassResolver());
        finder.appendBuilders(builders);

        // and remove the filter
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.utils.BundleDelegatingClassLoader

                parents[i] = sharedLibs[i].getClassLoader();
            }
        } else {
            parents = new ClassLoader[2];
        }
        parents[parents.length - 2] = new BundleDelegatingClassLoader(bundle, getClass().getClassLoader());
        parents[parents.length - 1] = new BundleDelegatingClassLoader(getBundleContext().getBundle(0));

        // Create urls
        List<URL> urls = new ArrayList<URL>();
        for (int i = 0; i < classPathNames.length; i++) {
            File f = new File(installRoot, classPathNames[i]);
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.utils.BundleDelegatingClassLoader

    }

    protected ClassLoader createClassLoader() {
        SharedLibraryDesc library = descriptor.getSharedLibrary();
        // Make the current ClassLoader the parent
        ClassLoader parent = new BundleDelegatingClassLoader(bundle, getClass().getClassLoader());
        boolean parentFirst = library.isParentFirstClassLoaderDelegation();
        ClassPath cp = library.getSharedLibraryClassPath();
        String[] classPathNames = cp.getPathElements();
        List<URL> urls = new ArrayList<URL>();
        for (String classPathName : classPathNames) {
View Full Code Here

Examples of org.springframework.osgi.util.BundleDelegatingClassLoader

      logger.info("Captured root module definition " + rootModuleDefinition);
    }
  }

  Object clone(Object o) {
    final BundleDelegatingClassLoader classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundleContext.getBundle());
    final SerializationStreamFactory streamFactory = newStreamFactory(classLoader);
    SerializationHelper helper = new SerializationHelper(streamFactory);
    final Object clone = helper.clone((Serializable) o);
    return clone;
  }
View Full Code Here

Examples of org.springframework.osgi.util.BundleDelegatingClassLoader

            logger.info("Captured root module definition " + rootModuleDefinition);
        }
    }

    Object clone(Object o) {
        final BundleDelegatingClassLoader classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundleContext.getBundle());
        final SerializationStreamFactory streamFactory = newStreamFactory(classLoader);
        SerializationHelper helper = new SerializationHelper(streamFactory);
        final Object clone = helper.clone((Serializable) o);
        return clone;
    }
View Full Code Here

Examples of org.springframework.osgi.util.BundleDelegatingClassLoader

      logger.info("Captured root module definition " + rootModuleDefinition);
    }
  }

  Object clone(Object o) {
    final BundleDelegatingClassLoader classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundleContext.getBundle());
    final SerializationStreamFactory streamFactory = newStreamFactory(classLoader);
    SerializationHelper helper = new SerializationHelper(streamFactory);
    final Object clone = helper.clone((Serializable) o);
    return clone;
  }
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.