directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1065336 - in /directory/apacheds/trunk: protocol-ldap/src/main/java/org/apache/directory/server/ldap/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/handl...
Date Sun, 30 Jan 2011 17:57:35 GMT
Author: akarasulu
Date: Sun Jan 30 17:57:34 2011
New Revision: 1065336

URL: http://svn.apache.org/viewvc?rev=1065336&view=rev
Log:
fixing compilation errors

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
    directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
    directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupPerfIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java Sun Jan 30 17:57:34 2011
@@ -21,12 +21,14 @@ package org.apache.directory.server.ldap
 
 
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.decorators.MessageDecorator;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.model.exception.ResponseCarryingMessageException;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequestImpl;
+import org.apache.directory.shared.ldap.model.message.Message;
 import org.apache.directory.shared.ldap.model.message.Request;
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.model.message.ResultResponse;
@@ -87,7 +89,9 @@ class LdapProtocolHandler extends Demuxi
         session.setAttribute( "maxPDUSize", ldapServer.getDirectoryService().getMaxPDUSize() );
         
         // Last, store the message container
-        LdapMessageContainer ldapMessageContainer = new LdapMessageContainer( 
+        LdapMessageContainer<? extends MessageDecorator<Message>> ldapMessageContainer = 
+            new LdapMessageContainer<MessageDecorator<Message>>( 
+            ldapServer.getDirectoryService().getLdapCodecService(),
             new BinaryAttributeDetector()
             {
                 public boolean isBinary( String id )

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java Sun Jan 30 17:57:34 2011
@@ -460,7 +460,8 @@ public class SearchHandler extends LdapR
                 }
             }
 
-            pagedResultsControl = new PagedResultsDecorator();
+            pagedResultsControl = new PagedResultsDecorator( ldapServer.getDirectoryService()
+                .getLdapCodecService() );
             pagedResultsControl.setCritical( true );
             pagedResultsControl.setSize( 0 );
             req.getResultResponse().addControl( pagedResultsControl );
@@ -517,7 +518,8 @@ public class SearchHandler extends LdapR
             // cursor stored into the session (if any)
             int cookieValue = pagedSearchControl.getCookieValue();
             PagedSearchContext psCookie = session.removePagedSearchContext( cookieValue );
-            pagedResultsControl = new PagedResultsDecorator();
+            pagedResultsControl = new PagedResultsDecorator( ldapServer.getDirectoryService()
+                .getLdapCodecService() );
             pagedResultsControl.setCookie( psCookie.getCookie() );
             pagedResultsControl.setSize( 0 );
             pagedResultsControl.setCritical( true );
@@ -532,7 +534,8 @@ public class SearchHandler extends LdapR
         }
         else
         {
-            pagedResultsControl = new PagedResultsDecorator();
+            pagedResultsControl = new PagedResultsDecorator( ldapServer.getDirectoryService()
+                .getLdapCodecService() );
             pagedResultsControl.setSize( 0 );
             pagedResultsControl.setCritical( true );
         }
@@ -649,7 +652,8 @@ public class SearchHandler extends LdapR
 
                 session.addPagedSearchContext( pagedContext );
                 cookie = pagedContext.getCookie();
-                pagedResultsControl = new PagedResultsDecorator();
+                pagedResultsControl = new PagedResultsDecorator( ldapServer.getDirectoryService()
+                    .getLdapCodecService() );
                 pagedResultsControl.setCookie( cookie );
                 pagedResultsControl.setSize( 0 );
                 pagedResultsControl.setCritical( true );
@@ -688,7 +692,8 @@ public class SearchHandler extends LdapR
 
                 // get the cookie
                 cookie = pagedContext.getCookie();
-                pagedResultsControl = new PagedResultsDecorator();
+                pagedResultsControl = new PagedResultsDecorator( ldapServer.getDirectoryService()
+                    .getLdapCodecService() );
                 pagedResultsControl.setCookie( cookie );
                 pagedResultsControl.setSize( 0 );
                 pagedResultsControl.setCritical( true );
@@ -711,7 +716,8 @@ public class SearchHandler extends LdapR
                 session.addPagedSearchContext( pagedContext );
 
                 cookie = pagedContext.getCookie();
