directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1447069 [2/3] - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/api/ core-api/src/main/java/org/apache/directory/server/core/api/filtering/ core-avl/src/main/java/org/apache/directory/server/core/avltr...
Date Sun, 17 Feb 2013 20:26:30 GMT
Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java Sun Feb 17 20:26:29 2013
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.ldap.replication.consumer;
 
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -37,6 +38,7 @@ import org.apache.directory.api.ldap.ext
 import org.apache.directory.api.ldap.extras.controls.SynchronizationModeEnum;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueDecorator;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator;
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.csn.Csn;
 import org.apache.directory.api.ldap.model.entry.Attribute;
@@ -101,9 +103,9 @@ public class ReplicationConsumerImpl imp
 {
     /** the logger */
     private static final Logger LOG = LoggerFactory.getLogger( ReplicationConsumerImpl.class );
-    
+
     /** A dedicated logger for the consumer */
-    private static final Logger CONSUMER_LOG = LoggerFactory.getLogger( "CONSUMER_LOG" );
+    private static final Logger CONSUMER_LOG = LoggerFactory.getLogger( Loggers.CONSUMER_LOG.getName() );
 
     /** the syncrepl configuration */
     private SyncReplConfiguration config;
@@ -132,13 +134,13 @@ public class ReplicationConsumerImpl imp
     /** attributes on which modification should be ignored */
     private static final String[] MOD_IGNORE_AT = new String[]
         {
-            SchemaConstants.ENTRY_UUID_AT, 
-            SchemaConstants.ENTRY_DN_AT, 
-            SchemaConstants.CREATE_TIMESTAMP_AT, 
-            SchemaConstants.CREATORS_NAME_AT, 
+            SchemaConstants.ENTRY_UUID_AT,
+            SchemaConstants.ENTRY_DN_AT,
+            SchemaConstants.CREATE_TIMESTAMP_AT,
+            SchemaConstants.CREATORS_NAME_AT,
             SchemaConstants.ENTRY_PARENT_ID_AT,
             SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT
-        };
+    };
 
     /** the cookie that was saved last time */
     private byte[] lastSavedCookie;
@@ -147,7 +149,7 @@ public class ReplicationConsumerImpl imp
     private static final PresenceNode ENTRY_UUID_PRESENCE_FILTER = new PresenceNode( SchemaConstants.ENTRY_UUID_AT );
 
     private Modification cookieMod;
-    
+
     private Modification ridMod;
 
     /** AttributeTypes used for replication */
@@ -155,8 +157,9 @@ public class ReplicationConsumerImpl imp
     private static AttributeType ENTRY_UUID_AT;
     private static AttributeType RID_AT_TYPE;
 
-    private static final Map<String,Object> uuidLockMap = new LRUMap( 1000 );
-    
+    private static final Map<String, Object> uuidLockMap = new LRUMap( 1000 );
+
+
     /**
      * @return the config
      */
@@ -181,17 +184,17 @@ public class ReplicationConsumerImpl imp
         ENTRY_UUID_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_UUID_AT );
         REPL_COOKIE_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ADS_REPL_COOKIE );
         RID_AT_TYPE = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ADS_DS_REPLICA_ID );
-        
+
         Attribute cookieAttr = new DefaultAttribute( REPL_COOKIE_AT );
         cookieMod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, cookieAttr );
 
         Attribute ridAttr = new DefaultAttribute( RID_AT_TYPE );
         ridMod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, ridAttr );
-        
+
         prepareSyncSearchRequest();
     }
