Package org.springframework.osgi.context.support

Examples of org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.refresh()


        try {
            OsgiBundleXmlApplicationContext ctx =
                new OsgiBundleXmlApplicationContext(springIntentLocations.toArray(new String [] {}));
            ctx.setPublishContextAsService(false);
            ctx.setBundleContext(bundleContext);
            ctx.refresh();
            LOG.fine("application context: " + ctx);
            IntentMap im = (IntentMap)ctx.getBean("intentMap");
            LOG.fine("retrieved intent map: " + im);
            return im;
        } catch (Throwable t) {
View Full Code Here


            System.out.println("Loading Intent map from "+springIntentLocations);
            OsgiBundleXmlApplicationContext ctx = new OsgiBundleXmlApplicationContext(springIntentLocations
                .toArray(new String[] {}));
            ctx.setPublishContextAsService(false);
            ctx.setBundleContext(bundleContext);
            ctx.refresh();
            LOG.fine("application context: " + ctx);
            System.out.println("application context: " + ctx);
            IntentMap im = (IntentMap)ctx.getBean("intentMap");
            LOG.fine("retrieved intent map: " + im);
            System.out.println("retrieved intent map: " + im);
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

        try {
            OsgiBundleXmlApplicationContext ctx =
                new OsgiBundleXmlApplicationContext(springIntentLocations.toArray(new String [] {}));
            ctx.setPublishContextAsService(false);
            ctx.setBundleContext(bundleContext);
            ctx.refresh();
            LOG.fine("application context: " + ctx);
            IntentMap im = (IntentMap)ctx.getBean("intentMap");
            LOG.fine("retrieved intent map: " + im);
            return im;
        } catch (Throwable t) {
View Full Code Here

  private ConfigurableApplicationContext getNestedContext() throws Exception {
    OsgiBundleXmlApplicationContext ctx = new OsgiBundleXmlApplicationContext(
      new String[] { "org/springframework/osgi/iandt/nonosgicl/context.xml" });

    ctx.setBundleContext(bundleContext);
    ctx.refresh();
    return ctx;
  }
}
View Full Code Here

  public void testXmlOsgiContext() throws Exception {
    OsgiBundleXmlApplicationContext context = new OsgiBundleXmlApplicationContext(
      new String[] { "/org/springframework/osgi/iandt/context/no-op-context.xml" });
    context.setBundleContext(bundleContext);
    context.refresh();

    checkedPublishedOSGiService(2);
    context.close();
  }
View Full Code Here

    private ApplicationContext createSpringCxfContext() {
        OsgiBundleXmlApplicationContext ctx = new OsgiBundleXmlApplicationContext(CXF_CONFIG);
        ctx.setPublishContextAsService(false);
        ctx.setBundleContext(bundleContext);
        ctx.refresh();
        return ctx;
    }

    public void setBundleContext(BundleContext bundleContext) {
        this.bundleContext = bundleContext;
View Full Code Here

    private ApplicationContext createSpringCxfContext() {
        OsgiBundleXmlApplicationContext ctx = new OsgiBundleXmlApplicationContext(CXF_CONFIG);
        ctx.setPublishContextAsService(false);
        ctx.setBundleContext(bundleContext);
        ctx.refresh();
        return ctx;
    }

    public void setHttpService(HttpService httpService) {
        this.httpService = httpService;
View Full Code Here

  private ConfigurableOsgiBundleApplicationContext loadAppContext() {
    OsgiBundleXmlApplicationContext appContext = new OsgiBundleXmlApplicationContext(
        new String[] { "/org/springframework/osgi/iandt/importer/importer-ordering.xml" });
    appContext.setBundleContext(bundleContext);
    appContext.refresh();
    return appContext;
  }

  public void testComparableImportedObjects() throws Exception {
    assertNotNull(context);
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

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.