-                pagedResultsControl = new PagedResultsDecorator();
+                pagedResultsControl = new PagedResultsDecorator( ldapServer.getDirectoryService()
+                    .getLdapCodecService() );
                 pagedResultsControl.setCookie( cookie );
                 pagedResultsControl.setSize( 0 );
                 pagedResultsControl.setCritical( true );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java Sun Jan 30 17:57:34 2011
@@ -240,7 +240,8 @@ public abstract class AbstractSaslCallba
         {
             Control[] connCtls = bindRequest.getControls().values().toArray( EMPTY );
             env.put( DirectoryService.JNDI_KEY, directoryService );
-            ctx = new InitialLdapContext( env, JndiUtils.toJndiControls( connCtls ) );
+            ctx = new InitialLdapContext( env, JndiUtils.toJndiControls( directoryService.getLdapCodecService(), 
+                connCtls ) );
         }
         catch ( Exception e )
         {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java Sun Jan 30 17:57:34 2011
@@ -29,6 +29,8 @@ import java.util.Iterator;
 
 import org.apache.directory.server.core.event.EventType;
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.SyncModifyDnDecorator;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
@@ -59,11 +61,14 @@ public class ReplicaEventMessage impleme
     private static final Logger LOG = LoggerFactory.getLogger( ReplicaEventMessage.class );
 
     private static SchemaManager schemaManager;
+    
+    private transient ILdapCodecService codec;
 
 
     public ReplicaEventMessage()
     {
         // used by deserializer
+        codec = new DefaultLdapCodecService();
     }
 
 
@@ -76,6 +81,7 @@ public class ReplicaEventMessage impleme
 
     public ReplicaEventMessage( SyncModifyDnDecorator modDnControl, Entry entry )
     {
+        codec = new DefaultLdapCodecService();
         this.modDnControl = modDnControl;
         this.entry = entry;
     }
@@ -107,7 +113,7 @@ public class ReplicaEventMessage impleme
         {
             SyncModifyDnType modDnType = SyncModifyDnType.getModifyDnType( in.readShort() );
             
-            modDnControl = new SyncModifyDnDecorator();
+            modDnControl = new SyncModifyDnDecorator( codec );
             modDnControl.setModDnType( modDnType );
             
             modDnControl.setEntryDn( Unicode.readUTF(in) );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java Sun Jan 30 17:57:34 2011
@@ -42,16 +42,12 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaITDecorator;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.ISyncDoneValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueDecorator;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControlDecoder;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.ISyncInfoValue;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueControlDecoder;
+import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueDecorator;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.SyncRequestValueDecorator;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.ISyncStateValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueDecorator;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueControlDecoder;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.ISyncModifyDn;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.SyncModifyDnDecorator;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.SyncModifyDnDecorator;
 import org.apache.directory.shared.ldap.message.control.replication.SyncModifyDnType;
 import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationModeEnum;
@@ -125,9 +121,6 @@ public class SyncReplConsumer implements
     /** the schema manager */
     private SchemaManager schemaManager;
 
-    /** the decoder for syncinfovalue control */
-    private SyncInfoValueControlDecoder decoder = new SyncInfoValueControlDecoder();
-
     /** the cookie file */
     private File cookieFile;
 
@@ -137,12 +130,6 @@ public class SyncReplConsumer implements
     /** the core session */
     private CoreSession session;
 
-    private SyncDoneValueControlDecoder syncDoneControlDecoder = new SyncDoneValueControlDecoder();
-
-    private SyncStateValueControlDecoder syncStateControlDecoder = new SyncStateValueControlDecoder();
-
-    private SyncModifyDnControlDecoder syncModifyDnControlDecoder = new SyncModifyDnControlDecoder();
-
     /** attributes on which modification should be ignored */
     private static final String[] MOD_IGNORE_AT = new String[]
         { SchemaConstants.ENTRY_UUID_AT, SchemaConstants.ENTRY_CSN_AT, SchemaConstants.MODIFIERS_NAME_AT,
@@ -278,7 +265,7 @@ public class SyncReplConsumer implements
 
         if ( !config.isChaseReferrals() )
         {
-            searchRequest.addControl( new ManageDsaITDecorator() );
+            searchRequest.addControl( new ManageDsaITDecorator( directoryService.getLdapCodecService() ) );
         }
     }
 
@@ -288,18 +275,8 @@ public class SyncReplConsumer implements
         LOG.debug( "///////////////// handleSearchDone //////////////////" );
 
         Control ctrl = searchDone.getControls().get( ISyncDoneValue.OID );
-        SyncDoneValueDecorator syncDoneCtrl = new SyncDoneValueDecorator();
-        try
-        {
-            if ( ctrl != null )
-            {
-                syncDoneCtrl = ( SyncDoneValueDecorator ) syncDoneControlDecoder.decode( ctrl.getValue(), syncDoneCtrl );
-            }
-        }
-        catch ( Exception e )
-        {
-            LOG.error( "Failed to decode the syncDoneControlCodec", e );
-        }
+        SyncDoneValueDecorator syncDoneCtrl = new SyncDoneValueDecorator( directoryService.getLdapCodecService() );
+        syncDoneCtrl.setDecorated( ( ISyncDoneValue ) ctrl );
 
         if ( syncDoneCtrl.getCookie() != null )
         {
@@ -326,23 +303,13 @@ public class SyncReplConsumer implements
 
         LOG.debug( "------------- starting handleSearchResult ------------" );
 
-        SyncStateValueDecorator syncStateCtrl = new SyncStateValueDecorator();
+        SyncStateValueDecorator syncStateCtrl = new SyncStateValueDecorator( directoryService.getLdapCodecService() );
 
         try
         {
             Entry remoteEntry = syncResult.getEntry();
 
-            Control ctrl = syncResult.getControls().get( ISyncStateValue.OID );
-
-            try
-            {
-                syncStateCtrl = ( SyncStateValueDecorator ) syncStateControlDecoder.decode( ctrl.getValue(),
-                    syncStateCtrl );
-            }
-            catch ( Exception e )
-            {
-                LOG.error( "Failed to decode syncStateControl", e );
-            }
+            syncStateCtrl.setDecorated( syncStateCtrl );
 
             if ( syncStateCtrl.getCookie() != null )
             {
@@ -386,12 +353,9 @@ public class SyncReplConsumer implements
                 case MODDN:
                     Control adsModDnControl = syncResult.getControls().get( ISyncModifyDn.OID );
                     //Apache Directory Server's special control
-                    SyncModifyDnDecorator syncModDnControl = new SyncModifyDnDecorator();
-
-                    LOG.debug( "decoding the SyncModifyDnControl.." );
-                    syncModDnControl = ( SyncModifyDnDecorator ) syncModifyDnControlDecoder.decode( adsModDnControl
-                        .getValue(), syncModDnControl );
-
+                    SyncModifyDnDecorator syncModDnControl = 
+                        new SyncModifyDnDecorator( directoryService.getLdapCodecService() );
+                    syncModDnControl.setDecorated( ( ISyncModifyDn ) adsModDnControl );
                     applyModDnOperation( syncModDnControl );
                     break;
 
@@ -432,8 +396,10 @@ public class SyncReplConsumer implements
         {
             LOG.debug( "............... inside handleSyncInfo ..............." );
 
+            SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( directoryService.getLdapCodecService() );
             byte[] syncinfo = syncInfoResp.getResponseValue();
-            ISyncInfoValue syncInfoValue = ( ISyncInfoValue ) decoder.decode( syncinfo, null );
+            decorator.setValue( syncinfo );
+            ISyncInfoValue syncInfoValue = decorator.getDecorated();
 
             byte[] cookie = syncInfoValue.getCookie();
 
@@ -537,7 +503,7 @@ public class SyncReplConsumer implements
      */
     private void doSyncSearch( SynchronizationModeEnum syncType, boolean reloadHint ) throws Exception
     {
-        SyncRequestValueDecorator syncReq = new SyncRequestValueDecorator();
+        SyncRequestValueDecorator syncReq = new SyncRequestValueDecorator( directoryService.getLdapCodecService() );
 
         syncReq.setMode( syncType );
         syncReq.setReloadHint( reloadHint );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java Sun Jan 30 17:57:34 2011
@@ -328,7 +328,9 @@ public class SyncReplProvider implements
             IntermediateResponse intermResp = new IntermediateResponseImpl( req.getMessageId() );
             intermResp.setResponseName( ISyncInfoValue.OID );
 
-            SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator( SynchronizationInfoEnum.NEW_COOKIE );
+            SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator( ldapServer.getDirectoryService()
+                .getLdapCodecService(),
+                SynchronizationInfoEnum.NEW_COOKIE );
             syncInfo.setCookie( cookie );
             intermResp.setResponseValue( syncInfo.getValue() );
 
@@ -340,7 +342,8 @@ public class SyncReplProvider implements
         {
             SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();
             searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
-            SyncDoneValueDecorator syncDone = new SyncDoneValueDecorator();
+            SyncDoneValueDecorator syncDone = new SyncDoneValueDecorator( 
+                ldapServer.getDirectoryService().getLdapCodecService() );
             syncDone.setCookie( cookie );
             searchDoneResp.addControl( syncDone );
 
@@ -421,7 +424,8 @@ public class SyncReplProvider implements
                 IntermediateResponse intermResp = new IntermediateResponseImpl( req.getMessageId() );
                 intermResp.setResponseName( ISyncInfoValue.OID );
 
-                SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator( SynchronizationInfoEnum.NEW_COOKIE );
+                SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator( 
+                    ldapServer.getDirectoryService().getLdapCodecService(), SynchronizationInfoEnum.NEW_COOKIE );
                 syncInfo.setCookie( cookie );
                 intermResp.setResponseValue( syncInfo.getValue() );
 
@@ -433,7 +437,8 @@ public class SyncReplProvider implements
             else
             {
                 // no need to send from the log, that will be done in the next refreshOnly session
-                SyncDoneValueDecorator syncDone = new SyncDoneValueDecorator();
+                SyncDoneValueDecorator syncDone = new SyncDoneValueDecorator(
+                    ldapServer.getDirectoryService().getLdapCodecService() );
                 syncDone.setCookie( cookie );
                 searchDoneResp.addControl( syncDone );
                 session.getIoSession().write( searchDoneResp );
@@ -561,7 +566,8 @@ public class SyncReplProvider implements
     {
 
         EntryAttribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );
-        SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator();
+        SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator(
+            ldapServer.getDirectoryService().getLdapCodecService() );
         syncStateControl.setSyncStateType( syncStateType );
         syncStateControl.setEntryUUID( Strings.uuidToBytes(uuid.getString()) );
 
@@ -585,7 +591,8 @@ public class SyncReplProvider implements
     {
 
         EntryAttribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );
-        SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator();
+        SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator(
+            ldapServer.getDirectoryService().getLdapCodecService() );
         syncStateControl.setSyncStateType( SyncStateTypeEnum.MODDN );
         syncStateControl.setEntryUUID( Strings.uuidToBytes(uuid.getString()) );
 
@@ -986,7 +993,8 @@ public class SyncReplProvider implements
     {
         SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();
         searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.E_SYNC_REFRESH_REQUIRED );
-        SyncDoneValueDecorator syncDone = new SyncDoneValueDecorator();
+        SyncDoneValueDecorator syncDone = new SyncDoneValueDecorator(
+            ldapServer.getDirectoryService().getLdapCodecService() );
         searchDoneResp.addControl( syncDone );
 
         session.getIoSession().write( searchDoneResp );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java Sun Jan 30 17:57:34 2011
@@ -145,7 +145,8 @@ public class SyncReplSearchListener impl
                 respEntry.setObjectName( entry.getDn() );
                 respEntry.setEntry( entry );
 
-                SyncStateValueDecorator syncAdd = new SyncStateValueDecorator();
+                SyncStateValueDecorator syncAdd = new SyncStateValueDecorator( 
+                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                 syncAdd.setSyncStateType( SyncStateTypeEnum.ADD );
                 syncAdd
                     .setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT).getString()) );
@@ -186,7 +187,8 @@ public class SyncReplSearchListener impl
                 respEntry.setObjectName( entry.getDn() );
                 respEntry.setEntry( entry );
 
-                SyncStateValueDecorator syncDelete = new SyncStateValueDecorator();
+                SyncStateValueDecorator syncDelete = new SyncStateValueDecorator( 
+                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                 syncDelete.setSyncStateType( SyncStateTypeEnum.DELETE );
                 syncDelete.setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT)
                         .getString()) );
@@ -225,7 +227,8 @@ public class SyncReplSearchListener impl
                 respEntry.setObjectName( modifyContext.getDn() );
                 respEntry.setEntry( alteredEntry );
 
-                SyncStateValueDecorator syncModify = new SyncStateValueDecorator();
+                SyncStateValueDecorator syncModify = new SyncStateValueDecorator( 
+                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                 syncModify.setSyncStateType( SyncStateTypeEnum.MODIFY );
                 syncModify.setEntryUUID( Strings.uuidToBytes(alteredEntry.get(SchemaConstants.ENTRY_UUID_AT)
                         .getString()) );
@@ -263,7 +266,9 @@ public class SyncReplSearchListener impl
                 return;
             }
 
-            SyncModifyDnDecorator modDnControl = new SyncModifyDnDecorator( SyncModifyDnType.MOVE );
+            SyncModifyDnDecorator modDnControl = new SyncModifyDnDecorator( 
+                session.getLdapServer().getDirectoryService().getLdapCodecService(),
+                SyncModifyDnType.MOVE );
             modDnControl.setEntryDn( moveContext.getDn().getNormName() );
             modDnControl.setNewSuperiorDn( moveContext.getNewSuperior().getNormName() );
 
@@ -273,7 +278,8 @@ public class SyncReplSearchListener impl
                 respEntry.setObjectName( moveContext.getDn() );
                 respEntry.setEntry( entry );
 
-                SyncStateValueDecorator syncModify = new SyncStateValueDecorator();
+                SyncStateValueDecorator syncModify = new SyncStateValueDecorator(
+                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                 syncModify.setSyncStateType( SyncStateTypeEnum.MODDN );
                 syncModify.setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT)
                         .getString()) );
@@ -310,7 +316,9 @@ public class SyncReplSearchListener impl
                 return;
             }
 
-            SyncModifyDnDecorator modDnControl = new SyncModifyDnDecorator( SyncModifyDnType.MOVEANDRENAME );
+            SyncModifyDnDecorator modDnControl = new SyncModifyDnDecorator( 
+                session.getLdapServer().getDirectoryService().getLdapCodecService(),
+                SyncModifyDnType.MOVEANDRENAME );
             modDnControl.setEntryDn( moveAndRenameContext.getDn().getNormName() );
             modDnControl.setNewSuperiorDn( moveAndRenameContext.getNewSuperiorDn().getNormName() );
             modDnControl.setNewRdn( moveAndRenameContext.getNewRdn().getNormName() );
@@ -324,7 +332,8 @@ public class SyncReplSearchListener impl
                 respEntry.setObjectName( moveAndRenameContext.getModifiedEntry().getDn() );
                 respEntry.setEntry( alteredEntry );
 
-                SyncStateValueDecorator syncModify = new SyncStateValueDecorator();
+                SyncStateValueDecorator syncModify = new SyncStateValueDecorator(
+                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                 syncModify.setSyncStateType( SyncStateTypeEnum.MODDN );
                 syncModify.setEntryUUID( Strings.uuidToBytes(alteredEntry.get(SchemaConstants.ENTRY_UUID_AT)
                         .getString()) );
@@ -356,7 +365,8 @@ public class SyncReplSearchListener impl
 
         try
         {
-            SyncModifyDnDecorator modDnControl = new SyncModifyDnDecorator();
+            SyncModifyDnDecorator modDnControl = new SyncModifyDnDecorator(
+                session.getLdapServer().getDirectoryService().getLdapCodecService() );
             modDnControl.setModDnType( SyncModifyDnType.RENAME );
             modDnControl.setEntryDn( renameContext.getDn().getName() );
             modDnControl.setNewRdn( renameContext.getNewRdn().getName() );
@@ -368,7 +378,8 @@ public class SyncReplSearchListener impl
                 respEntry.setObjectName( entry.getDn() );
                 respEntry.setEntry( entry );
 
-                SyncStateValueDecorator syncModify = new SyncStateValueDecorator();
+                SyncStateValueDecorator syncModify = new SyncStateValueDecorator(
+                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                 syncModify.setSyncStateType( SyncStateTypeEnum.MODDN );
                 syncModify.setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT)
                         .getString()) );

Modified: directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java (original)
+++ directory/apacheds/trunk/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java Sun Jan 30 17:57:34 2011
@@ -46,6 +46,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.factory.DSAnnotationProcessor;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.util.JndiUtils;
@@ -80,7 +81,7 @@ public class DirectoryServiceAnnotationT
         env.put( Context.SECURITY_PRINCIPAL, ServerDNConstants.ADMIN_SYSTEM_DN );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
-        return new InitialLdapContext( env, JndiUtils.toJndiControls( controls ) );
+        return new InitialLdapContext( env, JndiUtils.toJndiControls( new DefaultLdapCodecService(), controls ) );
     }
     
 

Modified: directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java (original)
+++ directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java Sun Jan 30 17:57:34 2011
@@ -106,7 +106,8 @@ public class ServerIntegrationUtils exte
         env.put( Context.SECURITY_PRINCIPAL, ServerDNConstants.ADMIN_SYSTEM_DN );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
-        return new InitialLdapContext( env, JndiUtils.toJndiControls( controls ) );
+        return new InitialLdapContext( env, JndiUtils.toJndiControls( 
+            ldapServer.getDirectoryService().getLdapCodecService(), controls ) );
     }
 
 

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java Sun Jan 30 17:57:34 2011
@@ -65,9 +65,9 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler;
 import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