-    
-    
+
+
     /**
      * Connect to the remote server. Note that a SyncRepl consumer will be connected to only
      * one remote server
@@ -219,7 +222,7 @@ public class ReplicationConsumerImpl imp
 
                 connection.addConnectionClosedEventListener( this );
             }
-            
+
             // Try to connect
             if ( connection.connect() )
             {
@@ -230,12 +233,13 @@ public class ReplicationConsumerImpl imp
                 {
                     connection.bind( config.getReplUserDn(), Strings.utf8ToString( config.getReplUserPassword() ) );
                     disconnected = false;
-                    
+
                     return true;
                 }
                 catch ( LdapException le )
                 {
-                    CONSUMER_LOG.warn( "Failed to bind to the producer {} with the given bind Dn {}", config.getProducer(), config.getReplUserDn() );
+                    CONSUMER_LOG.warn( "Failed to bind to the producer {} with the given bind Dn {}",
+                        config.getProducer(), config.getReplUserDn() );
                     LOG.warn( "Failed to bind to the server with the given bind Dn {}", config.getReplUserDn() );
                     LOG.warn( "", le );
                     disconnected = true;
@@ -243,7 +247,8 @@ public class ReplicationConsumerImpl imp
             }
             else
             {
-                CONSUMER_LOG.warn( "Consumer {} cannot connect to producer {}", config.getReplicaId(), config.getProducer() );
+                CONSUMER_LOG.warn( "Consumer {} cannot connect to producer {}", config.getReplicaId(),
+                    config.getProducer() );
                 disconnected = true;
 
                 return false;
@@ -286,7 +291,7 @@ public class ReplicationConsumerImpl imp
             searchRequest.addControl( new ManageDsaITDecorator( directoryService.getLdapCodecService(),
                 new ManageDsaITImpl() ) );
         }
-        
+
         if ( CONSUMER_LOG.isDebugEnabled() )
         {
             MDC.put( "Replica", Integer.toString( config.getReplicaId() ) );
@@ -344,26 +349,27 @@ public class ReplicationConsumerImpl imp
             // lock on UUID to serialize the updates when there are multiple consumers
             // connected to several producers and to the *same* base/partition
             Object lock = getLockFor( uuid );
-            
+
             synchronized ( lock )
             {
                 int rid = -1;
-                
+
                 if ( syncStateCtrl.getCookie() != null )
                 {
                     syncCookie = syncStateCtrl.getCookie();
                     rid = LdapProtocolUtils.getReplicaId( Strings.utf8ToString( syncCookie ) );
-                    LOG.debug( "assigning the cookie from sync state value control: {}", Strings.utf8ToString(syncCookie) );
+                    LOG.debug( "assigning the cookie from sync state value control: {}",
+                        Strings.utf8ToString( syncCookie ) );
                 }
-                
+
                 SyncStateTypeEnum state = syncStateCtrl.getSyncStateType();
-                
+
                 LOG.debug( "state name {}", state.name() );
-                
+
                 // check to avoid conversion of UUID from byte[] to String
                 if ( LOG.isDebugEnabled() )
                 {
-                    LOG.debug( "entryUUID = {}", Strings.uuidToString(syncStateCtrl.getEntryUUID()) );
+                    LOG.debug( "entryUUID = {}", Strings.uuidToString( syncStateCtrl.getEntryUUID() ) );
                 }
 
                 Dn remoteDn = remoteEntry.getDn();
@@ -372,7 +378,7 @@ public class ReplicationConsumerImpl imp
                 {
                     case ADD:
                         boolean remoteDnExist = false;
-                        
+
                         try
                         {
                             remoteDnExist = session.exists( remoteDn );
@@ -381,15 +387,15 @@ public class ReplicationConsumerImpl imp
                         {
                             CONSUMER_LOG.error( lnsoe.getMessage() );
                         }
-                        
-                        if ( !remoteDnExist)
+
+                        if ( !remoteDnExist )
                         {
                             LOG.debug( "adding entry with dn {}", remoteDn );
                             LOG.debug( remoteEntry.toString() );
                             AddOperationContext addContext = new AddOperationContext( session, remoteEntry );
                             addContext.setReplEvent( true );
                             addContext.setRid( rid );
-                            
+
                             OperationManager operationManager = directoryService.getOperationManager();
                             operationManager.add( addContext );
                         }
@@ -398,27 +404,29 @@ public class ReplicationConsumerImpl imp
                             LOG.debug( "updating entry in refreshOnly mode {}", remoteDn );
                             modify( remoteEntry, rid );
                         }
-    
+
                         break;
-    
+
                     case MODIFY:
                         LOG.debug( "modifying entry with dn {}", remoteEntry.getDn().getName() );
                         modify( remoteEntry, rid );
-    
+
                         break;
-    
+
                     case MODDN:
                         String entryUuid = Strings.uuidToString( syncStateCtrl.getEntryUUID() ).toString();
                         applyModDnOperation( remoteEntry, entryUuid, rid );
-    
+
                         break;
-    
+
                     case DELETE:
                         LOG.debug( "deleting entry with dn {}", remoteEntry.getDn().getName() );
-                        
+
                         if ( !session.exists( remoteDn ) )
                         {
-                            LOG.debug( "looks like entry {} was already deleted in a prior update (possibly from another provider), skipping delete", remoteDn );
+                            LOG.debug(
+                                "looks like entry {} was already deleted in a prior update (possibly from another provider), skipping delete",
+                                remoteDn );
                         }
                         else
                         {
@@ -427,9 +435,9 @@ public class ReplicationConsumerImpl imp
                             // so the branch needs to be recursively deleted here
                             deleteRecursive( remoteEntry.getDn(), null );
                         }
-    
+
                         break;
-    
+
                     case PRESENT:
                         LOG.debug( "entry present {}", remoteEntry );
                         break;
@@ -472,14 +480,14 @@ public class ReplicationConsumerImpl imp
 
             byte[] cookie = syncInfoValue.getCookie();
 
-            
             if ( CONSUMER_LOG.isDebugEnabled() )
             {
-                CONSUMER_LOG.debug( "Received a SyncInfoValue from producer {} : {}", config.getProducer(), syncInfoValue );
+                CONSUMER_LOG.debug( "Received a SyncInfoValue from producer {} : {}", config.getProducer(),
+                    syncInfoValue );
             }
 
             int replicaId = -1;
-            
+
             if ( cookie != null )
             {
                 LOG.debug( "setting the cookie from the sync info: " + Strings.utf8ToString( cookie ) );
@@ -527,19 +535,20 @@ public class ReplicationConsumerImpl imp
         if ( CONSUMER_LOG.isDebugEnabled() )
         {
             MDC.put( "Replica", Integer.toString( config.getReplicaId() ) );
-            CONSUMER_LOG.debug( "Consumer {} session with {} has been closed ", config.getReplicaId(), config.getProducer() );
+            CONSUMER_LOG.debug( "Consumer {} session with {} has been closed ", config.getReplicaId(),
+                config.getProducer() );
         }
-        
+
         // Cleanup
         disconnected = true;
         connection = null;
-        
+
         // persist the cookie
         storeCookie();
-        
+
         // reset the cookie
         syncCookie = null;
-        
+
         return;
     }
 
@@ -573,8 +582,8 @@ public class ReplicationConsumerImpl imp
             return doRefreshOnly();
         }
     }
-    
-    
+
+
     private ReplicationStatusEnum doRefreshOnly()
     {
         while ( !disconnected )
@@ -593,7 +602,7 @@ public class ReplicationConsumerImpl imp
             catch ( InterruptedException ie )
             {
                 LOG.warn( "refresher thread interrupted" );
-                
+
                 return ReplicationStatusEnum.DISCONNECTED;
             }
             catch ( Exception e )
@@ -605,7 +614,7 @@ public class ReplicationConsumerImpl imp
 
         return ReplicationStatusEnum.STOPPED;
     }
-    
+
 
     /** 
      * {@inheritDoc}
@@ -627,14 +636,14 @@ public class ReplicationConsumerImpl imp
         {
             connected = connect();
         }
-        
+
         while ( !connected )
         {
             try
             {
                 CONSUMER_LOG.debug( "Consumer {} cannot connect to {}, wait 5 seconds.", config.getReplicaId(),
                     config.getProducer() );
-                
+
                 // try to establish a connection for every 5 seconds
                 Thread.sleep( 5000 );
             }
@@ -646,10 +655,10 @@ public class ReplicationConsumerImpl imp
 
             connected = connect();
         }
-        
+
         // TODO : we may have cases were we get here with the connected flag to false. With the above
         // code, thi sis not possible
-        
+
         return connected;
     }
 
@@ -660,12 +669,12 @@ public class ReplicationConsumerImpl imp
     public void ping()
     {
         boolean connected = !disconnected;
-        
+
         if ( disconnected )
         {
             connected = connect();
         }
-        
+
         if ( connected )
         {
             CONSUMER_LOG.debug( "PING : The consumer {} is alive", config.getReplicaId() );
@@ -673,15 +682,17 @@ public class ReplicationConsumerImpl imp
             try
             {
                 Entry baseDn = connection.lookup( config.getBaseDn(), "1.1" );
-                
+
                 if ( baseDn == null )
                 {
                     // Cannot get the entry : this is bad, but possible
-                    CONSUMER_LOG.debug( "Cannot fetch '{}' from provider for consumer {}", config.getBaseDn(), config.getReplicaId() );
+                    CONSUMER_LOG.debug( "Cannot fetch '{}' from provider for consumer {}", config.getBaseDn(),
+                        config.getReplicaId() );
                 }
                 else
                 {
-                    CONSUMER_LOG.debug( "Fetched '{}' from provider for consumer {}", config.getBaseDn(), config.getReplicaId() );
+                    CONSUMER_LOG.debug( "Fetched '{}' from provider for consumer {}", config.getBaseDn(),
+                        config.getReplicaId() );
                 }
             }
             catch ( LdapException le )
@@ -716,8 +727,8 @@ public class ReplicationConsumerImpl imp
     {
         return String.valueOf( getConfig().getReplicaId() );
     }
-    
-    
+
+
     /**
      * Performs a search on connection with updated syncRequest control. The provider
      * will initiate an UpdateContant or an initContent depending on the current consumer
@@ -745,7 +756,8 @@ public class ReplicationConsumerImpl imp
         // If we have a persisted cookie, send it.
         if ( syncCookie != null )
         {
-            CONSUMER_LOG.debug( "searching on {} with searchRequest, cookie '{}'", config.getProducer(), Strings.utf8ToString( syncCookie ) );
+            CONSUMER_LOG.debug( "searching on {} with searchRequest, cookie '{}'", config.getProducer(),
+                Strings.utf8ToString( syncCookie ) );
             syncReq.setCookie( syncCookie );
         }
         else
@@ -759,7 +771,7 @@ public class ReplicationConsumerImpl imp
         SearchFuture sf = connection.searchAsync( searchRequest );
 
         Response resp = sf.get();
-        
+
         CONSUMER_LOG.debug( "Response from {} : {}", config.getProducer(), resp );
 
         // Now, process the responses. We loop until we have a connection termination or
@@ -785,44 +797,45 @@ public class ReplicationConsumerImpl imp
             resp = sf.get();
             CONSUMER_LOG.debug( "Response from {} : {}", config.getProducer(), resp );
         }
-        
-        if ( sf.isCancelled()  )
+
+        if ( sf.isCancelled() )
         {
-            
+
             CONSUMER_LOG.debug( "Search sync on {} has been canceled ", config.getProducer(), sf.getCause() );
-            
+
             return ReplicationStatusEnum.DISCONNECTED;
         }
         else if ( disconnected )
         {
             CONSUMER_LOG.debug( "Disconnected from {}", config.getProducer() );
-            
+
             return ReplicationStatusEnum.DISCONNECTED;
         }
         else
         {
             ResultCodeEnum resultCode = handleSearchResultDone( ( SearchResultDone ) resp );
-    
+
             CONSUMER_LOG.debug( "Response from {} : {}", config.getProducer(), resultCode );
             LOG.debug( "sync operation returned result code {}", resultCode );
-    
+
             if ( resultCode == ResultCodeEnum.NO_SUCH_OBJECT )
             {
                 // log the error and handle it appropriately
-                CONSUMER_LOG.warn( "The base Dn {} is not found on provider {}", config.getBaseDn(), config.getProducer() );
+                CONSUMER_LOG.warn( "The base Dn {} is not found on provider {}", config.getBaseDn(),
+                    config.getProducer() );
                 LOG.warn( "The base Dn {} is not found on provider {}", config.getBaseDn(), config.getProducer() );
-    
+
                 CONSUMER_LOG.warn( "Disconnecting the Refresh&Persist consumer from provider {}", config.getProducer() );
                 LOG.warn( "Disconnecting the Refresh&Persist consumer from provider {}", config.getProducer() );
                 disconnect();
-                
+
                 return ReplicationStatusEnum.DISCONNECTED;
             }
             else if ( resultCode == ResultCodeEnum.E_SYNC_REFRESH_REQUIRED )
             {
                 CONSUMER_LOG.info( "Full SYNC_REFRESH required from {}", config.getProducer() );
                 LOG.info( "Full SYNC_REFRESH required from {}", config.getProducer() );
-    
+
                 try
                 {
                     CONSUMER_LOG.debug( "Deleting baseDN {}", config.getBaseDn() );
@@ -835,17 +848,18 @@ public class ReplicationConsumerImpl imp
                             "Failed to delete the replica base as part of handling E_SYNC_REFRESH_REQUIRED, disconnecting the consumer",
                             e );
                 }
-    
+
                 // Do a full update.
                 removeCookie();
-                
+
                 CONSUMER_LOG.debug( "Re-doing a syncRefresh from producer {}", config.getProducer() );
-                
+
                 return ReplicationStatusEnum.REFRESH_REQUIRED;
             }
             else
             {
-                CONSUMER_LOG.debug( "Got result code {} from producer {}. Replication stopped", resultCode, config.getProducer() );
+                CONSUMER_LOG.debug( "Got result code {} from producer {}. Replication stopped", resultCode,
+                    config.getProducer() );
                 return ReplicationStatusEnum.DISCONNECTED;
             }
         }
@@ -858,29 +872,29 @@ public class ReplicationConsumerImpl imp
     private void disconnect()
     {
         disconnected = true;
-        
+
         if ( connection == null )
         {
             return;
         }
-        
+
         if ( connection.isConnected() )
         {
             try
             {
                 connection.unBind();
                 LOG.info( "Unbound from the server {}", config.getProducer() );
-                
+
                 if ( CONSUMER_LOG.isDebugEnabled() )
                 {
                     MDC.put( "Replica", Integer.toString( config.getReplicaId() ) );
                     CONSUMER_LOG.info( "Unbound from the server {}", config.getProducer() );
                 }
-    
+
                 connection.close();
                 LOG.info( "Connection closed for the server {}", config.getProducer() );
                 CONSUMER_LOG.info( "Connection closed for the server {}", config.getProducer() );
-    
+
                 connection = null;
             }
             catch ( Exception e )
@@ -891,7 +905,7 @@ public class ReplicationConsumerImpl imp
             {
                 // persist the cookie
                 storeCookie();
-                
+
                 // reset the cookie
                 syncCookie = null;
             }
@@ -921,16 +935,16 @@ public class ReplicationConsumerImpl imp
             Attribute attr = cookieMod.getAttribute();
             attr.clear();
             attr.add( syncCookie );
-            
+
             String cookieString = Strings.utf8ToString( syncCookie );
             int replicaId = LdapProtocolUtils.getReplicaId( cookieString );
-            
+
             Attribute ridAt = ridMod.getAttribute();
             ridAt.clear();
             ridAt.add( String.valueOf( replicaId ) );
-            
+
             CONSUMER_LOG.debug( "Storing the cookie in the DIT : {}", config.getConfigEntryDn() );
-            
+
             //session.modify( config.getConfigEntryDn(), cookieMod, ridMod );
             session.modify( config.getConfigEntryDn(), cookieMod );
             CONSUMER_LOG.debug( "stored the cookie in entry {}", config.getConfigEntryDn() );
@@ -955,11 +969,11 @@ public class ReplicationConsumerImpl imp
         try
         {
             Entry entry = session.lookup( config.getConfigEntryDn(), SchemaConstants.ADS_REPL_COOKIE );
-            
+
             if ( entry != null )
             {
                 Attribute attr = entry.get( REPL_COOKIE_AT );
-                
+
                 if ( attr != null )
                 {
                     syncCookie = attr.getBytes();
@@ -975,14 +989,16 @@ public class ReplicationConsumerImpl imp
             }
             else
             {
-                CONSUMER_LOG.debug( "Cannot find the configuration '{}' in the DIT for consumer {}", config.getConfigEntryDn(), config.getReplicaId() );
+                CONSUMER_LOG.debug( "Cannot find the configuration '{}' in the DIT for consumer {}",
+                    config.getConfigEntryDn(), config.getReplicaId() );
             }
         }
         catch ( Exception e )
         {
             // can be ignored, most likely happens if there is no entry with the given Dn
             // log in debug mode
-            CONSUMER_LOG.debug( "Cannot find the  '{}' in the DIT for consumer {}", config.getConfigEntryDn(), config.getReplicaId() );
+            CONSUMER_LOG.debug( "Cannot find the  '{}' in the DIT for consumer {}", config.getConfigEntryDn(),
+                config.getReplicaId() );
             LOG.debug( "Failed to read the cookie from the entry {}", config.getConfigEntryDn(), e );
         }
     }
@@ -1032,9 +1048,9 @@ public class ReplicationConsumerImpl imp
 
             EntryFilteringCursor cursor = session.search( searchRequest );
             cursor.beforeFirst();
-            
+
             Entry localEntry = null;
-            
+
             if ( cursor.next() )
             {
                 localEntry = cursor.get();
@@ -1047,16 +1063,17 @@ public class ReplicationConsumerImpl imp
             {
                 return;
             }
-            
+
             if ( config.isMmrMode() )
             {
                 Csn localCsn = new Csn( localEntry.get( SchemaConstants.ENTRY_CSN_AT ).getString() );
                 Csn remoteCsn = new Csn( remoteEntry.get( SchemaConstants.ENTRY_CSN_AT ).getString() );
-                
+
                 if ( localCsn.compareTo( remoteCsn ) >= 0 )
                 {
                     // just discard the received modified entry, that is old
-                    LOG.debug( "local modification is latest, discarding the modDn operation dn {}", remoteEntry.getDn() );
+                    LOG.debug( "local modification is latest, discarding the modDn operation dn {}",
+                        remoteEntry.getDn() );
                     return;
                 }
             }
@@ -1098,18 +1115,19 @@ public class ReplicationConsumerImpl imp
                     movCtx.setReplEvent( true );
                     movCtx.setRid( rid );
                     directoryService.getOperationManager().move( movCtx );
-                    
+
                     break;
 
                 case RENAME:
                     LOG.debug( "renaming the Dn {} with new Rdn {} and deleteOldRdn flag set to {}", new String[]
                         { localDn.getName(), remoteRdn.getName(), String.valueOf( deleteOldRdn ) } );
 
-                    RenameOperationContext renCtx = new RenameOperationContext( session, localDn, remoteRdn, deleteOldRdn );
+                    RenameOperationContext renCtx = new RenameOperationContext( session, localDn, remoteRdn,
+                        deleteOldRdn );
                     renCtx.setReplEvent( true );
                     renCtx.setRid( rid );
                     directoryService.getOperationManager().rename( renCtx );
-                    
+
                     break;
 
                 case MOVE_AND_RENAME:
@@ -1122,11 +1140,12 @@ public class ReplicationConsumerImpl imp
                                 remoteRdn.getName(),
                                 String.valueOf( deleteOldRdn ) } );
 
-                    MoveAndRenameOperationContext movRenCtx = new MoveAndRenameOperationContext( session, localDn, remoteParentDn, remoteRdn, deleteOldRdn );
+                    MoveAndRenameOperationContext movRenCtx = new MoveAndRenameOperationContext( session, localDn,
+                        remoteParentDn, remoteRdn, deleteOldRdn );
                     movRenCtx.setReplEvent( true );
                     movRenCtx.setRid( rid );
                     directoryService.getOperationManager().moveAndRename( movRenCtx );
-                    
+
                     break;
             }
         }
@@ -1141,18 +1160,18 @@ public class ReplicationConsumerImpl imp
     {
         String[] attributes = computeAttributes( config.getAttributes(), SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES );
 
-        LookupOperationContext lookupCtx = 
+        LookupOperationContext lookupCtx =
             new LookupOperationContext( session, remoteEntry.getDn(), attributes );
-        
+
         lookupCtx.setSyncreplLookup( true );
-        
+
         Entry localEntry = session.getDirectoryService().getOperationManager().lookup( lookupCtx );
 
         if ( config.isMmrMode() )
         {
             Csn localCsn = new Csn( localEntry.get( SchemaConstants.ENTRY_CSN_AT ).getString() );
             Csn remoteCsn = new Csn( remoteEntry.get( SchemaConstants.ENTRY_CSN_AT ).getString() );
-            
+
             if ( localCsn.compareTo( remoteCsn ) >= 0 )
             {
                 // just discard the received modified entry, that is old
@@ -1160,10 +1179,10 @@ public class ReplicationConsumerImpl imp
                 return;
             }
         }
-        
+
         remoteEntry.removeAttributes( MOD_IGNORE_AT );
         localEntry.removeAttributes( MOD_IGNORE_AT );
-        
+
         List<Modification> mods = new ArrayList<Modification>();
         Iterator<Attribute> itr = localEntry.iterator();
 
@@ -1204,15 +1223,16 @@ public class ReplicationConsumerImpl imp
             serverModifications.add( new DefaultModification( directoryService.getSchemaManager(), mod ) );
         }
 
-        ModifyOperationContext modifyContext = new ModifyOperationContext( session, remoteEntry.getDn(), serverModifications );
+        ModifyOperationContext modifyContext = new ModifyOperationContext( session, remoteEntry.getDn(),
+            serverModifications );
         modifyContext.setReplEvent( true );
         modifyContext.setRid( rid );
-        
+
         OperationManager operationManager = directoryService.getOperationManager();
         operationManager.modify( modifyContext );
     }
 
-    
+
     /**
      * Create a new list combining a list and a newly added attribute
      */
