1 22 23 package org.jboss.spring.factory; 24 25 import org.springframework.beans.factory.BeanFactory; 26 import org.springframework.context.ApplicationContext; 27 import org.springframework.context.ConfigurableApplicationContext; 28 import org.springframework.core.io.Resource; 29 30 33 public class ApplicationContextLoaderImpl extends AbstractBeanFactoryLoader 34 { 35 36 protected BeanFactory createBeanFactory(String defaultName, Resource resource) 37 { 38 return new NamedXmlApplicationContext(defaultName, resource); 39 } 40 41 protected void doClose(BeanFactory beanFactory) 42 { 43 ((ConfigurableApplicationContext) beanFactory).close(); 44 } 45 46 protected Class getExactBeanFactoryClass() 47 { 48 return ApplicationContext.class; 49 } 50 51 } 52 | Popular Tags |