Package org.springframework.osgi.context

Examples of org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext.refresh()


      log.info("Detected extender custom configurations at " + ObjectUtils.nullSafeToString(configs));
      // create OSGi specific XML context
      ConfigurableOsgiBundleApplicationContext extenderAppCtx = new OsgiBundleXmlApplicationContext(configs);
      extenderAppCtx.setBundleContext(bundleContext);
      extenderAppCtx.refresh();

      synchronized (lock) {
        extenderConfiguration = extenderAppCtx;
        // initialize beans
        taskExecutor = extenderConfiguration.containsBean(TASK_EXECUTOR_NAME) ? (TaskExecutor) extenderConfiguration.getBean(
View Full Code Here


      log.info("Detected extender custom configurations at " + ObjectUtils.nullSafeToString(configs));
      // create OSGi specific XML context
      ConfigurableOsgiBundleApplicationContext context = new OsgiBundleXmlApplicationContext(configs);
      context.setBundleContext(bundleContext);
      context.refresh();

      synchronized (lock) {
        extenderConfiguration = context;
      }
View Full Code Here

      context = new EmptyOsgiApplicationContext();
    else
      context = new OsgiBundleXmlApplicationContext(locations);

    context.setBundleContext(bundleContext);
    context.refresh();
    return context;
  }

}
View Full Code Here

      log.info("Detected extender custom configurations at " + ObjectUtils.nullSafeToString(configs));
      // create OSGi specific XML context
      ConfigurableOsgiBundleApplicationContext extenderAppCtx = new OsgiBundleXmlApplicationContext(configs);
      extenderAppCtx.setBundleContext(bundleContext);
      extenderAppCtx.refresh();

      synchronized (lock) {
        extenderConfiguration = extenderAppCtx;
        // initialize beans
        taskExecutor = extenderConfiguration.containsBean(TASK_EXECUTOR_NAME) ? (TaskExecutor) extenderConfiguration.getBean(
View Full Code Here

        // Turn the stream into a Spring Security filter chain
        ConfigurableOsgiBundleApplicationContext springContext = null;
        springContext = new OsgiBundleXmlApplicationContext(new String[] { securityConfiguration.toExternalForm() });
        springContext.setBundleContext(bundle.getBundleContext());
        springContext.refresh();

        // Register the security filter chain
        Filter siteSecurityFilter = (Filter) springContext.getBean("springSecurityFilterChain");
        logger.info("Registering custom security filter for site '{}'", site.getIdentifier());
        siteFilters.put(site, siteSecurityFilter);
View Full Code Here

    // Create the spring security context
    URL securityConfig = bundleCtx.getBundle().getResource(SECURITY_CONFIG_FILE);
    ConfigurableOsgiBundleApplicationContext springContext = null;
    springContext = new OsgiBundleXmlApplicationContext(new String[] { securityConfig.toExternalForm() });
    springContext.setBundleContext(bundleCtx);
    springContext.refresh();

    // Get the security filter chain from the spring context
    Filter defaultSecurityFilter = (Filter) springContext.getBean("springSecurityFilterChain");
    securityFilter = new SecurityFilter(securityService, sites, defaultSecurityFilter);
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.