@@ -1222,11 +1242,11 @@ public class ReplicationConsumerImpl imp
         {
             if ( addedAttribute != null )
             {
-                String[] combinedAttributes = new String[ attributes.length + 1 ];
-                
+                String[] combinedAttributes = new String[attributes.length + 1];
+
                 System.arraycopy( attributes, 0, combinedAttributes, 0, attributes.length );
                 combinedAttributes[attributes.length] = addedAttribute;
-                
+
                 return combinedAttributes;
             }
             else
@@ -1238,7 +1258,8 @@ public class ReplicationConsumerImpl imp
         {
             if ( addedAttribute != null )
             {
-                return new String[]{ addedAttribute };
+                return new String[]
+                    { addedAttribute };
             }
             else
             {
@@ -1246,7 +1267,7 @@ public class ReplicationConsumerImpl imp
             }
         }
     }
-    
+
 
     /**
      * deletes the entries having the UUID given in the list
@@ -1296,7 +1317,7 @@ public class ReplicationConsumerImpl imp
             {
                 startIndex = i * NODE_LIMIT;
             }
-            
+
             processDelete( uuidList.subList( startIndex, uuidList.size() ), isRefreshPresent, replicaId );
         }
     }
@@ -1309,7 +1330,8 @@ public class ReplicationConsumerImpl imp
      * @param isRefreshPresent a flag indicating the type of entries present in the UUID list
      * @param replicaId TODO
      */
