[jboss-cvs] JBossAS SVN: r67946 - trunk/server/src/main/org/jboss/naming.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 5 09:56:07 EST 2007


Author: adrian at jboss.org
Date: 2007-12-05 09:56:07 -0500 (Wed, 05 Dec 2007)
New Revision: 67946

Modified:
   trunk/server/src/main/org/jboss/naming/JNDIView.java
Log:
Fix the java:comp listing in JNDIView for EJB2

Modified: trunk/server/src/main/org/jboss/naming/JNDIView.java
===================================================================
--- trunk/server/src/main/org/jboss/naming/JNDIView.java	2007-12-05 14:37:32 UTC (rev 67945)
+++ trunk/server/src/main/org/jboss/naming/JNDIView.java	2007-12-05 14:56:07 UTC (rev 67946)
@@ -175,16 +175,11 @@
                Object on = con.getJmxName();
                buffer.append("<h2>java:comp namespace of the " + bean + " bean:</h2>\n");
 
-               try
+               context = ENCFactory.getEncById().get(on);
+               ejb2Ids.add(on);
+               if (context == null)
                {
-                  context = ENCFactory.getEncById().get(on);
-                  ejb2Ids.add(on);
-                  context = (Context) context.lookup("java:comp");
-               }
-               catch (NamingException e)
-               {
-                  buffer.append("Failed on lookup, " + e.toString(true));
-                  formatException(buffer, e);
+                  buffer.append("Failed to retrieve context for " + on);
                   continue;
                }
                buffer.append("<pre>\n");




More information about the jboss-cvs-commits mailing list