Package org.eclipse.gemini.blueprint.extender.support

Examples of org.eclipse.gemini.blueprint.extender.support.ApplicationContextConfiguration


     * https://bugs.eclipse.org/bugs/show_bug.cgi?id=379384
     *
     * UPDATE: This issue still seems to occur with Blueprint 1.0.2.RELEASE. Since Dynamic Extensions de-emphasizes
     * the direct use of OSGi anyway, Blueprint configuration will definitely not be supported.
     */
    final ApplicationContextConfiguration config = new ApplicationContextConfiguration(bundle);
    String[] configurationLocations = null;
    if (config.isSpringPoweredBundle()) {
      configurationLocations = config.getConfigurationLocations();
    }
    if ((configurationLocations == null || configurationLocations.length == 0)
        && isAlfrescoDynamicExtension(bundle) == false) {
      return null;
    }
    if (isAlfrescoDynamicExtension(bundle)) {
      uninstallBundlesWithDuplicateSymbolicName(bundleContext);
    }
    final DynamicExtensionsApplicationContext applicationContext = new DynamicExtensionsApplicationContext(
        configurationLocations, getHostApplicationContext(bundleContext));
    applicationContext.setBundleContext(bundleContext);

    final DefaultContextClassLoaderProvider contextClassLoaderProvider = new DefaultContextClassLoaderProvider();
    contextClassLoaderProvider.setBeanClassLoader(ApplicationContext.class.getClassLoader());
    applicationContext.setContextClassLoaderProvider(contextClassLoaderProvider);

    applicationContext.setPublishContextAsService(config.isPublishContextAsService());

    return applicationContext;

  }
View Full Code Here

TOP

Related Classes of org.eclipse.gemini.blueprint.extender.support.ApplicationContextConfiguration

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.