-    private void processDelete( List<byte[]> limitedUuidList, boolean isRefreshPresent, int replicaId ) throws Exception
+    private void processDelete( List<byte[]> limitedUuidList, boolean isRefreshPresent, int replicaId )
+        throws Exception
     {
         ExprNode filter = null;
         int size = limitedUuidList.size();
@@ -1358,7 +1380,7 @@ public class ReplicationConsumerImpl imp
         EntryFilteringCursor cursor = session.search( dn, SearchScope.SUBTREE, filter,
             AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.ENTRY_UUID_AT );
         cursor.beforeFirst();
-        
+
         while ( cursor.next() )
         {
             Entry entry = cursor.get();
@@ -1367,18 +1389,18 @@ public class ReplicationConsumerImpl imp
 
         cursor.close();
     }
-    
-    
+
+
     private synchronized Object getLockFor( String uuid )
     {
         Object lock = uuidLockMap.get( uuid );
-        
-        if( lock == null )
+
+        if ( lock == null )
         {
             lock = new Object();
             uuidLockMap.put( uuid, lock );
         }
-        
+
         return lock;
     }
 
@@ -1465,14 +1487,14 @@ public class ReplicationConsumerImpl imp
         }
     }
 
-    
+
     /**
      * @see Object#toString()
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "Consumer " ).append( config );
 
         return sb.toString();

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java Sun Feb 17 20:26:29 2013
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.entry.Attribute;
 import org.apache.directory.api.ldap.model.entry.DefaultEntry;
@@ -67,7 +68,7 @@ public class ReplConsumerManager
     private static final Logger LOG = LoggerFactory.getLogger( ReplConsumerManager.class );
 
     /** A logger for the replication provider */
-    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( "PROVIDER_LOG" );
+    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( Loggers.PROVIDER_LOG.getName() );
 
     /** The admin session used to commuicate with the backend */
     private CoreSession adminSession;
@@ -178,9 +179,9 @@ public class ReplConsumerManager
             SchemaConstants.ADS_REPL_LOG_PURGE_THRESHOLD_COUNT, String.valueOf( replica.getPurgeThresholdCount() ) );
 
         adminSession.add( entry );
-        
+
         replica.setConsumerEntryDn( consumerDn );
-        
+
         LOG.debug( "stored replication consumer entry {}", consumerDn );
     }
 
@@ -234,7 +235,8 @@ public class ReplConsumerManager
 
         if ( mod == null )
         {
-            mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, ADS_REPL_LAST_SENT_CSN_AT, replica.getLastSentCsn() );
+            mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, ADS_REPL_LAST_SENT_CSN_AT,
+                replica.getLastSentCsn() );
 
             modMap.put( replica.getId(), mod );
         }
@@ -329,16 +331,17 @@ public class ReplConsumerManager
 
         int maxIdlePeriod = Integer.parseInt( entry.get( SchemaConstants.ADS_REPL_LOG_MAX_IDLE ).getString() );
         replica.setMaxIdlePeriod( maxIdlePeriod );
-        
-        int purgeThreshold = Integer.parseInt( entry.get( SchemaConstants.ADS_REPL_LOG_PURGE_THRESHOLD_COUNT ).getString() );
+
+        int purgeThreshold = Integer.parseInt( entry.get( SchemaConstants.ADS_REPL_LOG_PURGE_THRESHOLD_COUNT )
+            .getString() );
         replica.setPurgeThresholdCount( purgeThreshold );
-        
+
         // explicitly mark the replica as not-dirty, cause we just loaded it from 
         // the store, this prevents updating the replica info immediately after loading
         replica.setDirty( false );
 
         replica.setConsumerEntryDn( entry.getDn() );
-        
+
         return replica;
     }
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaEventLog.java Sun Feb 17 20:26:29 2013
@@ -28,6 +28,7 @@ import jdbm.RecordManager;
 import jdbm.recman.BaseRecordManager;
 import jdbm.recman.TransactionManager;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.api.ldap.model.schema.SchemaManager;
@@ -65,7 +66,7 @@ public class ReplicaEventLog implements 
     private static final Logger LOG = LoggerFactory.getLogger( ReplicaEventLog.class );
 
     /** A logger for the replication provider */
-    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( "PROVIDER_LOG" );
+    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( Loggers.PROVIDER_LOG.getName() );
 
     /** hostname of the syncrepl consumer */
     private String hostName;
@@ -90,7 +91,7 @@ public class ReplicaEventLog implements 
 
     /** the duration(in seconds) of consumer inactivity after which this log will be deleted. Defaults to 172800 seconds (i.e. 2 days) */
     private long maxIdlePeriod = DEFAULT_MAX_IDLE_PERIOD;
-    
+
     /** the minimum number of entries to be present for beginning purging entries older than the last sent CSN. Default is 10000 */
     private int purgeThresholdCount = DEFAULT_PURGE_THRESHOLD_COUNT;
 
@@ -113,9 +114,10 @@ public class ReplicaEventLog implements 
     public static final String REPLICA_EVENT_LOG_NAME_PREFIX = "REPL_EVENT_LOG.";
 
     public static final int DEFAULT_PURGE_THRESHOLD_COUNT = 10000;
-    
+
     public static final int DEFAULT_MAX_IDLE_PERIOD = 2 * 24 * 60;
-    
+
+
     /**
      * Creates a new instance of EventLog for a replica
      * 
@@ -447,7 +449,7 @@ public class ReplicaEventLog implements 
         return journal.getName();
     }
 
-    
+
     /**
      * @return the number of entries present in the replica log
      */
@@ -472,11 +474,11 @@ public class ReplicaEventLog implements 
 
     public void setMaxIdlePeriod( long maxIdlePeriod )
     {
-        if( maxIdlePeriod <= 0 )
+        if ( maxIdlePeriod <= 0 )
         {
             maxIdlePeriod = DEFAULT_MAX_IDLE_PERIOD;
         }
-        
+
         this.maxIdlePeriod = maxIdlePeriod;
     }
 
