geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1052196 - in /geronimo/server/trunk/plugins/myfaces: geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/ geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/config/resource/osgi/api/
Date Thu, 23 Dec 2010 08:17:32 GMT
Author: xuhaihong
Date: Thu Dec 23 08:17:32 2010
New Revision: 1052196

URL: http://svn.apache.org/viewvc?rev=1052196&view=rev
Log:
GERONIMO-5713 Only add faces-config.xml in the dependent bundles

Modified:
    geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
    geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/config/resource/osgi/api/ConfigRegistry.java

Modified: geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java?rev=1052196&r1=1052195&r2=1052196&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
Thu Dec 23 08:17:32 2010
@@ -245,9 +245,7 @@ public class MyFacesModuleBuilderExtensi
         try {
             ref = bundle.getBundleContext().getServiceReference(ConfigRegistry.class.getName());
             ConfigRegistry configRegistry = (ConfigRegistry) bundle.getBundleContext().getService(ref);
-            for (URL url : configRegistry.getRegisteredConfigUrls()) {
-                classloaderFacesConfigs.add(parseConfigFile(url, url.toExternalForm()));
-            }
+            classloaderFacesConfigs.addAll(configRegistry.getDependentFacesConfigs(bundle));
         } finally {
             if (ref != null) {
                 bundle.getBundleContext().ungetService(ref);

Modified: geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/config/resource/osgi/api/ConfigRegistry.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/config/resource/osgi/api/ConfigRegistry.java?rev=1052196&r1=1052195&r2=1052196&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/config/resource/osgi/api/ConfigRegistry.java
(original)
+++ geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/config/resource/osgi/api/ConfigRegistry.java
Thu Dec 23 08:17:32 2010
@@ -21,11 +21,27 @@
 package org.apache.geronimo.myfaces.config.resource.osgi.api;
 
 import java.net.URL;
+import java.util.List;
 import java.util.Set;
 
+import org.apache.myfaces.config.element.FacesConfig;
+import org.osgi.framework.Bundle;
+
 /**
  * @version $Rev:$ $Date:$
  */
 public interface ConfigRegistry {
+
+    /**
+     * Get the URL list of founded faces-config.xml for all the started bundles
+     * @return
+     */
     Set<URL> getRegisteredConfigUrls();
+
+    /**
+     * Get the parsed FacesConfig instances from the dependency tree of the specified bundle
+     * @param bundle
+     * @return
+     */
+    List<FacesConfig> getDependentFacesConfigs(Bundle bundle);
 }



Mime
View raw message