directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r465040 - /directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
Date Tue, 17 Oct 2006 20:47:01 GMT
Author: ersiner
Date: Tue Oct 17 13:47:01 2006
New Revision: 465040

URL: http://svn.apache.org/viewvc?view=rev&rev=465040
Log:
Fixed a bug related the the Ldap Class Loader: Now the parent class loader is being registered
in the constructor.

Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java?view=diff&rev=465040&r1=465039&r2=465040
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
Tue Oct 17 13:47:01 2006
@@ -60,6 +60,7 @@
 
     public LdapClassLoader( ServerLdapContext RootDSE ) throws NamingException
     {
+        super( LdapClassLoader.class.getClassLoader() );
         this.RootDSE = ( ( ServerLdapContext ) RootDSE.lookup( "" ) );
     }
 
@@ -87,6 +88,7 @@
                 javaClassEntries = currentSearchContext.search( LdapDN.EMPTY_LDAPDN, filter,
controls );
                 if ( javaClassEntries.hasMore() ) // there should be only one!
                 {
+                    log.debug( "Class " + name + " found under " + currentSearchContextName
+ " search context." );
                     SearchResult javaClassEntry = ( SearchResult ) javaClassEntries.next();
                     Attribute byteCode = javaClassEntry.getAttributes().get( "javaClassByteCode"
);
                     classBytes = ( byte[] ) byteCode.get();
@@ -153,13 +155,13 @@
         catch ( NamingException e ) 
         {
             String msg = "Encountered JNDI failure while searching directory for class: "
+ name;
-            log.error( msg, e );
+            log.debug( msg + e );
             throw new ClassNotFoundException( msg );
         }
         catch ( ClassNotFoundException e )
         {
             String msg = "Class " + name + " not found in DIT.";
-            log.warn( msg );
+            log.debug( msg );
             throw new ClassNotFoundException( msg );
         }
         finally
@@ -167,7 +169,7 @@
             if ( defaultSearchContexts != null ) { try { defaultSearchContexts.close(); }
catch( Exception e ) {} };
             if ( namingContexts != null ) { try { namingContexts.close(); } catch( Exception
e ) {} };
         }
-
+        
         return defineClass( name, classBytes, 0, classBytes.length );
     }
 }



Mime
View raw message