Exemplo n.º 1
0
  @SuppressWarnings("deprecation")
  public void setApplicationContext(ApplicationContext ctx) throws BeansException {
    applicationContext = ctx;
    configurer = new ConfigurerImpl(applicationContext);

    if (bus == null) {
      if (Version.getCurrentVersion().startsWith("2.3")) {
        // Don't relate on the DefaultBus
        BusFactory factory = new SpringBusFactory(ctx);
        bus = factory.createBus();
        BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(bus, ctx);
      } else {
        bus = BusWiringBeanFactoryPostProcessor.addDefaultBus(ctx);
      }
    }
  }
Exemplo n.º 2
0
 public void setApplicationContext(ApplicationContext ctx) throws BeansException {
   if (checkBlockConstruct) {
     setBlocking(ctx, this);
   }
   if (getBus() == null) {
     setBus(BusWiringBeanFactoryPostProcessor.addDefaultBus(ctx));
   }
 }
 public void setApplicationContext(ApplicationContext ctx) throws BeansException {
   if (bus == null) {
     setBus(BusWiringBeanFactoryPostProcessor.addDefaultBus(ctx));
   }
 }