geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r674744 - in /geronimo/server/branches/2.1/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/geroni...
Date Tue, 08 Jul 2008 08:56:34 GMT
Author: gdamour
Date: Tue Jul  8 01:56:33 2008
New Revision: 674744

URL: http://svn.apache.org/viewvc?rev=674744&view=rev
Log:
Merge change set r674725:674726 from trunk.

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/branches/2.1/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
    geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java

Modified: geronimo/server/branches/2.1/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/branches/2.1/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java?rev=674744&r1=674743&r2=674744&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
(original)
+++ geronimo/server/branches/2.1/plugins/jetty/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
Tue Jul  8 01:56:33 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;
@@ -116,8 +117,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) {
@@ -125,6 +126,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/branches/2.1/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/branches/2.1/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java?rev=674744&r1=674743&r2=674744&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java
(original)
+++ geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6-clustering-builder-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/wadi/builder/WADITomcatClusteringBuilder.java
Tue Jul  8 01:56:33 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;
@@ -148,10 +149,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) {
@@ -159,6 +158,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