Examples of BundleClassLoader


Examples of ch.entwine.weblounge.common.impl.util.classloader.BundleClassLoader

      // Start loading the site in a new thread in order to enable parallel
      // loading of sites
      Thread siteLoader = new Thread() {
        public void run() {
          final BundleClassLoader bundleClassLoader = new BundleClassLoader(bundleContext.getBundle());
          try {
            ContextClassLoaderUtils.doWithClassLoader(bundleClassLoader, new Callable<Void>() {
              public Void call() throws Exception {

                logger.info("Loading site from bundle '{}'", bundleName);
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.util.classloader.BundleClassLoader

    synchronized (jobs) {

      // Set up the job detail
      JobDataMap jobData = new JobDataMap();
      jobData.put(QuartzJobWorker.CLASS, jobClass);
      jobData.put(QuartzJobWorker.CLASS_LOADER, new BundleClassLoader(bundleContext.getBundle()));
      jobData.put(QuartzJobWorker.CONTEXT, job.getContext());
      job.getContext().put(Site.class.getName(), this);
      job.getContext().put(BundleContext.class.getName(), bundleContext);
      JobDetail jobDetail = new JobDetail(jobIdentifier, groupName, QuartzJobWorker.class);
      jobDetail.setJobDataMap(jobData);
View Full Code Here

Examples of net.sf.springofeclipse.internal.BundleClassLoader

          ImportConfiguration configuration = new ImportConfiguration();

          Bundle bundle = Platform.getBundle(extension
              .getNamespaceIdentifier());

          configuration.classLoader = new BundleClassLoader(bundle);

          String readerClassName = configurationElement
              .getAttribute("beanDefinitionReader");

          try {
View Full Code Here

Examples of org.apache.axis2.osgi.deployment.BundleClassLoader

                        service.getClass().getName(),
                        configCtx.getAxisConfiguration(),
                        createDefaultMessageReceivers(),
                        null,
                        null,
                        new BundleClassLoader(bundle, WSTracker.class.getClassLoader()));
                axisService.setName(wsName);
                configCtx.getAxisConfiguration().addService(axisService);
                log.info("Added new WS from ServiceReference : " + service.getClass().getName());
            } finally {
                lock.unlock();
View Full Code Here

Examples of org.apache.xbean.osgi.bundle.util.BundleClassLoader

    }

    public ClassLoader getClassLoaderFor(ObjectName objectName) throws InstanceNotFoundException {
        AbstractName abstractName = toAbstractName(objectName);
        try {
            return new BundleClassLoader(kernel.getBundleFor(abstractName));
        } catch (GBeanNotFoundException e) {
            throw (InstanceNotFoundException)new InstanceNotFoundException(objectName.getCanonicalName()).initCause(e);
        }
    }
View Full Code Here

Examples of org.apache.xbean.osgi.bundle.util.BundleClassLoader

    }

    public Object getObject(AbstractName objectName) {
        ClassLoader cl = null;
        try {
            cl = new BundleClassLoader(kernel.getBundleFor(objectName));
        } catch(GBeanNotFoundException e) {
            cl = KernelManagementHelper.class.getClassLoader();
        }
        return kernel.getProxyManager().createProxy(objectName, cl);
    }
View Full Code Here

Examples of org.apache.xbean.osgi.bundle.util.BundleClassLoader

            } else if (type.equals(ConfigurationModuleType.WAR)||type.equals(ConfigurationModuleType.WAB)) {
                result = config.findGBean(new AbstractNameQuery(WebModule.class.getName()));
            } else {
                return null;
            }
            ClassLoader classLoader = new BundleClassLoader(kernel.getBundleFor(result));
            return (J2EEDeployedObject) kernel.getProxyManager().createProxy(result, classLoader);
        } catch (GBeanNotFoundException e) {
            throw new IllegalStateException("Bad config ID: " + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.apache.xbean.osgi.bundle.util.BundleClassLoader

        FactoryRegistry.setFactory(EndpointLifecycleManagerFactory.class, new GeronimoEndpointLifecycleManagerFactory());

        configureAddressing();

        this.service.addParameter(new Parameter(org.apache.axis2.jaxws.spi.Constants.CACHE_CLASSLOADER, new BundleClassLoader(bundle)));
    }
View Full Code Here

Examples of org.apache.xbean.osgi.bundle.util.BundleClassLoader

        addGBeanToConfiguration(configuration, gbean, start);
    }

    private void addGBeanToConfiguration(Configuration configuration, GBeanData gbean, boolean start) throws InvalidConfigException {
        ClassLoader configurationClassLoader = new BundleClassLoader(configuration.getBundle());
        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(configurationClassLoader);

            log.trace("Registering GBean " + gbean.getAbstractName());
View Full Code Here

Examples of org.apache.xbean.osgi.bundle.util.BundleClassLoader

        // ( a TCCL that is consistent with what is set when the same
        // classes are loaded when the configuration is started.
        Thread thread = Thread.currentThread();
        ClassLoader oldCl = thread.getContextClassLoader();
        //TODO OSGI fixme
        thread.setContextClassLoader(new BundleClassLoader(context.getConfiguration().getBundle()));
        try {
            try {
                configurationDatas.add(context.getConfigurationData());
            } catch (DeploymentException e) {
                Configuration configuration = context.getConfiguration();
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.