-import org.apache.directory.shared.ldap.codec.controls.ControlImpl;
 import org.apache.directory.shared.ldap.model.constants.SupportedSaslMechanisms;
 import org.apache.directory.shared.ldap.model.message.Control;
+import org.apache.directory.shared.ldap.model.message.controls.BasicControl;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.junit.After;
 import org.junit.Before;
@@ -354,47 +354,8 @@ public class MiscBindIT extends Abstract
     @Test
     public void testFailureWithUnsupportedControl() throws Exception
     {
-        Control unsupported = new ControlImpl( "1.1.1.1" )
-        {
-            boolean isCritical = true;
-            private static final long serialVersionUID = 1L;
-
-
-            @SuppressWarnings("unused")
-            public String getType()
-            {
-                return "1.1.1.1";
-            }
-
-
-            public byte[] getValue()
-            {
-                return new byte[0];
-            }
-
-
-            public void setValue( byte[] value )
-            {
-            }
-
-
-            public boolean isCritical()
-            {
-                return isCritical;
-            }
-
-
-            public void setCritical( boolean isCritical )
-            {
-                this.isCritical = isCritical;
-            }
-
-
-            public String getOid()
-            {
-                return "1.1.1.1";
-            }
-        };
+        Control unsupported = new BasicControl( "1.1.1.1" );
+        unsupported.setCritical( true );
         
         ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
         
@@ -417,8 +378,8 @@ public class MiscBindIT extends Abstract
         user.put( oc );
         user.put( "sn", "Bush" );
         user.put( "userPassword", "Aerial" );
-        ctx.setRequestControls( JndiUtils.toJndiControls( new Control[]
-                {unsupported} ) );
+        ctx.setRequestControls( JndiUtils.toJndiControls( ldapServer.getDirectoryService().getLdapCodecService(),
+            new Control[] {unsupported} ) );
 
         try
         {
@@ -430,7 +391,8 @@ public class MiscBindIT extends Abstract
         }
 
         unsupported.setCritical( false );
-        ctx.setRequestControls( JndiUtils.toJndiControls( new Control[]{unsupported} ) );
+        ctx.setRequestControls( JndiUtils.toJndiControls( ldapServer.getDirectoryService().getLdapCodecService(),
+            new Control[]{unsupported} ) );
         
         DirContext kate = ctx.createSubcontext( "cn=Kate Bush", user );
         assertNotNull( kate );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java Sun Jan 30 17:57:34 2011
@@ -536,7 +536,8 @@ public class SaslBindIT extends Abstract
             }
 
             // Retrieve the response back from server to my last request.
