portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r450103 - /portals/jetspeed-2/trunk/components/cm/src/java/org/apache/jetspeed/components/SpringComponentManager.java
Date Tue, 26 Sep 2006 16:14:20 GMT
Author: taylor
Date: Tue Sep 26 09:14:17 2006
New Revision: 450103

URL: http://svn.apache.org/viewvc?view=rev&rev=450103
Log:
missed this check in for serializer dep

Modified:
    portals/jetspeed-2/trunk/components/cm/src/java/org/apache/jetspeed/components/SpringComponentManager.java

Modified: portals/jetspeed-2/trunk/components/cm/src/java/org/apache/jetspeed/components/SpringComponentManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/cm/src/java/org/apache/jetspeed/components/SpringComponentManager.java?view=diff&rev=450103&r1=450102&r2=450103
==============================================================================
--- portals/jetspeed-2/trunk/components/cm/src/java/org/apache/jetspeed/components/SpringComponentManager.java
(original)
+++ portals/jetspeed-2/trunk/components/cm/src/java/org/apache/jetspeed/components/SpringComponentManager.java
Tue Sep 26 09:14:17 2006
@@ -21,12 +21,15 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Properties;
 
 import javax.servlet.ServletContext;
 
 import org.apache.jetspeed.engine.JetspeedEngineConstants;
+import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
 import org.springframework.context.support.GenericApplicationContext;
 import org.springframework.web.context.WebApplicationContext;
 import org.springframework.web.context.support.XmlWebApplicationContext;
@@ -90,6 +93,34 @@
         this.preconfiguredBeans = preconfiguredBeans;
     }
 
+    
+    public SpringComponentManager(String[] bootConfigs, String[] appConfigs, String appRoot)
+    {        
+        File appRootDir = new File(appRoot);
+        PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
+        Properties p = new Properties();
+        //p.setProperty(APPLICATION_ROOT_KEY,appRootDir.getAbsolutePath());
+        ppc.setProperties(p);
+        
+        if (bootConfigs != null && bootConfigs.length > 0)
+        {
+            bootCtx = new FileSystemXmlApplicationContext(bootConfigs, false);
+            bootCtx.addBeanFactoryPostProcessor(ppc);
+            bootCtx.refresh();
+        }
+        else
+        {
+            bootCtx = new GenericApplicationContext();
+        }
+
+        appContext = new FileSystemXmlApplicationContext(appConfigs, false, bootCtx);
+        appContext.addBeanFactoryPostProcessor(ppc);
+        appContext.refresh();
+        factories = new ArrayList();
+        factories.add(appContext);
+        
+    }
+    
     /**
      * <p>
      * getComponent



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


Mime
View raw message