directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r542383 - in /directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store: MultiBaseSearch.java SingleBaseSearch.java
Date Tue, 29 May 2007 02:34:12 GMT
Author: erodriguez
Date: Mon May 28 19:34:11 2007
New Revision: 542383

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

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

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java?view=diff&rev=542383&r1=542382&r2=542383
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/MultiBaseSearch.java
Mon May 28 19:34:11 2007
@@ -30,10 +30,10 @@
 import javax.naming.directory.DirContext;
 import javax.naming.spi.InitialContextFactory;
 
-import org.apache.directory.server.core.configuration.ConfigurationException;
 import org.apache.directory.server.dns.DnsConfiguration;
 import org.apache.directory.server.dns.messages.QuestionRecord;
 import org.apache.directory.server.dns.store.operations.GetRecords;
+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;
@@ -55,16 +55,15 @@
     private static final Logger log = LoggerFactory.getLogger( MultiBaseSearch.class );
 
     private InitialContextFactory factory;
-    private Hashtable env;
+    private Hashtable<String, Object> env = new Hashtable<String, Object>();
 
     private Catalog catalog;
 
 
-    MultiBaseSearch(DnsConfiguration config, InitialContextFactory factory)
+    MultiBaseSearch( DnsConfiguration config, InitialContextFactory factory )
     {
         this.factory = factory;
 
-        env = new Hashtable( config.toJndiEnvironment() );
         env.put( Context.INITIAL_CONTEXT_FACTORY, config.getInitialContextFactory() );
         env.put( Context.PROVIDER_URL, config.getCatalogBaseDn() );
 
@@ -77,7 +76,7 @@
         {
             log.error( e.getMessage(), e );
             String message = "Failed to get catalog context " + ( String ) env.get( Context.PROVIDER_URL
);
-            throw new ConfigurationException( message, e );
+            throw new ServiceConfigurationException( message, e );
         }
     }
 
@@ -95,7 +94,7 @@
         {
             log.error( ne.getMessage(), 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/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java?view=diff&rev=542383&r1=542382&r2=542383
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/SingleBaseSearch.java
Mon May 28 19:34:11 2007
@@ -29,10 +29,10 @@
 import javax.naming.directory.DirContext;
 import javax.naming.spi.InitialContextFactory;
 
-import org.apache.directory.server.core.configuration.ConfigurationException;
 import org.apache.directory.server.dns.DnsConfiguration;
 import org.apache.directory.server.dns.messages.QuestionRecord;
 import org.apache.directory.server.dns.store.operations.GetRecords;
+import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.server.protocol.shared.store.ContextOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -51,13 +51,12 @@
     private static final Logger log = LoggerFactory.getLogger( SingleBaseSearch.class );
 
     private DirContext ctx;
-    private Hashtable<String, Object> env;
+    private Hashtable<String, Object> env = new Hashtable<String, Object>();
     private InitialContextFactory factory;
 
 
     SingleBaseSearch( DnsConfiguration 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() );
@@ -86,7 +85,7 @@
             {
                 log.error( ne.getMessage(), 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