-            LdapMessageContainer container = new LdapMessageContainer();
+            LdapMessageContainer container = new LdapMessageContainer( 
+                ldapServer.getDirectoryService().getLdapCodecService() );
             decoder.setLdapMessageContainer( container );
             return (BindResponse) decoder.decode( null, _input_ );
         }
@@ -574,7 +575,8 @@ public class SaslBindIT extends Abstract
             }
 
             // Retrieve the response back from server to my last request.
-            LdapMessageContainer container = new LdapMessageContainer();
+            LdapMessageContainer container = new LdapMessageContainer(
+                ldapServer.getDirectoryService().getLdapCodecService() );
             decoder.setLdapMessageContainer( container );
             return ( BindResponse ) decoder.decode( null, _input_ );
         }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupPerfIT.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupPerfIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupPerfIT.java Sun Jan 30 17:57:34 2011
@@ -99,7 +99,9 @@ public class LookupPerfIT extends Abstra
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
 
-        return new InitialLdapContext( env, JndiUtils.toJndiControls( controls ) );
+        return new InitialLdapContext( env, JndiUtils.toJndiControls( 
+            ldapServer.getDirectoryService().getLdapCodecService(),
+            controls ) );
     }
 
 

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java Sun Jan 30 17:57:34 2011
@@ -44,6 +44,9 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.shared.asn1.EncoderException;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedResultsDecorator;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.util.JndiUtils;
@@ -197,19 +200,23 @@ public class PagedSearchIT extends Abstr
     @Rule
     public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker( MultiThreadedMultiInvoker.THREADSAFE );
 
