class ApplicationContextFactory {

    public ClassPathXmlApplicationContext getClassPathXmlApplicationContext(final String path) {
        ClassPathXmlApplicationContext applicationContext = applicationContexts.get(path);
        if (applicationContext == null) {
            applicationContext = new ClassPathXmlApplicationContext(path);
            applicationContexts.put(path, applicationContext);
        }
        return applicationContext;
    }

      ApplicationContextFactory();

}