james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r675915 - /james/server/trunk/avalon-spring-bridge-library/src/main/java/org/apache/james/container/spring/beanfactory/AvalonApplicationContext.java
Date Fri, 11 Jul 2008 10:48:15 GMT
Author: bago
Date: Fri Jul 11 03:48:15 2008
New Revision: 675915

URL: http://svn.apache.org/viewvc?rev=675915&view=rev
Log:
Rever AvalonApplicationContext committed by mistake in "Ant build fixes for the avalon-spring-bridge-library
module."

Modified:
    james/server/trunk/avalon-spring-bridge-library/src/main/java/org/apache/james/container/spring/beanfactory/AvalonApplicationContext.java

Modified: james/server/trunk/avalon-spring-bridge-library/src/main/java/org/apache/james/container/spring/beanfactory/AvalonApplicationContext.java
URL: http://svn.apache.org/viewvc/james/server/trunk/avalon-spring-bridge-library/src/main/java/org/apache/james/container/spring/beanfactory/AvalonApplicationContext.java?rev=675915&r1=675914&r2=675915&view=diff
==============================================================================
--- james/server/trunk/avalon-spring-bridge-library/src/main/java/org/apache/james/container/spring/beanfactory/AvalonApplicationContext.java
(original)
+++ james/server/trunk/avalon-spring-bridge-library/src/main/java/org/apache/james/container/spring/beanfactory/AvalonApplicationContext.java
Fri Jul 11 03:48:15 2008
@@ -21,16 +21,17 @@
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.AbstractRefreshableApplicationContext;
-import org.springframework.core.io.ClassPathResource;
+import org.springframework.context.ApplicationContext;
 import org.springframework.core.io.Resource;
+import org.springframework.core.io.ClassPathResource;
 
 import java.io.IOException;
 
 /**
  * loads an Avalon/Phoenix configuration.
  * this is done by using a two step approach:
+ * 
  * 1. loading the avalon mocking beans from a spring xml beans configuration
  * 2. loading the avalon application beans from the assembly.xml
  */
@@ -45,20 +46,18 @@
     /**
      * configuration-by-convention constructor, tries to find default config files on classpath
      */
-    public static AvalonApplicationContext newAvalonApplicationContext() {
-        return newAvalonApplicationContext(SPRING_BEANS_CONF, PHOENIX_ASSEMBLY_CONF);
+    public AvalonApplicationContext() {
+        this(SPRING_BEANS_CONF, PHOENIX_ASSEMBLY_CONF);
     }
     
-    public static AvalonApplicationContext newAvalonApplicationContext(String containerConf,
String applicationConf) {
-        return newAvalonApplicationContext(new ClassPathResource(containerConf), new ClassPathResource(applicationConf));
+    public AvalonApplicationContext(String containerConf, String applicationConf) {
+        this(new ClassPathResource(containerConf), new ClassPathResource(applicationConf));
     }
     
     
-    public static AvalonApplicationContext newAvalonApplicationContext(Resource containerConfigurationResource,
+    public AvalonApplicationContext(Resource containerConfigurationResource,
                                     Resource applicationConfigurationResource) {
-        AvalonApplicationContext result = new AvalonApplicationContext(null, containerConfigurationResource,
applicationConfigurationResource);
-        result.refresh();
-        return result;
+        this(null, containerConfigurationResource, applicationConfigurationResource);
     }
 
     public AvalonApplicationContext(ApplicationContext parent, 
@@ -67,6 +66,7 @@
         super(parent);
         this.containerConfigurationResource = containerConfigurationResource;
         this.applicationConfigurationResource = applicationConfigurationResource;
+        refresh();
     }
 
     protected void loadBeanDefinitions(DefaultListableBeanFactory defaultListableBeanFactory)
throws IOException, BeansException {



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message