+    private ILdapCodecService codec = new DefaultLdapCodecService();
+    
+    
     /**
      * Create the searchControls with a paged size
+     * @throws EncoderException on codec failures
      */
     private SearchControls createSearchControls( DirContext ctx, int sizeLimit, int pagedSize ) 
-        throws NamingException
+        throws NamingException, EncoderException
     {
         SearchControls controls = new SearchControls();
         controls.setCountLimit( sizeLimit );
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        PagedResultsDecorator pagedSearchControl = new PagedResultsDecorator();
+        PagedResultsDecorator pagedSearchControl = new PagedResultsDecorator( codec );
         pagedSearchControl.setSize( pagedSize );
         
-        ((LdapContext)ctx).setRequestControls( JndiUtils.toJndiControls( new Control[] {pagedSearchControl} ) );
+        ((LdapContext)ctx).setRequestControls( JndiUtils.toJndiControls(  codec, new Control[] {pagedSearchControl} ) );
         
         return controls;
     }
@@ -217,14 +224,15 @@ public class PagedSearchIT extends Abstr
     
     /**
      * Create the searchControls with a paged size
+     * @throws EncoderException on codec failures
      */
     private void createNextSearchControls( DirContext ctx, byte[] cookie, int pagedSize ) 
-        throws NamingException
+        throws NamingException, EncoderException
     {
-        PagedResultsDecorator pagedSearchControl = new PagedResultsDecorator();
+        PagedResultsDecorator pagedSearchControl = new PagedResultsDecorator( codec );
         pagedSearchControl.setCookie( cookie );
         pagedSearchControl.setSize( pagedSize );
-        ((LdapContext)ctx).setRequestControls( JndiUtils.toJndiControls( new Control[] {pagedSearchControl} ) );
+        ((LdapContext)ctx).setRequestControls( JndiUtils.toJndiControls( codec, new Control[] {pagedSearchControl} ) );
     }
     
     
