Examples of BundleDelegatingClassLoader


Examples of org.apache.aries.blueprint.utils.BundleDelegatingClassLoader

      Class typeClass = metadata instanceof ExtendedServiceReferenceMetadata
                                ? ((ExtendedServiceReferenceMetadata) metadata).getRuntimeInterface() : null;
      if (typeName == null && typeClass == null) {
        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
          public ClassLoader run() {
            return new BundleDelegatingClassLoader(blueprintContainer.getBundleContext().getBundle(),
                AbstractServiceReferenceRecipe.class.getClassLoader());
          }     
        });
      }
     
View Full Code Here

Examples of org.apache.aries.blueprint.utils.BundleDelegatingClassLoader

        super(null, null, BlueprintBus.class.getClassLoader());
    }
   
    public void setBundleContext(BundleContext c) {
        context = c;
        super.setExtension(new BundleDelegatingClassLoader(c.getBundle(),
                                                           this.getClass().getClassLoader()),
                           ClassLoader.class);
    }
View Full Code Here

Examples of org.apache.aries.blueprint.utils.BundleDelegatingClassLoader

    public BlueprintBus() {
    }
   
    public void setBundleContext(BundleContext c) {
        context = c;
        super.setExtension(new BundleDelegatingClassLoader(c.getBundle(),
                                                           this.getClass().getClassLoader()),
                           ClassLoader.class);
    }
View Full Code Here

Examples of org.apache.aries.blueprint.utils.BundleDelegatingClassLoader

      String typeName = metadata.getInterface();
     
      if (typeName == null) {
        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
          public ClassLoader run() {
            return new BundleDelegatingClassLoader(blueprintContainer.getBundleContext().getBundle(),
                AbstractServiceReferenceRecipe.class.getClassLoader());
          }     
        });
      }
     
View Full Code Here

Examples of org.apache.aries.blueprint.utils.BundleDelegatingClassLoader

      String typeName = metadata.getInterface();
     
      if (typeName == null) {
        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
          public ClassLoader run() {
            return new BundleDelegatingClassLoader(blueprintContainer.getBundleContext().getBundle(),
                AbstractServiceReferenceRecipe.class.getClassLoader());
          }     
        });
      }
     
View Full Code Here

Examples of org.apache.aries.blueprint.utils.BundleDelegatingClassLoader

        super(null, null, BlueprintBus.class.getClassLoader());
    }
   
    public void setBundleContext(BundleContext c) {
        context = c;
        super.setExtension(new BundleDelegatingClassLoader(c.getBundle(),
                                                           this.getClass().getClassLoader()),
                           ClassLoader.class);
        super.setExtension(c, BundleContext.class);
    }
View Full Code Here

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

    protected void createCamelContext(final BundleContext bundleContext, final Map<String, String> props) {
        if (null != bundleContext) {
            context = new OsgiDefaultCamelContext(bundleContext, registry);
            // Setup the application context classloader with the bundle classloader
            context.setApplicationContextClassLoader(new BundleDelegatingClassLoader(bundleContext.getBundle()));
            // and make sure the TCCL is our classloader
            Thread.currentThread().setContextClassLoader(context.getApplicationContextClassLoader());
        } else {
            context = new DefaultCamelContext(registry);
        }
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(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
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.