Examples of DelegatedExecutionOsgiBundleApplicationContext


Examples of org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext

  /**
   * Completes the second part of the refresh process by calling {@link DelegatedExecutionOsgiBundleApplicationContext#completeRefresh()}
   */
  public void handleRefresh(ConfigurableApplicationContext context) {
    DelegatedExecutionOsgiBundleApplicationContext dc = ObjectUtils.cast(context, DelegatedExecutionOsgiBundleApplicationContext.class);
    dc.completeRefresh();
  }
View Full Code Here

Examples of org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext

    if (debug)
      log.debug("Scanning bundle " + bundleString + " for configurations...");

    // initialize context
    final DelegatedExecutionOsgiBundleApplicationContext localApplicationContext;

    if (debug)
      log.debug("Creating an application context for bundle " + bundleString);

    try {
      localApplicationContext = contextCreator.createApplicationContext(localBundleContext);
    }
    catch (Exception ex) {
      log.error("Cannot create application context for bundle " + bundleString, ex);
      return;
    }

    if (localApplicationContext == null) {
      log.debug("No application context created for bundle " + bundleString);
      return;
    }

    // create a dedicated hook for this application context
    BeanFactoryPostProcessor processingHook = new OsgiBeanFactoryPostProcessorAdapter(localBundleContext,
      postProcessors);

    // add in the post processors
    localApplicationContext.addBeanFactoryPostProcessor(processingHook);

    // add the context to the tracker
    managedContexts.put(bundleId, localApplicationContext);

    localApplicationContext.setDelegatedEventMulticaster(multicaster);

    // create refresh runnable
    Runnable contextRefresh = new Runnable() {

      public void run() {
        localApplicationContext.refresh();
      }
    };

    // executor used for creating the appCtx
    // chosen based on the sync/async configuration
View Full Code Here

Examples of org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext

    }

    log.info("Discovered configurations " + ObjectUtils.nullSafeToString(config.getConfigurationLocations())
        + " in bundle [" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "]");

    DelegatedExecutionOsgiBundleApplicationContext sdoac = new OsgiBundleXmlApplicationContext(
      config.getConfigurationLocations());
    sdoac.setBundleContext(bundleContext);
    sdoac.setPublishContextAsService(config.isPublishContextAsService());

    return sdoac;
  }
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.