Package org.impalaframework.spring.module

Examples of org.impalaframework.spring.module.ModuleDefinitionPostProcessor


    protected void addBeanPostProcessors(Application application, ModuleDefinition definition, ConfigurableListableBeanFactory beanFactory) {
       
        ServiceRegistry serviceRegistry = application.getServiceRegistry();
       
        beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry, serviceProxyFactoryCreator));
        beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(definition));
        beanFactory.addBeanPostProcessor(new ApplicationAwarePostProcessor(application));
    }
View Full Code Here


    }
  }
 
  protected void addBeanPostProcessors(ModuleDefinition definition, ConfigurableListableBeanFactory beanFactory) {
    beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry));
    beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(definition));
  }
View Full Code Here

    protected void addBeanPostProcessors(Application application, ModuleDefinition definition, ConfigurableListableBeanFactory beanFactory) {
       
        ServiceRegistry serviceRegistry = application.getServiceRegistry();
       
        beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry, serviceProxyFactoryCreator));
        beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(definition));
    }
View Full Code Here

            @Override
            protected void registerBeanPostProcessors(ConfigurableListableBeanFactory beanFactory) {
                //need to add these here because don't get the chance after startRefresh() has been called
                beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry, serviceProxyFactoryCreator));
                beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(moduleDefinition));
                super.registerBeanPostProcessors(beanFactory);
            }
        };
        return applicationContext;
    }  
View Full Code Here

    public DefaultApplicationContextLoader() {
    }
   
    protected void addBeanPostProcessors(ModuleDefinition definition, ConfigurableListableBeanFactory beanFactory) {
        beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry, serviceProxyFactoryCreator));
        beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(definition));
    }
View Full Code Here

                new String[] { "childcontainer/child-context.xml" }, parentContext){
             @Override
                protected DefaultListableBeanFactory createBeanFactory() {
                    DefaultListableBeanFactory beanFactory = super.createBeanFactory();
                    beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry, null));
                    beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(new SimpleModuleDefinition("module1")));
                    return beanFactory;
                }
        };

        // bingo, child.childMethod does nto throw NoServiceException
View Full Code Here

      final Resource[] resources = moduleLoader.getSpringConfigResources(definition, classLoader);

      ConfigurableApplicationContext context = moduleLoader.newApplicationContext(parent, definition, classLoader);
      ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
      beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry));
      beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(definition));
     
      BeanDefinitionReader reader = moduleLoader.newBeanDefinitionReader(context, definition);

      if (reader instanceof AbstractBeanDefinitionReader) {
        ((AbstractBeanDefinitionReader) reader).setBeanClassLoader(classLoader);
View Full Code Here

public class ModuleDefinitionPostProcessorTest extends TestCase {

    public final void testPostProcessBeforeInitialization() {
        SimpleRootModuleDefinition rootDefinition = new SimpleRootModuleDefinition("project1", "context.xml");
        ModuleDefinitionPostProcessor postProcessor = new ModuleDefinitionPostProcessor(rootDefinition);
        TestSpecAware testAware = new TestSpecAware();
        postProcessor.postProcessBeforeInitialization(testAware, null);
        assertSame(rootDefinition, testAware.getModuleDefinition());
       
        assertSame(testAware, postProcessor.postProcessAfterInitialization(testAware, null));
    }
View Full Code Here

      @Override
      protected void registerBeanPostProcessors(ConfigurableListableBeanFactory beanFactory) {
        //need to add these here because don't get the chance after startRefresh() has been called
        beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry));
        beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(moduleDefinition));
        super.registerBeanPostProcessors(beanFactory);
      }
    };
    return applicationContext;
  }
View Full Code Here

            @Override
            protected void registerBeanPostProcessors(ConfigurableListableBeanFactory beanFactory) {
                //need to add these here because don't get the chance after startRefresh() has been called
                beanFactory.addBeanPostProcessor(new ServiceRegistryPostProcessor(serviceRegistry, serviceProxyFactoryCreator));
                beanFactory.addBeanPostProcessor(new ModuleDefinitionPostProcessor(moduleDefinition));
                super.registerBeanPostProcessors(beanFactory);
            }
        };
        return applicationContext;
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.spring.module.ModuleDefinitionPostProcessor

Copyright © 2018 www.massapicom. 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.