@@ -247,9 +255,10 @@ public class PagedSearchIT extends Abstr
     /**
      * Do the loop over the entries, until we can't get any more, or until we
      * reach a limit. It will check that we have got all the expected entries.
+     * @throws EncoderException  on codec failures
      */
     private void doLoop( DirContext ctx, SearchControls controls, int pagedSizeLimit, 
-        int expectedLoop, int expectedNbEntries, boolean expectedException ) throws NamingException
+        int expectedLoop, int expectedNbEntries, boolean expectedException ) throws NamingException, EncoderException
     {
         // Loop over all the elements
         int loop = 0;

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java Sun Jan 30 17:57:34 2011
@@ -53,8 +53,11 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.model.message.controls.PersistentSearchImpl;
 import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
 import org.apache.directory.shared.ldap.model.message.controls.EntryChange;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ICodecControl;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeDecorator;
-import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeDecoder;
+import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchDecorator;
 import org.apache.directory.shared.ldap.model.message.controls.PersistentSearch;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.ldif.LdifUtils;
@@ -95,8 +98,8 @@ public class PersistentSearchIT extends 
     private static final String BASE = "ou=system";
     private static final String PERSON_DESCRIPTION = "an American singer-songwriter";
     private static final String RDN = "cn=Tori Amos";
-
-
+    
+    
     /**
      * Creation of required attributes of a person entry.
      */
@@ -522,19 +525,21 @@ public class PersistentSearchIT extends 
     {
         boolean isReady = false;
         PSearchNotification result;
-        final PersistentSearch persistentSearch;
+        final PersistentSearchDecorator persistentSearch;
         LdapContext ctx;
         NamingEnumeration<SearchResult> list;
         
         PSearchListener()
         {
-            persistentSearch = new PersistentSearchImpl();
+            persistentSearch = new PersistentSearchDecorator( ldapServer.getDirectoryService().getLdapCodecService() );
         }
 
 
         PSearchListener( PersistentSearch persistentSearch )
         {
-            this.persistentSearch = persistentSearch;
+            ICodecControl<? extends Control> wrapped = 
+                ldapServer.getDirectoryService().getLdapCodecService().decorate( persistentSearch );
+            this.persistentSearch = ( PersistentSearchDecorator ) wrapped;
         }
 
         
@@ -571,8 +576,8 @@ public class PersistentSearchIT extends 
         public void run()
         {
             LOG.debug( "PSearchListener.run() called." );
+            ILdapCodecService codec = ldapServer.getDirectoryService().getLdapCodecService();
             persistentSearch.setCritical( true );
-            
             persistentSearch.setValue( persistentSearch.getValue() );
 
             Control[] ctxCtls = new Control[] { persistentSearch };
@@ -580,7 +585,7 @@ public class PersistentSearchIT extends 
             try
             {
                 ctx = ( LdapContext ) getWiredContext( ldapServer).lookup( BASE );
-                ctx.setRequestControls( JndiUtils.toJndiControls(ctxCtls) );
+                ctx.setRequestControls( JndiUtils.toJndiControls( codec, ctxCtls) );
                 isReady = true;
                 LOG.debug( "PSearchListener is ready and about to issue persistent search request." );
                 list = ctx.search( "", "objectClass=*", null );
@@ -604,9 +609,7 @@ public class PersistentSearchIT extends 
                                 if ( control.getID().equals(
                                     EntryChange.OID ) )
                                 {
-                                    EntryChangeDecoder decoder = new EntryChangeDecoder();
-                                    ecControl = ( EntryChangeDecorator ) decoder.decode( control.getEncodedValue(), 
-                                            new EntryChangeDecorator() );
+                                    ecControl.setValue( control.getEncodedValue() );
                                 }
                             }
                         }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java?rev=1065336&r1=1065335&r2=1065336&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java Sun Jan 30 17:57:34 2011
@@ -743,7 +743,8 @@ public class SearchIT extends AbstractLd
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
 
-        ctx.setRequestControls( JndiUtils.toJndiControls( reqControls ) );
+        ctx.setRequestControls( JndiUtils.toJndiControls( ldapServer.getDirectoryService().getLdapCodecService(),
+            reqControls ) );
         NamingEnumeration<SearchResult> enm = ctx.search( "", "(objectClass=*)", searchControls );
         Set<String> results = new HashSet<String>();
 



Mime
View raw message