geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r811226 - /geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java
Date Fri, 04 Sep 2009 06:07:41 GMT
Author: genspring
Date: Fri Sep  4 06:07:41 2009
New Revision: 811226

URL: http://svn.apache.org/viewvc?rev=811226&view=rev
Log:
GERONIMO-4777 WADI clustering does not work with Jetty7, patch from Trygve Hardersen

Modified:
    geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java

Modified: geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java?rev=811226&r1=811225&r2=811226&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java
(original)
+++ geronimo/server/trunk/plugins/jetty7/geronimo-jetty7-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty7/cluster/wadi/builder/WADIJettyClusteringBuilder.java
Fri Sep  4 06:07:41 2009
@@ -42,6 +42,7 @@
 import org.apache.geronimo.jetty7.cluster.wadi.WADIClusteredPreHandlerFactory;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
@@ -121,13 +122,20 @@
 
     protected GBeanData extractWebModule(DeploymentContext moduleContext) throws DeploymentException
{
         Configuration configuration = moduleContext.getConfiguration();
-        AbstractNameQuery webModuleQuery = new AbstractNameQuery(configuration.getId(), Collections.EMPTY_MAP,
Collections.singleton(WebAppContextWrapper.class.getName()));
+        AbstractNameQuery webModuleQuery = createJettyWebAppContextNameQuery(moduleContext);
         try {
             return configuration.findGBeanData(webModuleQuery);
         } catch (GBeanNotFoundException e) {
             throw new DeploymentException("Could not locate web module gbean in web app configuration",
e);
         }
     }
+    
+    protected AbstractNameQuery createJettyWebAppContextNameQuery(DeploymentContext moduleContext)
{
+        String name = moduleContext.getModuleName().getNameProperty(Jsr77Naming.J2EE_NAME);
+        return new AbstractNameQuery(null,
+            Collections.singletonMap(Jsr77Naming.J2EE_NAME, name),
+            Collections.singleton(WebAppContextWrapper.class.getName()));
+    }
 
     public QNameSet getSpecQNameSet() {
         return QNameSet.EMPTY;



Mime
View raw message