geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r675279 - /geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Date Wed, 09 Jul 2008 18:19:00 GMT
Author: linsun
Date: Wed Jul  9 11:19:00 2008
New Revision: 675279

URL: http://svn.apache.org/viewvc?rev=675279&view=rev
Log:
give users a better message when context-root is not unique - GERONIMO-4191

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

Modified: geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=675279&r1=675278&r2=675279&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
(original)
+++ geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Wed Jul  9 11:19:00 2008
@@ -359,8 +359,13 @@
                 anotherCtxObj.addApplicationListener(listener);
             }
         }
-
-        host.addChild(anotherCtxObj);
+        
+        try {
+            host.addChild(anotherCtxObj);
+        } catch (IllegalArgumentException ex) {
+            log.error("Unable to add the child container: " + anotherCtxObj.getName() 
+                    + " .  Please check if your project's context-root is unique.", ex);
+        }
     }
 
     public void removeContext(TomcatContext ctx) {
@@ -377,7 +382,9 @@
                 }
 
             }
-            context.getParent().removeChild(context);
+            if (context.getParent() != null) {
+                context.getParent().removeChild(context);
+            }
         }
 
     }



Mime
View raw message