geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: rev 57352 - geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java
Date Wed, 10 Nov 2004 19:53:49 GMT
Author: djencks
Date: Wed Nov 10 11:53:47 2004
New Revision: 57352

Modified:
   geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/RootContext.java
Log:
GERONIMO-469.  Allow lookup of java:/comp as well as java:comp

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/RootContext.java
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/RootContext.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/java/RootContext.java
Wed Nov 10 11:53:47 2004
@@ -53,8 +53,12 @@
                 return compCtx;
             } else if (name.startsWith("comp/")) {
                 return compCtx.lookup(name.substring(5));
+            } else if ("/comp".equals(name)) {
+                return compCtx;
+            } else if (name.startsWith("/comp/")) {
+                return compCtx.lookup(name.substring(6));
             } else {
-                throw new NameNotFoundException();
+                throw new NameNotFoundException("Unrecognized name, does not start with expected
'comp': " + name);
             }
         }
         return super.lookup(name);

Mime
View raw message