Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 68814 invoked from network); 8 Oct 2007 01:13:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Oct 2007 01:13:19 -0000 Received: (qmail 47726 invoked by uid 500); 8 Oct 2007 01:13:07 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 47677 invoked by uid 500); 8 Oct 2007 01:13:07 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 47666 invoked by uid 99); 8 Oct 2007 01:13:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Oct 2007 18:13:07 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2007 01:13:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D83241A9832; Sun, 7 Oct 2007 18:12:19 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r582700 - in /directory/apacheds/branches/bigbang: core/src/main/java/org/apache/directory/server/core/ core/src/test/java/org/apache/directory/server/core/authz/support/ mitosis/src/test/java/org/apache/directory/mitosis/service/ protocol-... Date: Mon, 08 Oct 2007 01:12:17 -0000 To: commits@directory.apache.org From: akarasulu@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071008011219.D83241A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: akarasulu Date: Sun Oct 7 18:12:14 2007 New Revision: 582700 URL: http://svn.apache.org/viewvc?rev=582700&view=rev Log: fixed mitosis test cases and issues with server-unit tests dealing with binary attributes in codecs: all integration tests now pass Added: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchITest.java (contents, props changed) - copied, changed from r582695, directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchTest.java Removed: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchTest.java Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AttributeTypeRegistry.java directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=582700&r1=582699&r2=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original) +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sun Oct 7 18:12:14 2007 @@ -66,7 +66,6 @@ import org.apache.directory.shared.ldap.message.AttributesImpl; import org.apache.directory.shared.ldap.message.ResultCodeEnum; import org.apache.directory.shared.ldap.name.LdapDN; -import org.apache.directory.shared.ldap.schema.AttributeType; import org.apache.directory.shared.ldap.schema.OidNormalizer; import org.apache.directory.shared.ldap.util.DateUtils; import org.apache.directory.shared.ldap.util.StringTools; @@ -1227,9 +1226,9 @@ { String[] binaryArray = binaryIds.split( " " ); - for ( String aBinaryArray : binaryArray ) + for ( String binary : binaryArray ) { - binaries.add( StringTools.lowerCaseAscii( StringTools.trim( aBinaryArray ) ) ); + binaries.add( StringTools.lowerCaseAscii( StringTools.trim( binary ) ) ); } } @@ -1246,27 +1245,9 @@ // now get all the attributeTypes that are binary from the registry AttributeTypeRegistry registry = registries.getAttributeTypeRegistry(); - Iterator list = registry.iterator(); - while ( list.hasNext() ) - { - AttributeType type = list.next(); - - if ( !type.getSyntax().isHumanReadable() ) - { - // add the OID for the attributeType - binaries.add( type.getOid() ); - - // add the lowercased name for the names for the attributeType - String[] names = type.getNames(); - - for ( String name : names ) - { - binaries.add( StringTools.lowerCaseAscii( StringTools.trim( name ) ) ); - } - } - } - + binaries.addAll( registry.getBinaryAttributes() ); this.environment.put( BINARY_KEY, binaries ); + if ( LOG.isDebugEnabled() ) { LOG.debug( "binary ids used: " + binaries ); Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java?rev=582700&r1=582699&r2=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java (original) +++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java Sun Oct 7 18:12:14 2007 @@ -20,10 +20,7 @@ package org.apache.directory.server.core.authz.support; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.Iterator; -import java.util.Map; +import java.util.*; import javax.naming.NamingException; @@ -544,5 +541,11 @@ public void register( AttributeType attributeType ) throws NamingException { + } + + + public Set getBinaryAttributes() throws NamingException + { + return null; } } Modified: directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java?rev=582700&r1=582699&r2=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java (original) +++ directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java Sun Oct 7 18:12:14 2007 @@ -123,6 +123,8 @@ FileUtils.deleteDirectory( workDir ); } + service.startup(); + Hashtable env = new Hashtable(); env.put( DirectoryService.JNDI_KEY, service ); env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" ); Modified: directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java?rev=582700&r1=582699&r2=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java (original) +++ directory/apacheds/branches/bigbang/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java Sun Oct 7 18:12:14 2007 @@ -137,14 +137,19 @@ * * @param env environment properties used to configure the provider and * underlying codec providers if any + * @param cfg the ldap configuration + * @param directoryService the directory service core + * + * @throws LdapNamingException if there are problems setting up the protocol provider */ - public LdapProtocolProvider( DirectoryService directoryService, LdapConfiguration cfg, Hashtable env ) - throws LdapNamingException + public LdapProtocolProvider( DirectoryService directoryService, LdapConfiguration cfg, + Hashtable env ) throws LdapNamingException { this.cfg = cfg; this.directoryService = directoryService; - Hashtable copy = ( Hashtable ) env.clone(); + Hashtable copy = new Hashtable( env.size() ); + copy.putAll( env ); copy.put( Context.PROVIDER_URL, "" ); copy.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory" ); copy.put( DirectoryService.JNDI_KEY, directoryService ); Modified: directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java?rev=582700&r1=582699&r2=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java (original) +++ directory/apacheds/branches/bigbang/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java Sun Oct 7 18:12:14 2007 @@ -30,7 +30,7 @@ import org.apache.mina.common.IoSession; import org.apache.mina.handler.demux.MessageHandler; -import java.util.Properties; +import java.util.Hashtable; /** @@ -53,9 +53,9 @@ { DirectoryService directoryService = new DefaultDirectoryService(); LdapProtocolProvider provider = new LdapProtocolProvider( directoryService, - new LdapConfiguration(), new Properties() ); + new LdapConfiguration(), new Hashtable() ); assertNotNull( provider.getCodecFactory() ); - assertTrue( provider.getName() == LdapProtocolProvider.SERVICE_NAME ); + assertEquals( provider.getName(), LdapProtocolProvider.SERVICE_NAME ); } @@ -68,42 +68,42 @@ */ public void testAlternativeConfiguration() throws LdapNamingException { - Properties props = new Properties(); + Hashtable props = new Hashtable(); - props.setProperty( AbandonRequest.class.getName(), BogusAbandonHandler.class.getName() ); - props.setProperty( AbandonRequestImpl.class.getName(), BogusAbandonHandler.class.getName() ); + props.put( AbandonRequest.class.getName(), BogusAbandonHandler.class.getName() ); + props.put( AbandonRequestImpl.class.getName(), BogusAbandonHandler.class.getName() ); - props.setProperty( AddRequest.class.getName(), BogusAddHandler.class.getName() ); - props.setProperty( AddRequestImpl.class.getName(), BogusAddHandler.class.getName() ); + props.put( AddRequest.class.getName(), BogusAddHandler.class.getName() ); + props.put( AddRequestImpl.class.getName(), BogusAddHandler.class.getName() ); - props.setProperty( BindRequest.class.getName(), BogusBindHandler.class.getName() ); - props.setProperty( BindRequestImpl.class.getName(), BogusBindHandler.class.getName() ); + props.put( BindRequest.class.getName(), BogusBindHandler.class.getName() ); + props.put( BindRequestImpl.class.getName(), BogusBindHandler.class.getName() ); - props.setProperty( CompareRequest.class.getName(), BogusCompareHandler.class.getName() ); - props.setProperty( CompareRequestImpl.class.getName(), BogusCompareHandler.class.getName() ); + props.put( CompareRequest.class.getName(), BogusCompareHandler.class.getName() ); + props.put( CompareRequestImpl.class.getName(), BogusCompareHandler.class.getName() ); - props.setProperty( DeleteRequest.class.getName(), BogusDeleteHandler.class.getName() ); - props.setProperty( DeleteRequestImpl.class.getName(), BogusDeleteHandler.class.getName() ); + props.put( DeleteRequest.class.getName(), BogusDeleteHandler.class.getName() ); + props.put( DeleteRequestImpl.class.getName(), BogusDeleteHandler.class.getName() ); - props.setProperty( ExtendedRequest.class.getName(), ExtendedHandler.class.getName() ); - props.setProperty( ExtendedRequestImpl.class.getName(), ExtendedHandler.class.getName() ); + props.put( ExtendedRequest.class.getName(), ExtendedHandler.class.getName() ); + props.put( ExtendedRequestImpl.class.getName(), ExtendedHandler.class.getName() ); - props.setProperty( ModifyRequest.class.getName(), BogusModifyHandler.class.getName() ); - props.setProperty( ModifyRequestImpl.class.getName(), BogusModifyHandler.class.getName() ); + props.put( ModifyRequest.class.getName(), BogusModifyHandler.class.getName() ); + props.put( ModifyRequestImpl.class.getName(), BogusModifyHandler.class.getName() ); - props.setProperty( ModifyDnRequest.class.getName(), BogusModifyDnHandler.class.getName() ); - props.setProperty( ModifyDnRequestImpl.class.getName(), BogusModifyDnHandler.class.getName() ); + props.put( ModifyDnRequest.class.getName(), BogusModifyDnHandler.class.getName() ); + props.put( ModifyDnRequestImpl.class.getName(), BogusModifyDnHandler.class.getName() ); - props.setProperty( SearchRequest.class.getName(), BogusSearchHandler.class.getName() ); - props.setProperty( SearchRequestImpl.class.getName(), BogusSearchHandler.class.getName() ); + props.put( SearchRequest.class.getName(), BogusSearchHandler.class.getName() ); + props.put( SearchRequestImpl.class.getName(), BogusSearchHandler.class.getName() ); - props.setProperty( UnbindRequest.class.getName(), BogusUnbindHandler.class.getName() ); - props.setProperty( UnbindRequestImpl.class.getName(), BogusUnbindHandler.class.getName() ); + props.put( UnbindRequest.class.getName(), BogusUnbindHandler.class.getName() ); + props.put( UnbindRequestImpl.class.getName(), BogusUnbindHandler.class.getName() ); DirectoryService directoryService = new DefaultDirectoryService(); LdapProtocolProvider provider = new LdapProtocolProvider( directoryService, new LdapConfiguration(), props ); assertNotNull( provider.getCodecFactory() ); - assertTrue( provider.getName() == LdapProtocolProvider.SERVICE_NAME ); + assertEquals( provider.getName(), LdapProtocolProvider.SERVICE_NAME ); } public static class BogusAbandonHandler implements MessageHandler Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AttributeTypeRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AttributeTypeRegistry.java?rev=582700&r1=582699&r2=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AttributeTypeRegistry.java (original) +++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/AttributeTypeRegistry.java Sun Oct 7 18:12:14 2007 @@ -20,14 +20,14 @@ package org.apache.directory.server.schema.registries; -import java.util.Iterator; -import java.util.Map; - -import javax.naming.NamingException; - import org.apache.directory.shared.ldap.schema.AttributeType; import org.apache.directory.shared.ldap.schema.OidNormalizer; +import javax.naming.NamingException; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + /** * An AttributeType registry service interface. @@ -48,6 +48,17 @@ /** + * Gets a set of Strings representing the aliases, and numeric identifiers of + * all binary attributes. The set will contain all the aliases for a binary + * attributeType (one whose syntax is not human readible) along with its numeric + * identifier. + * + * @return set of aliases and numeric ids for binary attributeTypes + * @throws NamingException if there are issues resolving type information + */ + Set getBinaryAttributes() throws NamingException; + + /** * Looks up an AttributeType by its unique Object Identifier or by its * unique name. * @@ -79,6 +90,9 @@ /** * Gets an oid/name to normalizer mapping used to normalize distinguished * names. + * + * @return a map of OID Strings to OidNormalizer instances + * @throws NamingException if for some reason this information cannot be returned */ Map getNormalizerMapping() throws NamingException; Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java?rev=582700&r1=582699&r2=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java (original) +++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java Sun Oct 7 18:12:14 2007 @@ -34,6 +34,7 @@ import org.apache.directory.shared.ldap.schema.MatchingRule; import org.apache.directory.shared.ldap.schema.NoOpNormalizer; import org.apache.directory.shared.ldap.schema.OidNormalizer; +import org.apache.directory.shared.ldap.util.StringTools; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,10 +49,10 @@ public class DefaultAttributeTypeRegistry implements AttributeTypeRegistry { /** static class logger */ - private final static Logger log = LoggerFactory.getLogger( DefaultAttributeTypeRegistry.class ); + private static final Logger LOG = LoggerFactory.getLogger( DefaultAttributeTypeRegistry.class ); /** Speedup for DEBUG mode */ - private static final boolean IS_DEBUG = log.isDebugEnabled(); + private static final boolean IS_DEBUG = LOG.isDebugEnabled(); /** maps an OID to an AttributeType */ private final Map byOid; @@ -69,6 +70,7 @@ /** * Creates an empty BootstrapAttributeTypeRegistry. + * @param oidRegistry a numeric object identifier registry */ public DefaultAttributeTypeRegistry( OidRegistry oidRegistry ) { @@ -87,15 +89,14 @@ { if ( byOid.containsKey( attributeType.getOid() ) ) { - NamingException e = new NamingException( "attributeType w/ OID " + attributeType.getOid() + throw new NamingException( "attributeType w/ OID " + attributeType.getOid() + " has already been registered!" ); - throw e; } String[] names = attributeType.getNames(); - for ( int ii = 0; ii < names.length; ii++ ) + for ( String name : names ) { - oidRegistry.register( names[ii], attributeType.getOid() ); + oidRegistry.register( name, attributeType.getOid() ); } oidRegistry.register( attributeType.getOid(), attributeType.getOid() ); @@ -104,11 +105,39 @@ if ( IS_DEBUG ) { - log.debug( "registed attributeType: " + attributeType ); + LOG.debug( "registed attributeType: " + attributeType ); } } - + + public Set getBinaryAttributes() throws NamingException + { + Set binaries = new HashSet(); + Iterator list = iterator(); + while ( list.hasNext() ) + { + AttributeType type = list.next(); + + if ( ! type.getSyntax().isHumanReadable() ) + { + // add the OID for the attributeType + binaries.add( type.getOid() ); + + // add the lowercased name for the names for the attributeType + String[] names = type.getNames(); + + for ( String name : names ) + { + // @TODO do we really need to lowercase strings here? + binaries.add( StringTools.lowerCaseAscii( StringTools.trim( name ) ) ); + } + } + } + + return binaries; + } + + public void registerDescendants( AttributeType attributeType ) throws NamingException { // add/create the descendent set for this attribute @@ -125,7 +154,7 @@ * * @param newType the new attributeType being added * @param ancestor some anscestor from superior up to and including top - * @throws NamingException + * @throws NamingException if there are resolution failures */ protected void onRegisterAddToAncestorDescendants( AttributeType newType, AttributeType ancestor ) throws NamingException @@ -157,15 +186,14 @@ if ( !byOid.containsKey( id ) ) { - NamingException e = new NamingException( "attributeType w/ OID " + id + " not registered!" ); - throw e; + throw new NamingException( "attributeType w/ OID " + id + " not registered!" ); } AttributeType attributeType = byOid.get( id ); if ( IS_DEBUG ) { - log.debug( "lookup with id" + id + "' of attributeType: " + attributeType ); + LOG.debug( "lookup with id" + id + "' of attributeType: " + attributeType ); } return attributeType; @@ -215,28 +243,27 @@ if ( mapping == null ) { mapping = new HashMap( byOid.size() << 1 ); - for ( Iterator ii = byOid.values().iterator(); ii.hasNext(); /**/ ) + for ( AttributeType type : byOid.values() ) { - AttributeType type = ( AttributeType ) ii.next(); MatchingRule matchingRule = type.getEquality(); - OidNormalizer oidNormalizer = null; - + OidNormalizer oidNormalizer; + if ( matchingRule == null ) { - log.debug( "Attribute " + type.getName() + " does not have normalizer : using NoopNormalizer" ); + LOG.debug( "Attribute " + type.getName() + " does not have normalizer : using NoopNormalizer" ); oidNormalizer = new OidNormalizer( type.getOid(), new NoOpNormalizer() ); } else { oidNormalizer = new OidNormalizer( type.getOid(), matchingRule.getNormalizer() ); } - + mapping.put( type.getOid(), oidNormalizer ); String[] aliases = type.getNames(); - for ( int jj = 0; jj < aliases.length; jj++ ) + for ( String aliase : aliases ) { - mapping.put( aliases[jj], oidNormalizer ); - mapping.put( aliases[jj].toLowerCase(), oidNormalizer ); + mapping.put( aliase, oidNormalizer ); + mapping.put( aliase.toLowerCase(), oidNormalizer ); } } } @@ -251,6 +278,7 @@ Set descendants = oidToDescendantSet.get( oid ); if ( descendants == null ) { + //noinspection unchecked return Collections.EMPTY_SET.iterator(); } return descendants.iterator(); @@ -261,11 +289,7 @@ { String oid = oidRegistry.getOid( ancestorId ); Set descendants = oidToDescendantSet.get( oid ); - if ( descendants == null ) - { - return false; - } - return !descendants.isEmpty(); + return descendants != null && !descendants.isEmpty(); } Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=582700&r1=582699&r2=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (original) +++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java Sun Oct 7 18:12:14 2007 @@ -45,6 +45,7 @@ import org.apache.directory.server.protocol.shared.store.LdifFileLoader; import org.apache.directory.server.protocol.shared.store.LdifLoadFilter; import org.apache.directory.shared.ldap.constants.SchemaConstants; +import org.apache.directory.shared.ldap.constants.JndiPropertyConstants; import org.apache.directory.shared.ldap.exception.LdapConfigurationException; import org.apache.directory.shared.ldap.exception.LdapNamingException; import org.apache.directory.shared.ldap.message.AttributesImpl; @@ -154,6 +155,8 @@ { directoryService.startup(); } + environment.put( JndiPropertyConstants.JNDI_LDAP_ATTRIBUTES_BINARY, + directoryService.getEnvironment().get( JndiPropertyConstants.JNDI_LDAP_ATTRIBUTES_BINARY ) ); if ( enableNetworking ) { @@ -655,7 +658,7 @@ * @throws NamingException if there are problems starting the LDAP provider * @param env the environment */ - private void startLDAP( Hashtable env ) throws NamingException + private void startLDAP( Hashtable env ) throws NamingException { // Skip if disabled if ( ! ldapConfiguration.isEnabled() ) @@ -674,7 +677,7 @@ * @throws NamingException if there are problems starting the LDAPS provider * @param env the JNDI environment */ - private void startLDAPS( Hashtable env ) throws NamingException + private void startLDAPS( Hashtable env ) throws NamingException { // Skip if disabled if ( !( ldapsConfiguration.isEnabled() && ldapsConfiguration.isEnableLdaps() ) ) @@ -692,12 +695,11 @@ } - private void startLDAP0( LdapConfiguration ldapConfig, Hashtable env, int port, IoFilterChainBuilder chainBuilder ) + private void startLDAP0( LdapConfiguration ldapConfig, Hashtable env, int port, IoFilterChainBuilder chainBuilder ) throws LdapNamingException, LdapConfigurationException { // Register all extended operation handlers. - LdapProtocolProvider protocolProvider = new LdapProtocolProvider( directoryService, ldapConfig, - ( Hashtable ) env.clone() ); + LdapProtocolProvider protocolProvider = new LdapProtocolProvider( directoryService, ldapConfig, env ); for ( ExtendedOperationHandler h : ldapConfig.getExtendedOperationHandlers() ) { Copied: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchITest.java (from r582695, directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchTest.java) URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchITest.java?p2=directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchITest.java&p1=directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchTest.java&r1=582695&r2=582700&rev=582700&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchTest.java (original) +++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchITest.java Sun Oct 7 18:12:14 2007 @@ -53,7 +53,7 @@ * @author Apache Directory Project * @version $Rev$ */ -public class SearchTest extends AbstractServerTest +public class SearchITest extends AbstractServerTest { private LdapContext ctx; public static final String RDN = "cn=Tori Amos"; Propchange: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchITest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SearchITest.java ------------------------------------------------------------------------------ --- svn:keywords (added) +++ svn:keywords Sun Oct 7 18:12:14 2007 @@ -0,0 +1,4 @@ +Rev +Revision +Date +Id