Package org.impalaframework.spring.module

Examples of org.impalaframework.spring.module.SpringModuleLoader.beforeClose()


        Assert.notNull(moduleLoaderRegistry, ModuleLoaderRegistry.class.getName() + " cannot be null");       
        final ModuleLoader loader = moduleLoaderRegistry.getModuleLoader(ModuleRuntimeUtils.getModuleLoaderKey(moduleDefinition), false);
       
        if (loader instanceof SpringModuleLoader) {
            SpringModuleLoader springModuleLoader = (SpringModuleLoader) loader;
            springModuleLoader.beforeClose(applicationId, applicationContext, moduleDefinition);
        }
       
        if (applicationContext instanceof ConfigurableApplicationContext) {
            ConfigurableApplicationContext configurableContext = (ConfigurableApplicationContext) applicationContext;
            configurableContext.close();
View Full Code Here


        Assert.notNull(moduleLoaderRegistry, ModuleLoaderRegistry.class.getName() + " cannot be null");       
        final ModuleLoader loader = moduleLoaderRegistry.getModuleLoader(ModuleRuntimeUtils.getModuleLoaderKey(moduleDefinition), false);
       
        if (loader instanceof SpringModuleLoader) {
            SpringModuleLoader springModuleLoader = (SpringModuleLoader) loader;
            springModuleLoader.beforeClose(applicationId, applicationContext, moduleDefinition);
        }
       
        if (applicationContext instanceof ConfigurableApplicationContext) {
            ConfigurableApplicationContext configurableContext = (ConfigurableApplicationContext) applicationContext;
            configurableContext.close();
View Full Code Here

    public void testCloseContextWithSpringModuleLoader() throws Exception {
       
        SpringModuleLoader sm = (SpringModuleLoader) moduleLoader;
        moduleLoaderRegistry.addItem("spring-APPLICATION", moduleLoader);
       
        sm.beforeClose("id", applicationContext, definition);
        applicationContext.close();
       
        replay(applicationContext, moduleLoader);
        loader.closeContext("id", definition, applicationContext);
        verify(applicationContext, moduleLoader);
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.