ClassPathXmlApplicationContext applicationContext = ChildApplicationContextFactory.this.new ChildApplicationContext( prop, this.compositeProperties);
@Override public void publishEvent(ApplicationEvent event) { Assert.notNull(event, "Event must not be null"); if (logger.isTraceEnabled()) { logger.trace("Publishing event in " + getDisplayName() + ": " + event); } ((ApplicationEventMulticaster) getBean(APPLICATION_EVENT_MULTICASTER_BEAN_NAME)).multicastEvent(event); if (!(getParent() == null || event instanceof ContextRefreshedEvent || event instanceof ContextClosedEvent)) { getParent().publishEvent(event); } } }
ClassPathXmlApplicationContext applicationContext = ChildApplicationContextFactory.this.new ChildApplicationContext( prop, this.compositeProperties);
/** * The Constructor. * * @param properties * the properties * @param compositeProperties * the composite properties * @throws BeansException * the beans exception */ private ChildApplicationContext(Properties properties, Map<String, Map<String, CompositeDataBean>> compositeProperties) throws BeansException { super(getContextResourcePatterns(), false, ChildApplicationContextFactory.this.getParent()); this.compositeProperties = compositeProperties; // Add a property placeholder configurer, with the subsystem-scoped default properties PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer(); configurer.setPropertiesArray(new Properties[] {ChildApplicationContextFactory.this.getPropertyDefaults(), properties}); configurer.setIgnoreUnresolvablePlaceholders(true); configurer.setSearchSystemEnvironment(false); addBeanFactoryPostProcessor(configurer); setClassLoader(ChildApplicationContextFactory.this.getParent().getClassLoader()); }
/** * The Constructor. * * @param properties * the properties * @param compositeProperties * the composite properties * @throws BeansException * the beans exception */ private ChildApplicationContext(Properties properties, Map<String, Map<String, CompositeDataBean>> compositeProperties) throws BeansException { super(getContextResourcePatterns(), false, ChildApplicationContextFactory.this.getParent()); this.compositeProperties = compositeProperties; // Add a property placeholder configurer, with the subsystem-scoped default properties PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer(); configurer.setPropertiesArray(new Properties[] {ChildApplicationContextFactory.this.getPropertyDefaults(), properties}); configurer.setIgnoreUnresolvablePlaceholders(true); configurer.setSearchSystemEnvironment(false); addBeanFactoryPostProcessor(configurer); setClassLoader(ChildApplicationContextFactory.this.getParent().getClassLoader()); }
@Override public void publishEvent(ApplicationEvent event) { Assert.notNull(event, "Event must not be null"); if (logger.isTraceEnabled()) { logger.trace("Publishing event in " + getDisplayName() + ": " + event); } ((ApplicationEventMulticaster) getBean(APPLICATION_EVENT_MULTICASTER_BEAN_NAME)).multicastEvent(event); if (!(getParent() == null || event instanceof ContextRefreshedEvent || event instanceof ContextClosedEvent)) { getParent().publishEvent(event); } } }