@@ -489,11 +491,11 @@ public class ReplicaEventLog implements 
 
     public void setPurgeThresholdCount( int purgeThresholdCount )
     {
-        if( purgeThresholdCount <= 0 )
+        if ( purgeThresholdCount <= 0 )
         {
             purgeThresholdCount = DEFAULT_PURGE_THRESHOLD_COUNT;
         }
-        
+
         this.purgeThresholdCount = purgeThresholdCount;
     }
 
@@ -514,8 +516,8 @@ public class ReplicaEventLog implements 
     public String toString()
     {
         return "ReplicaEventLog [hostName=" + hostName + ", searchFilter=" + searchFilter + ", lastSentCsn="
-            + lastSentCsn + ", searchCriteria=" + searchCriteria + ", replicaId=" + replicaId 
-            + ", refreshNPersist=" + refreshNPersist + ", maxInactivePeriod=" + maxIdlePeriod 
+            + lastSentCsn + ", searchCriteria=" + searchCriteria + ", replicaId=" + replicaId
+            + ", refreshNPersist=" + refreshNPersist + ", maxInactivePeriod=" + maxIdlePeriod
             + ", purgeThresholdCount=" + purgeThresholdCount + ", journalFile=" + journalFile
             + ", dirty=" + dirty + ", consumerEntryDn=" + consumerEntryDn + "]";
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java Sun Feb 17 20:26:29 2013
@@ -24,6 +24,7 @@ package org.apache.directory.server.ldap
 import java.io.IOException;
 import java.util.Iterator;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
@@ -48,7 +49,7 @@ public class ReplicaJournalCursor extend
     private static final Logger LOG = LoggerFactory.getLogger( ReplicaJournalCursor.class );
 
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();

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=1447069&r1=1447068&r2=1447069&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 Sun Feb 17 20:26:29 2013
@@ -47,6 +47,7 @@ import org.apache.directory.api.ldap.ext
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncDoneValueDecorator;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueDecorator;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator;
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.entry.Attribute;
 import org.apache.directory.api.ldap.model.entry.Entry;
@@ -115,7 +116,7 @@ public class SyncReplRequestHandler impl
     private static final Logger LOG = LoggerFactory.getLogger( SyncReplRequestHandler.class );
 
     /** A logger for the replication provider */
-    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( "PROVIDER_LOG" );
+    private static final Logger PROVIDER_LOG = LoggerFactory.getLogger( Loggers.PROVIDER_LOG.getName() );
 
     /** Tells if the replication handler is already started */
     private boolean initialized = false;
@@ -145,9 +146,10 @@ public class SyncReplRequestHandler impl
     private ReplicaEventLogJanitor logJanitor;
 
     private AttributeType REPL_LOG_MAX_IDLE_AT;
-    
+
     private AttributeType REPL_LOG_PURGE_THRESHOLD_COUNT_AT;
 
+
     /**
      * Create a SyncReplRequestHandler empty instance 
      */
@@ -186,10 +188,10 @@ public class SyncReplRequestHandler impl
 
             REPL_LOG_MAX_IDLE_AT = dirService.getSchemaManager()
                 .lookupAttributeTypeRegistry( SchemaConstants.ADS_REPL_LOG_MAX_IDLE );
-            
+
             REPL_LOG_PURGE_THRESHOLD_COUNT_AT = dirService.getSchemaManager()
                 .lookupAttributeTypeRegistry( SchemaConstants.ADS_REPL_LOG_PURGE_THRESHOLD_COUNT );
-            
+
             // Get and create the replication directory if it does not exist
             syncReplData = dirService.getInstanceLayout().getReplDirectory();
 
@@ -241,13 +243,13 @@ public class SyncReplRequestHandler impl
     public void stop()
     {
         EventService evtSrv = dirService.getEventService();
-        
+
         evtSrv.removeListener( cledListener );
         //first set the 'stop' flag
         logJanitor.stopCleaning();
         //then interrupt the janitor
         logJanitor.interrupt();
-        
+
         for ( ReplicaEventLog log : replicaLogMap.values() )
         {
             try
@@ -1167,13 +1169,12 @@ public class SyncReplRequestHandler impl
         return replDir.listFiles( filter );
     }
 
-    
     /**
      * an event listener for handling deletions and updates of replication event log entries present under ou=consumers,ou=system
      */
     private class ConsumerLogEntryChangeListener extends DirectoryListenerAdapter
     {
-        
+
         private ReplicaEventLog getEventLog( OperationContext opCtx )
         {
             Dn consumerLogDn = opCtx.getDn();
@@ -1186,10 +1187,11 @@ public class SyncReplRequestHandler impl
                     return log;
                 }
             } // end of for
-            
+
             return null;
         }
-        
+
+
         @Override
         public void entryDeleted( DeleteOperationContext deleteContext )
         {
@@ -1197,48 +1199,48 @@ public class SyncReplRequestHandler impl
             synchronized ( this )
             {
                 ReplicaEventLog log = getEventLog( deleteContext );
-                if( log != null )
+                if ( log != null )
                 {
                     logJanitor.removeEventLog( log );
                 }
             } // end of synchronized block
         } // end of delete method
 
-        
+
         @Override
         public void entryModified( ModifyOperationContext modifyContext )
         {
             List<Modification> mods = modifyContext.getModItems();
-            
+
             // lock this listener instance
             synchronized ( this )
             {
-                for( Modification m : mods )
+                for ( Modification m : mods )
                 {
                     try
                     {
                         Attribute at = m.getAttribute();
-                        
-                        if( at.isInstanceOf( REPL_LOG_MAX_IDLE_AT ) )
+
+                        if ( at.isInstanceOf( REPL_LOG_MAX_IDLE_AT ) )
                         {
                             ReplicaEventLog log = getEventLog( modifyContext );
-                            if( log != null )
+                            if ( log != null )
                             {
                                 int maxIdlePeriod = Integer.parseInt( m.getAttribute().getString() );
                                 log.setMaxIdlePeriod( maxIdlePeriod );
                             }
                         }
-                        else if( at.isInstanceOf( REPL_LOG_PURGE_THRESHOLD_COUNT_AT ) )
+                        else if ( at.isInstanceOf( REPL_LOG_PURGE_THRESHOLD_COUNT_AT ) )
                         {
                             ReplicaEventLog log = getEventLog( modifyContext );
-                            if( log != null )
+                            if ( log != null )
                             {
                                 int purgeThreshold = Integer.parseInt( m.getAttribute().getString() );
                                 log.setPurgeThresholdCount( purgeThreshold );
                             }
                         }
                     }
-                    catch( LdapInvalidAttributeValueException e )
+                    catch ( LdapInvalidAttributeValueException e )
                     {
                         LOG.warn( "Invalid attribute type", e );
                     }

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/kerberos/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/kerberos/StoreUtils.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/kerberos/StoreUtils.java (original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/kerberos/StoreUtils.java Sun Feb 17 20:26:29 2013
@@ -22,6 +22,7 @@ package org.apache.directory.server.prot
 
 import java.nio.ByteBuffer;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.entry.StringValue;
@@ -53,7 +54,7 @@ public class StoreUtils
 {
     /** Loggers for this class */
     private static final Logger LOG = LoggerFactory.getLogger( StoreUtils.class );
-    private static final Logger LOG_KRB = LoggerFactory.getLogger( "KERBEROS" );
+    private static final Logger LOG_KRB = LoggerFactory.getLogger( Loggers.KERBEROS_LOG.getName() );
 
 
     /**

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java Sun Feb 17 20:26:29 2013
@@ -43,6 +43,7 @@ import org.apache.directory.api.ldap.ext
 import org.apache.directory.api.ldap.extras.controls.SynchronizationModeEnum;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueDecorator;
 import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator;
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.cursor.EntryCursor;
 import org.apache.directory.api.ldap.model.entry.Attribute;
@@ -97,16 +98,16 @@ public class MockSyncReplConsumer implem
 {
     /** the logger */
     private static final Logger LOG = LoggerFactory.getLogger( MockSyncReplConsumer.class );
-    
+
     /** A dedicated logger for the consumer */
-    private static final Logger CONSUMER_LOG = LoggerFactory.getLogger( "CONSUMER_LOG" );
+    private static final Logger CONSUMER_LOG = LoggerFactory.getLogger( Loggers.CONSUMER_LOG.getName() );
 
     /** The codec */
     private LdapApiService ldapCodecService = LdapApiServiceFactory.getSingleton();
 
     /** the syncrepl configuration */
     private SyncReplConfiguration config;
-    
+
     /** A field used to tell the thread it should stop */
     private volatile boolean stop = false;
 
@@ -135,9 +136,9 @@ public class MockSyncReplConsumer implem
     private AtomicInteger nbAdded = new AtomicInteger( 0 );
 
     private File cookieDir;
-    
+
     public static String COOKIES_DIR_NAME = "cookies";
-    
+
     /** attributes on which modification should be ignored */
     private static final String[] MOD_IGNORE_AT = new String[]
         {
@@ -241,12 +242,13 @@ public class MockSyncReplConsumer implem
                 {
                     connection.bind( config.getReplUserDn(), Strings.utf8ToString( config.getReplUserPassword() ) );
                     disconnected = false;
-                    
+
                     return true;
                 }
                 catch ( LdapException le )
                 {
-                    CONSUMER_LOG.warn( "Failed to bind to the producer {} with the given bind Dn {}", config.getProducer(), config.getReplUserDn() );
+                    CONSUMER_LOG.warn( "Failed to bind to the producer {} with the given bind Dn {}",
+                        config.getProducer(), config.getReplUserDn() );
                     LOG.warn( "Failed to bind to the server with the given bind Dn {}", config.getReplUserDn() );
                     LOG.warn( "", le );
                     disconnected = true;
@@ -254,7 +256,8 @@ public class MockSyncReplConsumer implem
             }
             else
             {
-                CONSUMER_LOG.warn( "Consumer {} cannot connect to producer {}", config.getReplicaId(), config.getProducer() );
+                CONSUMER_LOG.warn( "Consumer {} cannot connect to producer {}", config.getReplicaId(),
+                    config.getProducer() );
                 disconnected = true;
 
                 return false;
@@ -416,7 +419,7 @@ public class MockSyncReplConsumer implem
             byte[] cookie = syncInfoValue.getCookie();
 
             int replicaId = -1;
-            
+
             if ( cookie != null )
             {
                 LOG.debug( "setting the cookie from the sync info: " + Strings.utf8ToString( cookie ) );
@@ -513,6 +516,7 @@ public class MockSyncReplConsumer implem
         }
     }
 
+
     private ReplicationStatusEnum doRefreshOnly()
     {
         while ( !stop )
@@ -543,7 +547,7 @@ public class MockSyncReplConsumer implem
         return ReplicationStatusEnum.STOPPED;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -559,7 +563,7 @@ public class MockSyncReplConsumer implem
     public void ping()
     {
         boolean connected = !disconnected;
-        
+
         if ( disconnected )
         {
             connected = connect();
@@ -572,15 +576,17 @@ public class MockSyncReplConsumer implem
             try
             {
                 Entry baseDn = connection.lookup( config.getBaseDn(), "1.1" );
-                
+
                 if ( baseDn == null )
                 {
                     // Cannot get the entry : this is bad, but possible
-                    CONSUMER_LOG.debug( "Cannot fetch '{}' from provider for consumer {}", config.getBaseDn(), config.getReplicaId() );
+                    CONSUMER_LOG.debug( "Cannot fetch '{}' from provider for consumer {}", config.getBaseDn(),
+                        config.getReplicaId() );
                 }
                 else
                 {
-                    CONSUMER_LOG.debug( "Fetched '{}' from provider for consumer {}", config.getBaseDn(), config.getReplicaId() );
+                    CONSUMER_LOG.debug( "Fetched '{}' from provider for consumer {}", config.getBaseDn(),
+                        config.getReplicaId() );
                 }
             }
             catch ( LdapException le )
@@ -607,7 +613,7 @@ public class MockSyncReplConsumer implem
         {
             connected = connect();
         }
-        
+
         while ( !connected )
         {
             try
@@ -623,10 +629,10 @@ public class MockSyncReplConsumer implem
 
             connected = connect();
         }
-        
+
         // TODO : we may have cases were we get here with the connected flag to false. With the above
         // code, thi sis not possible
-        
+
         return connected;
     }
 
@@ -704,16 +710,16 @@ public class MockSyncReplConsumer implem
         {
             // log the error and handle it appropriately
             LOG.warn( "given replication base Dn {} is not found on provider", config.getBaseDn() );
-            
+
             LOG.warn( "disconnecting the consumer running in refreshAndPersist mode from the provider" );
             disconnect();
-            
+
             return ReplicationStatusEnum.DISCONNECTED;
         }
         else if ( resultCode == ResultCodeEnum.E_SYNC_REFRESH_REQUIRED )
         {
             LOG.info( "unable to perform the content synchronization cause E_SYNC_REFRESH_REQUIRED" );
-            
+
             try
             {
                 deleteRecursive( new Dn( config.getBaseDn() ), null );
@@ -728,9 +734,9 @@ public class MockSyncReplConsumer implem
             }
 
             removeCookie();
-            
+
             return ReplicationStatusEnum.REFRESH_REQUIRED;
-        } 
+        }
         else
         {
             return ReplicationStatusEnum.DISCONNECTED;
@@ -741,12 +747,12 @@ public class MockSyncReplConsumer implem
     public void disconnect()
     {
         disconnected = true;
-        
+
         if ( connection == null )
         {
             return;
         }
-        
+
         if ( connection.isConnected() )
         {
             try
@@ -755,13 +761,13 @@ public class MockSyncReplConsumer implem
                 {
                     refreshThread.stopRefreshing();
                 }
-    
+
                 connection.unBind();
                 LOG.info( "Unbound from the server {}", config.getRemoteHost() );
-    
+
                 connection.close();
                 LOG.info( "Connection closed for the server {}", config.getRemoteHost() );
-    
+
                 connection = null;
             }
             catch ( Exception e )
@@ -772,7 +778,7 @@ public class MockSyncReplConsumer implem
             {
                 // persist the cookie
                 storeCookie();
-                
+
                 // reset the cookie
                 syncCookie = null;
             }
@@ -797,11 +803,12 @@ public class MockSyncReplConsumer implem
 
         try
         {
-            if( cookieFile == null )
+            if ( cookieFile == null )
             {
-                cookieFile = new File( cookieDir, String.valueOf( LdapProtocolUtils.getReplicaId( new String( syncCookie ) ) ) );
+                cookieFile = new File( cookieDir, String.valueOf( LdapProtocolUtils.getReplicaId( new String(
+                    syncCookie ) ) ) );
             }
-            
+
             FileOutputStream fout = new FileOutputStream( cookieFile );
             fout.write( syncCookie.length );
             fout.write( syncCookie );

Modified: directory/apacheds/trunk/server-integ/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/resources/log4j.properties?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/resources/log4j.properties (original)
+++ directory/apacheds/trunk/server-integ/src/test/resources/log4j.properties Sun Feb 17 20:26:29 2013
@@ -29,18 +29,13 @@ log4j.appender.file.MaxFileSize=7168KB
 log4j.appender.file.MaxBackupIndex=100
 
 #log4j.logger.org=FATAL
-log4j.logger.ATTRIBUTE_TYPE=FATAL
-log4j.logger.SYNTAX_CHECKER=FATAL
-log4j.logger.MATCHING_RULE=FATAL
-log4j.logger.LDAP_SYNTAX=FATAL
 log4j.logger.org.apache.directory.server.core.partition.impl.btree.JdbmTable=FATAL
 log4j.logger.org.apache.directory.server.core.partition.impl.btree.JdbmIndex=FATAL
 log4j.logger.jdbm.recman.BaseRecordManager=FATAL
-log4j.logger.LOG_CHANGES=FATAL
-log4j.logger.net=FATAL
-log4j.logger.aci-logger=FATAL
+log4j.logger.org.apache.directory.LOG_CHANGES=FATAL
+log4j.logger.org.apache.directory.ACI_LOG=FATAL
 log4j.logger.org.apache.directory.server.core.partition.impl.btree.jdbm.DupsCursor=FATAL
-log4j.logger.CURSOR=FATAL
+log4j.logger.org.apache.directory.CURSOR_LOG=FATAL
 log4j.logger.org.apache.directory.api.asn1.ber=FATAL
 log4j.logger.org.apache.directory.server.core.partition.ldif=FATAL
 log4j.logger.org.apache.directory.api.ldap=FATAL
@@ -49,6 +44,6 @@ log4j.logger.org.apache.directory.server
 log4j.logger.org.apache.directory.server.core.admin=FATAL
 log4j.logger.org.apache.directory.ldap.client.api=FATAL
 log4j.logger.org.apache.directory.server.ldap.replication.provider=FATAL
-log4j.logger.PROVIDER_LOG=FATAL
-log4j.logger.CONSUMER_LOG=FATAL
+log4j.logger.org.apache.directory.PROVIDER_LOG=FATAL
+log4j.logger.org.apache.directory.CONSUMER_LOG=FATAL
 log4j.logger.org.apache.directory.server.replication.MockSyncReplConsumer=FATAL

Modified: directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (original)
+++ directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java Sun Feb 17 20:26:29 2013
@@ -67,7 +67,7 @@ import org.slf4j.LoggerFactory;
  */
 public class ApacheDS
 {
-    private static final Logger LOG = LoggerFactory.getLogger( ApacheDS.class.getName() );
+    private static final Logger LOG = LoggerFactory.getLogger( ApacheDS.class );
 
     /** Default delay between two flushes to the backend */
     private static final long DEFAULT_SYNC_PERIOD_MILLIS = 20000;

Modified: directory/apacheds/trunk/service/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service/log4j.properties?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/service/log4j.properties (original)
+++ directory/apacheds/trunk/service/log4j.properties Sun Feb 17 20:26:29 2013
@@ -36,18 +36,13 @@ log4j.logger.org.apache.directory.api.co
 log4j.logger.org.apache.directory.api.asn1=FATAL
 log4j.logger.org.apache.directory.server.schema.registries=FATAL
 #log4j.logger.org.apache.directory.server.ldap.handlers=FATAL
-log4j.logger.ATTRIBUTE_TYPE=FATAL
-log4j.logger.SYNTAX_CHECKER=FATAL
-log4j.logger.MATCHING_RULE=FATAL
-log4j.logger.LDAP_SYNTAX=FATAL
-log4j.logger.JdbmTable=FATAL
-log4j.logger.JdbmIndex=FATAL
-log4j.logger.BaseRecordManager=FATAL
-log4j.logger.LOG_CHANGES=FATAL
-log4j.logger.net=FATAL
-log4j.logger.aci-logger=FATAL
-log4j.logger.DupsCursor=FATAL
-log4j.logger.CURSOR=FATAL
+log4j.logger.org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable=FATAL
+log4j.logger.org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex=FATAL
+log4j.logger.jdbm.recman.BaseRecordManager=FATAL
+log4j.logger.org.apache.directory.LOG_CHANGES=FATAL
+log4j.logger.org.apache.directory.ACI_LOG=FATAL
+log4j.logger.org.apache.directory.server.core.partition.impl.btree.jdbm.DupsCursor=FATAL
+log4j.logger.org.apache.directory.CURSOR_LOG=FATAL
 log4j.logger.org.apache.directory.api.asn1.ber=FATAL
 log4j.logger.org.apache.directory.server.core.partition.ldif=FATAL
 log4j.logger.org.apache.directory.api.ldap=FATAL
@@ -56,9 +51,9 @@ log4j.logger.org.apache.directory.server
 log4j.logger.org.apache.directory.server.core.admin=FATAL
 log4j.logger.org.apache.directory.ldap.client.api=FATAL
 log4j.logger.org.apache.directory.server.ldap.replication.provider=FATAL
-log4j.logger.PROVIDER_LOG=FATAL
-log4j.logger.CONSUMER_LOG=FATAL
-org.apache.directory.server.replication.MockSyncReplConsumer=FATAL
+log4j.logger.org.apache.directory.PROVIDER_LOG=FATAL
+log4j.logger.org.apache.directory.CONSUMER_LOG=FATAL
+log4j.logger.org.apache.directory.server.replication.MockSyncReplConsumer=FATAL
 
 
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java Sun Feb 17 20:26:29 2013
@@ -22,6 +22,7 @@ package org.apache.directory.server.core
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.api.ldap.model.cursor.ClosureMonitor;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
@@ -44,7 +45,7 @@ import org.slf4j.LoggerFactory;
 public class EntryCursorAdaptor extends AbstractCursor<Entry>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -59,7 +60,7 @@ public class EntryCursorAdaptor extends 
         {
             LOG_CURSOR.debug( "Creating EntryCursorAdaptor {}", this );
         }
-        
+
         indexCursor = searchResult.getResultSet();
         evaluator = searchResult.getEvaluator();
     }
@@ -128,7 +129,7 @@ public class EntryCursorAdaptor extends 
         {
             LOG_CURSOR.debug( "Closing EntryCursorAdaptor {}", this );
         }
-        
+
         indexCursor.close();
     }
 
@@ -142,7 +143,7 @@ public class EntryCursorAdaptor extends 
         {
             LOG_CURSOR.debug( "Closing EntryCursorAdaptor {}", this );
         }
-        
+
         indexCursor.close( cause );
     }
 
@@ -169,14 +170,14 @@ public class EntryCursorAdaptor extends 
             {
                 Entry entry = indexEntry.getEntry();
                 indexEntry.setEntry( null );
-                
+
                 return entry;
             }
             else
             {
                 indexEntry.setEntry( null );
             }
-    
+
             return null;
         }
         catch ( Exception e )
@@ -203,7 +204,7 @@ public class EntryCursorAdaptor extends 
         return indexCursor.last();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -220,7 +221,7 @@ public class EntryCursorAdaptor extends 
     {
         return indexCursor.previous();
     }
-    
+
 
     /**
      * @see Object#toString()
@@ -228,25 +229,25 @@ public class EntryCursorAdaptor extends 
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( tabs ).append( "EntryCursorAdaptor\n" );
-        
+
         if ( indexCursor != null )
         {
             sb.append( tabs ).append( "    " ).append( "IndexCursor : \n" );
             sb.append( indexCursor.toString( tabs + "        " ) );
         }
-        
+
         if ( evaluator != null )
         {
             sb.append( tabs ).append( "    " ).append( "Evaluator : \n" );
             sb.append( evaluator.toString( tabs + "        " ) );
         }
-        
+
         return sb.toString();
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java Sun Feb 17 20:26:29 2013
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.util.Iterator;
 
 import org.apache.directory.api.i18n.I18n;
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.ClosureMonitor;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
@@ -45,7 +46,7 @@ import org.slf4j.LoggerFactory;
 public class IndexCursorAdaptor<K> extends AbstractIndexCursor<K>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -195,7 +196,7 @@ public class IndexCursorAdaptor<K> exten
         {
             LOG_CURSOR.debug( "Closing IndexCursorAdaptor {}", this );
         }
-        
+
         wrappedCursor.close();
     }
 
@@ -209,7 +210,7 @@ public class IndexCursorAdaptor<K> exten
         {
             LOG_CURSOR.debug( "Closing IndexCursorAdaptor {}", this );
         }
-        
+
         wrappedCursor.close( reason );
     }
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java Sun Feb 17 20:26:29 2013
@@ -21,6 +21,7 @@ package org.apache.directory.server.xdbm
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.api.ldap.model.exception.LdapException;
@@ -37,11 +38,12 @@ import org.slf4j.LoggerFactory;
 public class EmptyIndexCursor<K> extends AbstractIndexCursor<K>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
 
+
     public EmptyIndexCursor()
     {
         if ( IS_DEBUG )
@@ -173,7 +175,7 @@ public class EmptyIndexCursor<K> extends
         {
             LOG_CURSOR.debug( "Closing EmptyIndexCursor {}", this );
         }
-        
+
         super.close();
     }
 
@@ -187,7 +189,7 @@ public class EmptyIndexCursor<K> extends
         {
             LOG_CURSOR.debug( "Closing EmptyIndexCursor {}", this );
         }
-        
+
         super.close( cause );
     }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/KeyTupleArrayCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/KeyTupleArrayCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/KeyTupleArrayCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/KeyTupleArrayCursor.java Sun Feb 17 20:26:29 2013
@@ -21,6 +21,7 @@ package org.apache.directory.server.xdbm
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException;
@@ -43,7 +44,7 @@ import org.slf4j.LoggerFactory;
 public class KeyTupleArrayCursor<K, V> extends AbstractCursor<Tuple<K, V>>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -180,7 +181,7 @@ public class KeyTupleArrayCursor<K, V> e
     public boolean first() throws LdapException, CursorException, IOException
     {
         beforeFirst();
-        
+
         return next();
     }
 
@@ -191,7 +192,7 @@ public class KeyTupleArrayCursor<K, V> e
     public boolean last() throws LdapException, CursorException, IOException
     {
         afterLast();
-        
+
         return previous();
     }
 
@@ -242,7 +243,7 @@ public class KeyTupleArrayCursor<K, V> e
     public Tuple<K, V> get() throws CursorException, IOException
     {
         checkNotClosed( "get()" );
-        
+
         if ( valueAvailable )
         {
             return returnedTuple;

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java Sun Feb 17 20:26:29 2013
@@ -21,6 +21,7 @@ package org.apache.directory.server.xdbm
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.api.ldap.model.exception.LdapException;
@@ -37,7 +38,7 @@ import org.slf4j.LoggerFactory;
 public class SingletonIndexCursor<V> extends AbstractIndexCursor<V>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -54,7 +55,7 @@ public class SingletonIndexCursor<V> ext
         {
             LOG_CURSOR.debug( "Creating SingletonIndexCursor {}", this );
         }
-        
+
         this.singleton = singleton;
     }
 
@@ -154,7 +155,7 @@ public class SingletonIndexCursor<V> ext
     /**
      * {@inheritDoc}
      */
-    public boolean isBeforeFirst() 
+    public boolean isBeforeFirst()
     {
         return beforeFirst;
     }
@@ -246,7 +247,7 @@ public class SingletonIndexCursor<V> ext
         {
             LOG_CURSOR.debug( "Closing SingletonIndexCursor {}", this );
         }
-        
+
         super.close();
     }
 
@@ -260,7 +261,7 @@ public class SingletonIndexCursor<V> ext
         {
             LOG_CURSOR.debug( "Closing SingletonIndexCursor {}", this );
         }
-        
+
         super.close( cause );
     }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java Sun Feb 17 20:26:29 2013
@@ -22,6 +22,7 @@ package org.apache.directory.server.xdbm
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
@@ -49,7 +50,7 @@ public class AvlTableDupsCursor<K, V> ex
     private static final Logger LOG = LoggerFactory.getLogger( AvlTableDupsCursor.class );
 
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java Sun Feb 17 20:26:29 2013
@@ -22,6 +22,7 @@ package org.apache.directory.server.xdbm
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.exception.LdapException;
@@ -41,7 +42,7 @@ import org.slf4j.LoggerFactory;
 public class AllEntriesCursor extends AbstractIndexCursor<String>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -73,7 +74,7 @@ public class AllEntriesCursor extends Ab
         {
             LOG_CURSOR.debug( "Creating AllEntriesCursor {}", this );
         }
-        
+
         // Uses the MasterTable 
         wrapped = new IndexCursorAdaptor( store.getMasterTable().cursor(), true );
     }
@@ -201,7 +202,7 @@ public class AllEntriesCursor extends Ab
         {
             LOG_CURSOR.debug( "Closing AllEntriesCursor {}", this );
         }
-        
+
         wrapped.close();
     }
 
@@ -216,7 +217,7 @@ public class AllEntriesCursor extends Ab
         {
             LOG_CURSOR.debug( "Closing AllEntriesCursor {}", this );
         }
-        
+
         wrapped.close( cause );
     }
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java Sun Feb 17 20:26:29 2013
@@ -25,6 +25,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException;
@@ -47,7 +48,7 @@ import org.slf4j.LoggerFactory;
 public class AndCursor<V> extends AbstractIndexCursor<V>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -76,7 +77,7 @@ public class AndCursor<V> extends Abstra
         {
             LOG_CURSOR.debug( "Creating AndCursor {}", this );
         }
-        
+
         this.wrapped = wrapped;
         this.evaluators = optimize( evaluators );
     }
@@ -201,7 +202,7 @@ public class AndCursor<V> extends Abstra
         {
             LOG_CURSOR.debug( "Closing AndCursor {}", this );
         }
-        
+
         super.close();
         wrapped.close();
     }
@@ -216,7 +217,7 @@ public class AndCursor<V> extends Abstra
         {
             LOG_CURSOR.debug( "Closing AndCursor {}", this );
         }
-        
+
         super.close( cause );
         wrapped.close( cause );
     }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java Sun Feb 17 20:26:29 2013
