commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #1833] [Patch #1833] make NamingManager handle nested names for J


From: noreply
Subject: [patch #1833] [Patch #1833] make NamingManager handle nested names for JBoss
Date: Sun, 07 Sep 2003 17:22:41 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030827 Galeon/1.3.7 Debian/1.3.7.20030902-1

Patch #1833 has been updated. 

Project: 
Category: None
Status: Open
Summary: make NamingManager handle nested names for JBoss

Follow-Ups:

Date: Sun 09/07/03 at 23:22
By: mark

Comment:
Other jndi code uses the Thread context ClassLoader.

And documentation like the following tutorial also indicates that should be 
used in 1.2 like environments.



So I suggest to change the patch as follows:



diff -u -r1.3 NamingManager.java

--- javax/naming/spi/NamingManager.java 13 Jul 2003 23:34:19 -0000      1.3

+++ javax/naming/spi/NamingManager.java 7 Sep 2003 21:19:56 -0000

@@ -231,7 +231,10 @@

            if (fClass != null)

              {

                // Exceptions here are passed to the caller.

-               Class k = Class.forName (fClass);

+               ClassLoader c = Thread.currentThread().getContextClassLoader();

+               Class k = (c == null)

+                 ? Class.forName(fClass)

+                 : Class.forName(fClass, true, c);

                factory = (ObjectFactory) k.newInstance ();

              }

            else

@@ -318,14 +321,19 @@

     // It is really unclear to me if this is right.

     try

       {

-       Object obj = getObjectInstance (null, cpe.getAltName (),

-                                       cpe.getAltNameCtx (), env);

+       Object obj = getObjectInstance (cpe.getResolvedObj(),

+                                       cpe.getAltName (),

+                                       cpe.getAltNameCtx (),

+                                       env);

        if (obj != null)

          return (Context) obj;

       }

     catch (Exception _)

       {

       }

+

+    // fix stack trace for re-thrown exception (message confusing otherwise)

+    cpe.fillInStackTrace();

  

     throw cpe;

   }

Does that work in your situation?
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://savannah.gnu.org/patch/?func=detailpatch&patch_id=1833&group_id=85

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]