geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r674726 - in /geronimo/server/trunk/plugins: jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/ tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomc...
Date Tue, 08 Jul 2008 05:47:24 GMT
Author: gdamour
Date: Mon Jul  7 22:47:23 2008
New Revision: 674726

URL: http://svn.apache.org/viewvc?rev=674726&view=rev
Log:
Let's query based on the name and not the Artifact to distinguished between two clustered
deployments within an EAR. Indeed, the Artifact was incorrect for WAR modules packaged within
an EAR.

GERONIMO-4185 - Cannot deployed WADI clustered Jetty and Tomcat Web applications within an
EAR

Modified:
    geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java

Modified: geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java?rev=674726&r1=674725&r2=674726&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
(original)
+++ geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
Mon Jul  7 22:47:23 2008
@@ -41,6 +41,7 @@
 import org.apache.geronimo.jetty6.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;
@@ -117,8 +118,8 @@
     }
 
     protected GBeanData extractWebModule(DeploymentContext moduleContext) throws DeploymentException
{
+        AbstractNameQuery webModuleQuery = createJettyWebAppContextNameQuery(moduleContext);
         Configuration configuration = moduleContext.getConfiguration();
-        AbstractNameQuery webModuleQuery = new AbstractNameQuery(configuration.getId(), Collections.EMPTY_MAP,
Collections.singleton(JettyWebAppContext.class.getName()));
         try {
             return configuration.findGBeanData(webModuleQuery);
         } catch (GBeanNotFoundException e) {
@@ -126,6 +127,13 @@
         }
     }
 
+    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(JettyWebAppContext.class.getName()));
+    }
+
     public QNameSet getSpecQNameSet() {
         return QNameSet.EMPTY;
     }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java?rev=674726&r1=674725&r2=674726&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java
Mon Jul  7 22:47:23 2008
@@ -44,6 +44,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 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.Artifact;
 import org.apache.geronimo.kernel.repository.Dependency;
@@ -149,10 +150,8 @@
     }
 
     protected GBeanData extractWebModule(DeploymentContext moduleContext) throws DeploymentException
{
+        AbstractNameQuery webModuleQuery = createTomcatWebAppContextNameQuery(moduleContext);
         Configuration configuration = moduleContext.getConfiguration();
-        AbstractNameQuery webModuleQuery = new AbstractNameQuery(configuration.getId(),
-            Collections.EMPTY_MAP,
-            Collections.singleton(TomcatWebAppContext.class.getName()));
         try {
             return configuration.findGBeanData(webModuleQuery);
         } catch (GBeanNotFoundException e) {
@@ -160,6 +159,13 @@
         }
     }
 
+    protected AbstractNameQuery createTomcatWebAppContextNameQuery(DeploymentContext moduleContext)
{
+        String name = moduleContext.getModuleName().getNameProperty(Jsr77Naming.J2EE_NAME);
+        return new AbstractNameQuery(null,
+            Collections.singletonMap(Jsr77Naming.J2EE_NAME, name),
+            Collections.singleton(TomcatWebAppContext.class.getName()));
+    }
+
     public QNameSet getSpecQNameSet() {
         return QNameSet.EMPTY;
     }



Mime
View raw message