directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1408396 - in /directory/apacheds/trunk: protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
Date Mon, 12 Nov 2012 18:40:30 GMT
Author: elecharny
Date: Mon Nov 12 18:40:29 2012
New Revision: 1408396

URL: http://svn.apache.org/viewvc?rev=1408396&view=rev
Log:
If the AliasDerefMode is not 'never' or 'finding', default to 'never' and log an error instead
of throwing an exception and stopping the server. That solves DIRSERVER-1758

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
    directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java?rev=1408396&r1=1408395&r2=1408396&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
Mon Nov 12 18:40:29 2012
@@ -122,7 +122,10 @@ public class SyncReplRequestHandler impl
 
     /** An ObjectClass AT instance */
     private static AttributeType OBJECT_CLASS_AT;
-
+    
+    /** The CSN AttributeType instance */
+    private AttributeType CSN_AT;
+    
     private Map<Integer, ReplicaEventLog> replicaLogMap = new HashMap<Integer, ReplicaEventLog>();
 
     private File syncReplData;
@@ -131,13 +134,10 @@ public class SyncReplRequestHandler impl
 
     private ReplConsumerManager replicaUtil;
 
-
     private ConsumerLogEntryDeleteListener cledListener;
     
     private ReplicaEventLogJanitor logJanitor;
     
-    private AttributeType CSN_AT;
-    
     /**
      * Create a SyncReplRequestHandler empty instance 
      */
@@ -155,6 +155,7 @@ public class SyncReplRequestHandler impl
         {
             LOG.warn( "syncrepl provider was already initialized" );
             PROVIDER_LOG.warn( "syncrepl provider was already initialized" );
+            
             return;
         }
 
@@ -172,6 +173,7 @@ public class SyncReplRequestHandler impl
             OBJECT_CLASS_AT = dirService.getSchemaManager()
                 .lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
 
+            // Get and create the replication directory if it does not exist
             syncReplData = dirService.getInstanceLayout().getReplDirectory();
 
             if ( !syncReplData.exists() )

Modified: directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java?rev=1408396&r1=1408395&r2=1408396&view=diff
==============================================================================
--- directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
(original)
+++ directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
Mon Nov 12 18:40:29 2012
@@ -1050,7 +1050,16 @@ public class ServiceBuilder
                 config.setBaseDn( replBean.getSearchBaseDn() );
                 config.setRemoteHost( replBean.getReplProvHostName() );
                 config.setRemotePort( replBean.getReplProvPort() );
-                config.setAliasDerefMode( AliasDerefMode.getDerefMode( replBean.getReplAliasDerefMode()
) );
+                
+                try
+                { 
+                    config.setAliasDerefMode( AliasDerefMode.getDerefMode( replBean.getReplAliasDerefMode()
) );
+                }
+                catch ( IllegalArgumentException iae )
+                {
+                    LOG.error( iae.getMessage() + ", defaulted to 'never'" );
+                }
+                
                 config.setAttributes( replBean.getReplAttributes().toArray( new String[0]
) );
                 config.setRefreshInterval( replBean.getReplRefreshInterval() );
                 config.setRefreshNPersist( replBean.isReplRefreshNPersist() );



Mime
View raw message