org.unitils.spring.util
Interface ApplicationContextFactory

All Known Implementing Classes:
ClassPathXmlApplicationContextFactory

public interface ApplicationContextFactory

Factory for creating Spring ApplicationContexts.

Author:
Tim Ducheyne, Filip Neven

Method Summary
 org.springframework.context.ConfigurableApplicationContext createApplicationContext(List<String> locations)
          Create an ApplicationContext, in which the complete list of the given resources is loaded.
 

Method Detail

createApplicationContext

org.springframework.context.ConfigurableApplicationContext createApplicationContext(List<String> locations)
Create an ApplicationContext, in which the complete list of the given resources is loaded. The way in which these locations are interpreted depends on the concrete implementation of the interface. More in particular, the returned instance is an instance of ConfigurableApplicationContext, that is not yet refreshed, i.e. the method ConfigurableApplicationContext.refresh() has neither been called explicitly, nor implicitly by invoking a constructor that also makes sure the configuration is processed by calling the refresh method.

Parameters:
locations - The configuration file locations, not null
Returns:
A ConfigurableApplicationContext, on which the refresh() method hasn't been called yet


Copyright © 2011. All Rights Reserved.