directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r542381 - in /directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store: MultiBaseSearch.java SingleBaseSearch.java
Date Tue, 29 May 2007 02:32:56 GMT
Author: erodriguez
Date: Mon May 28 19:32:56 2007
New Revision: 542381

URL: http://svn.apache.org/viewvc?view=rev&rev=542381
Log:
Collateral updates to kerberos-shared to reflect changes in protocol-shared.

Modified:
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java?view=diff&rev=542381&r1=542380&r2=542381
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
Mon May 28 19:32:56 2007
@@ -30,13 +30,13 @@
 import javax.naming.spi.InitialContextFactory;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import org.apache.directory.server.core.configuration.ConfigurationException;
 import org.apache.directory.server.kerberos.shared.store.operations.AddPrincipal;
 import org.apache.directory.server.kerberos.shared.store.operations.ChangePassword;
 import org.apache.directory.server.kerberos.shared.store.operations.DeletePrincipal;
 import org.apache.directory.server.kerberos.shared.store.operations.GetAllPrincipals;
 import org.apache.directory.server.kerberos.shared.store.operations.GetPrincipal;
 import org.apache.directory.server.protocol.shared.ServiceConfiguration;
+import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.server.protocol.shared.catalog.Catalog;
 import org.apache.directory.server.protocol.shared.catalog.GetCatalog;
 import org.apache.directory.server.protocol.shared.store.ContextOperation;
@@ -53,7 +53,7 @@
 class MultiBaseSearch implements PrincipalStore
 {
     private InitialContextFactory factory;
-    private Hashtable<String, Object> env;
+    private Hashtable<String, Object> env = new Hashtable<String, Object>();
 
     private Catalog catalog;
 
@@ -62,7 +62,6 @@
     {
         this.factory = factory;
 
-        env = new Hashtable<String, Object>( config.toJndiEnvironment() );
         env.put( Context.INITIAL_CONTEXT_FACTORY, config.getInitialContextFactory() );
         env.put( Context.PROVIDER_URL, config.getCatalogBaseDn() );
 
@@ -74,7 +73,7 @@
         catch ( Exception e )
         {
             String message = "Failed to get catalog context " + ( String ) env.get( Context.PROVIDER_URL
);
-            throw new ConfigurationException( message, e );
+            throw new ServiceConfigurationException( message, e );
         }
     }
 
@@ -91,7 +90,7 @@
         catch ( NamingException ne )
         {
             String message = "Failed to get initial context " + ( String ) env.get( Context.PROVIDER_URL
);
-            throw new ConfigurationException( message, ne );
+            throw new ServiceConfigurationException( message, ne );
         }
     }
 
@@ -108,7 +107,7 @@
         catch ( NamingException ne )
         {
             String message = "Failed to get initial context " + ( String ) env.get( Context.PROVIDER_URL
);
-            throw new ConfigurationException( message, ne );
+            throw new ServiceConfigurationException( message, ne );
         }
     }
 
@@ -125,7 +124,7 @@
         catch ( NamingException ne )
         {
             String message = "Failed to get initial context " + ( String ) env.get( Context.PROVIDER_URL
);
-            throw new ConfigurationException( message, ne );
+            throw new ServiceConfigurationException( message, ne );
         }
     }
 
@@ -142,7 +141,7 @@
         catch ( NamingException ne )
         {
             String message = "Failed to get initial context " + ( String ) env.get( Context.PROVIDER_URL
);
-            throw new ConfigurationException( message, ne );
+            throw new ServiceConfigurationException( message, ne );
         }
     }
 
@@ -159,7 +158,7 @@
         catch ( NamingException ne )
         {
             String message = "Failed to get initial context " + ( String ) env.get( Context.PROVIDER_URL
);
-            throw new ConfigurationException( message, ne );
+            throw new ServiceConfigurationException( message, ne );
         }
     }
 

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java?view=diff&rev=542381&r1=542380&r2=542381
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
Mon May 28 19:32:56 2007
@@ -29,13 +29,13 @@
 import javax.naming.spi.InitialContextFactory;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import org.apache.directory.server.core.configuration.ConfigurationException;
 import org.apache.directory.server.kerberos.shared.store.operations.AddPrincipal;
 import org.apache.directory.server.kerberos.shared.store.operations.ChangePassword;
 import org.apache.directory.server.kerberos.shared.store.operations.DeletePrincipal;
 import org.apache.directory.server.kerberos.shared.store.operations.GetAllPrincipals;
 import org.apache.directory.server.kerberos.shared.store.operations.GetPrincipal;
 import org.apache.directory.server.protocol.shared.ServiceConfiguration;
+import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.server.protocol.shared.store.ContextOperation;
 
 
@@ -49,13 +49,12 @@
 class SingleBaseSearch implements PrincipalStore
 {
     private DirContext ctx;
-    private Hashtable<String, Object> env;
+    private Hashtable<String, Object> env = new Hashtable<String, Object>();
     private InitialContextFactory factory;
 
 
     SingleBaseSearch( ServiceConfiguration config, InitialContextFactory factory )
     {
-        env = new Hashtable<String, Object>( config.toJndiEnvironment() );
         env.put( Context.INITIAL_CONTEXT_FACTORY, config.getInitialContextFactory() );
         env.put( Context.PROVIDER_URL, config.getSearchBaseDn() );
         env.put( Context.SECURITY_AUTHENTICATION, config.getSecurityAuthentication() );
@@ -107,7 +106,7 @@
             catch ( NamingException ne )
             {
                 String message = "Failed to get initial context " + ( String ) env.get( Context.PROVIDER_URL
);
-                throw new ConfigurationException( message, ne );
+                throw new ServiceConfigurationException( message, ne );
             }
         }
 



Mime
View raw message