@@ -22,6 +22,7 @@ package org.apache.directory.server.xdbm
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException;
@@ -53,7 +54,7 @@ import org.slf4j.LoggerFactory;
 public class ApproximateCursor<V> extends AbstractIndexCursor<V>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -84,7 +85,7 @@ public class ApproximateCursor<V> extend
         {
             LOG_CURSOR.debug( "Creating ApproximateCursor {}", this );
         }
-        
+
         this.approximateEvaluator = approximateEvaluator;
 
         AttributeType attributeType = approximateEvaluator.getExpression().getAttributeType();
@@ -304,7 +305,7 @@ public class ApproximateCursor<V> extend
         {
             LOG_CURSOR.debug( "Closing ApproximateCursor {}", this );
         }
-        
+
         super.close();
 
         if ( userIdxCursor != null )
@@ -327,7 +328,7 @@ public class ApproximateCursor<V> extend
         {
             LOG_CURSOR.debug( "Closing ApproximateCursor {}", this );
         }
-        
+
         super.close( cause );
 
         if ( userIdxCursor != null )

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java Sun Feb 17 20:26:29 2013
@@ -22,6 +22,7 @@ package org.apache.directory.server.xdbm
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.exception.LdapException;
@@ -43,7 +44,7 @@ import org.slf4j.LoggerFactory;
 public class ChildrenCursor extends AbstractIndexCursor<String>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -73,7 +74,7 @@ public class ChildrenCursor extends Abst
     {
         this.parentId = parentId;
         this.cursor = cursor;
-        
+
         if ( IS_DEBUG )
         {
             LOG_CURSOR.debug( "Creating ChildrenCursor {}", this );
@@ -201,7 +202,7 @@ public class ChildrenCursor extends Abst
         {
             LOG_CURSOR.debug( "Closing ChildrenCursor {}", this );
         }
-        
+
         cursor.close();
 
         super.close();
@@ -218,7 +219,7 @@ public class ChildrenCursor extends Abst
         {
             LOG_CURSOR.debug( "Closing ChildrenCursor {}", this );
         }
-        
+
         cursor.close( cause );
 
         super.close( cause );

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java Sun Feb 17 20:26:29 2013
@@ -23,6 +23,7 @@ package org.apache.directory.server.xdbm
 import java.io.IOException;
 
 import org.apache.commons.collections.ArrayStack;
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.exception.LdapException;
@@ -46,7 +47,7 @@ import org.slf4j.LoggerFactory;
 public class DescendantCursor extends AbstractIndexCursor<String>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -132,6 +133,7 @@ public class DescendantCursor extends Ab
         return UNSUPPORTED_MSG;
     }
 
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java?rev=1447069&r1=1447068&r2=1447069&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java Sun Feb 17 20:26:29 2013
@@ -22,6 +22,7 @@ package org.apache.directory.server.xdbm
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
 import org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException;
@@ -51,7 +52,7 @@ import org.slf4j.LoggerFactory;
 public class EqualityCursor<V> extends AbstractIndexCursor<V>
 {
     /** A dedicated log for cursors */
-    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( "CURSOR" );
+    private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
@@ -82,7 +83,7 @@ public class EqualityCursor<V> extends A
         {
             LOG_CURSOR.debug( "Creating EqualityCursor {}", this );
         }
-        
+
         this.equalityEvaluator = equalityEvaluator;
 
         AttributeType attributeType = equalityEvaluator.getExpression().getAttributeType();
@@ -304,7 +305,7 @@ public class EqualityCursor<V> extends A
         {
             LOG_CURSOR.debug( "Closing EqualityCursor {}", this );
         }
-        
+
         super.close();
 
         if ( userIdxCursor != null )
@@ -327,7 +328,7 @@ public class EqualityCursor<V> extends A
         {
             LOG_CURSOR.debug( "Closing EqualityCursor {}", this );
         }
-        
+
         super.close( cause );
 
         if ( userIdxCursor != null )



Mime
View raw message