geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r599076 - in /geronimo/server: branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Date Wed, 28 Nov 2007 17:59:38 GMT
Author: vamsic007
Date: Wed Nov 28 09:59:35 2007
New Revision: 599076

URL: http://svn.apache.org/viewvc?rev=599076&view=rev
Log:
GERONIMO-3644 Adding a second TomcatContainer is resulting in IllegalArgumentException
 o Made the defaultContext use a name instead of ''

Modified:
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java

Modified: geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=599076&r1=599075&r2=599076&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Wed Nov 28 09:59:35 2007
@@ -23,6 +23,8 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.management.ObjectName;
+
 import org.apache.catalina.Container;
 import org.apache.catalina.Context;
 import org.apache.catalina.Engine;
@@ -217,8 +219,12 @@
 
         Container[] hosts = engine.findChildren();
         Context defaultContext;
+        ObjectName objName = objectName == null ? null : ObjectName.getInstance(objectName);
         for (int i = 0; i < hosts.length; i++) {
             defaultContext = embedded.createContext("", docBase, classLoader);
+            if(objName != null) {
+                defaultContext.setName(objName.getKeyProperty(NameFactory.J2EE_NAME));
+            }
             if (defaultContext instanceof GeronimoStandardContext) {
                 GeronimoStandardContext ctx = (GeronimoStandardContext) defaultContext;
                 // Without this the Tomcat FallBack Application is left behind,

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=599076&r1=599075&r2=599076&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Wed Nov 28 09:59:35 2007
@@ -23,6 +23,8 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.management.ObjectName;
+
 import org.apache.catalina.Container;
 import org.apache.catalina.Context;
 import org.apache.catalina.Engine;
@@ -217,8 +219,12 @@
 
         Container[] hosts = engine.findChildren();
         Context defaultContext;
+        ObjectName objName = objectName == null ? null : ObjectName.getInstance(objectName);
         for (int i = 0; i < hosts.length; i++) {
             defaultContext = embedded.createContext("", docBase, classLoader);
+            if(objName != null) {
+                defaultContext.setName(objName.getKeyProperty(NameFactory.J2EE_NAME));
+            }
             if (defaultContext instanceof GeronimoStandardContext) {
                 GeronimoStandardContext ctx = (GeronimoStandardContext) defaultContext;
                 // Without this the Tomcat FallBack Application is left behind,



Mime
View raw message