You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/07/13 23:05:51 UTC

svn commit: r421708 - /directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java

Author: akarasulu
Date: Thu Jul 13 14:05:50 2006
New Revision: 421708

URL: http://svn.apache.org/viewvc?rev=421708&view=rev
Log:
reverting bypass which caused major issues

Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=421708&r1=421707&r2=421708&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Thu Jul 13 14:05:50 2006
@@ -88,22 +88,6 @@
     /** The Principal associated with this context */
     private LdapPrincipal principal;
 
-    private static final Collection HASENTRY_BYPASS;
-
-    static
-    {
-        Set c = new HashSet();
-        c.add( "normalizationService" );
-        c.add( "authenticationService" );
-        c.add( "authorizationService" );
-        c.add( "defaultAuthorizationService" );
-        c.add( "schemaService" );
-        c.add( "subentryService" );
-        c.add( "operationalAttributeService" );
-        c.add( "eventService" );
-        HASENTRY_BYPASS = Collections.unmodifiableCollection( c );
-    }
-    
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -136,14 +120,14 @@
         LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( this.env );
         dn = props.getProviderDn();
 
-        if ( ! ( ( DirectoryPartitionNexusProxy ) nexusProxy ).hasEntry( dn, HASENTRY_BYPASS ) )
-        {
-            throw new NameNotFoundException( dn + " does not exist" );
-        }
-
         // need to issue a bind operation here
         this.nexusProxy.bind( props.getBindDn(), props.getCredentials(), props.getAuthenticationMechanisms(), props
             .getSaslAuthId() );
+
+        if ( ! nexusProxy.hasEntry( dn ) )
+        {
+            throw new NameNotFoundException( dn + " does not exist" );
+        }
 
         if ( dn.size() == 0 )
         {