You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2011/09/02 20:31:02 UTC
svn commit: r1164667 [5/6] - in
/directory/apacheds/branches/one-sub-level-index-removal: ./ all/
core-annotations/
core-annotations/src/test/java/org/apache/directory/server/core/factory/
core-api/ core-api/src/main/java/org/apache/directory/server/co...
Modified: directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java Fri Sep 2 18:30:57 2011
@@ -25,6 +25,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.directory.server.dns.store.DnsAttribute;
+import org.apache.directory.shared.util.Strings;
import org.apache.mina.core.buffer.IoBuffer;
@@ -46,10 +47,10 @@ public class ServerSelectionRecordEncode
protected Map<String, Object> getAttributes()
{
Map<String, Object> map = new HashMap<String, Object>();
- map.put( DnsAttribute.SERVICE_PRIORITY.toLowerCase(), priority );
- map.put( DnsAttribute.SERVICE_WEIGHT.toLowerCase(), weight );
- map.put( DnsAttribute.SERVICE_PORT.toLowerCase(), port );
- map.put( DnsAttribute.DOMAIN_NAME.toLowerCase(), srvName );
+ map.put( Strings.toLowerCase( DnsAttribute.SERVICE_PRIORITY ), priority );
+ map.put( Strings.toLowerCase( DnsAttribute.SERVICE_WEIGHT ), weight );
+ map.put( Strings.toLowerCase( DnsAttribute.SERVICE_PORT ), port );
+ map.put( Strings.toLowerCase( DnsAttribute.DOMAIN_NAME ), srvName );
return map;
}
Modified: directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java Fri Sep 2 18:30:57 2011
@@ -25,6 +25,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.directory.server.dns.store.DnsAttribute;
+import org.apache.directory.shared.util.Strings;
import org.apache.mina.core.buffer.IoBuffer;
@@ -50,13 +51,14 @@ public class StartOfAuthorityRecordEncod
protected Map<String, Object> getAttributes()
{
Map<String, Object> map = new HashMap<String, Object>();
- map.put( DnsAttribute.SOA_M_NAME.toLowerCase(), mName );
- map.put( DnsAttribute.SOA_R_NAME.toLowerCase(), rName );
- map.put( DnsAttribute.SOA_SERIAL.toLowerCase(), serial );
- map.put( DnsAttribute.SOA_REFRESH.toLowerCase(), refresh );
- map.put( DnsAttribute.SOA_RETRY.toLowerCase(), retry );
- map.put( DnsAttribute.SOA_EXPIRE.toLowerCase(), expire );
- map.put( DnsAttribute.SOA_MINIMUM.toLowerCase(), minimum );
+ map.put( Strings.toLowerCase( DnsAttribute.SOA_M_NAME ), mName );
+ map.put( Strings.toLowerCase( DnsAttribute.SOA_R_NAME ), rName );
+ map.put( Strings.toLowerCase( DnsAttribute.SOA_SERIAL ), serial );
+ map.put( Strings.toLowerCase( DnsAttribute.SOA_REFRESH ), refresh );
+ map.put( Strings.toLowerCase( DnsAttribute.SOA_RETRY ), retry );
+ map.put( Strings.toLowerCase( DnsAttribute.SOA_EXPIRE ), expire );
+ map.put( Strings.toLowerCase( DnsAttribute.SOA_MINIMUM ), minimum );
+
return map;
}
Modified: directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java Fri Sep 2 18:30:57 2011
@@ -25,6 +25,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.directory.server.dns.store.DnsAttribute;
+import org.apache.directory.shared.util.Strings;
import org.apache.mina.core.buffer.IoBuffer;
@@ -42,7 +43,7 @@ public class TextRecordEncoderTest exten
protected Map<String, Object> getAttributes()
{
Map<String, Object> map = new HashMap<String, Object>();
- map.put( DnsAttribute.CHARACTER_STRING.toLowerCase(), characterString );
+ map.put( Strings.toLowerCase( DnsAttribute.CHARACTER_STRING ), characterString );
return map;
}
Propchange: directory/apacheds/branches/one-sub-level-index-removal/protocol-kerberos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -3,5 +3,5 @@
/directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-kerberos:980138-980936
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos:1040956-1043765
/directory/apacheds/branches/milestones/protocol-kerberos:1072812-1075328
-/directory/apacheds/trunk/protocol-kerberos:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/protocol-kerberos:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/protocol-kerberos:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -2,7 +2,8 @@
/directory/apacheds/branches/apacheds-codec-merge/protocol-ldap:982369-987590
/directory/apacheds/branches/apacheds-config/protocol-ldap:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ldap:980138-980936
+/directory/apacheds/branches/apacheds-jdbm/protocol-ldap:1160768-1164080
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-ldap:1040956-1043765
/directory/apacheds/branches/milestones/protocol-ldap:1072812-1075328
-/directory/apacheds/trunk/protocol-ldap:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/protocol-ldap:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/protocol-ldap:1067786-1067997
Modified: directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java Fri Sep 2 18:30:57 2011
@@ -21,7 +21,6 @@
package org.apache.directory.server.ldap.replication;
-import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
@@ -40,10 +39,6 @@ public class ReplicaEventMessage
/** The entry */
private Entry entry;
- /** The modifyDN control */
- private SyncModifyDn modDnControl;
-
-
/**
* Create a new ReplicaEvent instance for a Add/Delete+Modify operation
* @param changeType The change type
@@ -57,18 +52,6 @@ public class ReplicaEventMessage
/**
- * Create a new ReplicaEvent instance for a ModDN operation
- * @param modDnControl The modDN control
- * @param entry The entry
- */
- public ReplicaEventMessage( SyncModifyDn modDnControl, Entry entry )
- {
- this.modDnControl = modDnControl;
- this.entry = entry;
- }
-
-
- /**
* @return The changeType
*/
public ChangeType getChangeType()
@@ -87,15 +70,6 @@ public class ReplicaEventMessage
/**
- * @return The ModDN conrol
- */
- public SyncModifyDn getModDnControl()
- {
- return modDnControl;
- }
-
-
- /**
* checks if the event's CSN is older than the given CSN
*
* @param csn the CSN
Modified: directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessageSerializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessageSerializer.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessageSerializer.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessageSerializer.java Fri Sep 2 18:30:57 2011
@@ -30,10 +30,6 @@ import jdbm.helper.Serializer;
import org.apache.directory.server.core.partition.impl.btree.jdbm.EntrySerializer;
import org.apache.directory.shared.ldap.codec.api.LdapApiService;
import org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory;
-import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
-import org.apache.directory.shared.ldap.extras.controls.SyncModifyDnType;
-import org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncModifyDnDecorator;
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
import org.apache.directory.shared.ldap.model.name.Dn;
@@ -84,7 +80,6 @@ public class ReplicaEventMessageSerializ
Entry entry = replicaEventMessage.getEntry();
ChangeType changeType = replicaEventMessage.getChangeType();
- SyncModifyDn modDnControl = replicaEventMessage.getModDnControl();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -104,29 +99,6 @@ public class ReplicaEventMessageSerializ
// The change type
out.writeByte( changeType.getValue() );
- // The moddn control if any (only if it's a MODDN operation)
- if ( changeType == ChangeType.MODDN )
- {
- SyncModifyDnType modDnType = modDnControl.getModDnType();
- out.writeByte( modDnType.getValue() );
-
- switch ( modDnType )
- {
- case MOVE:
- out.writeUTF( modDnControl.getNewSuperiorDn() );
- break;
-
- case MOVE_AND_RENAME:
- out.writeUTF( modDnControl.getNewSuperiorDn() );
- // Fall through
-
- case RENAME:
- out.writeUTF( modDnControl.getNewRdn() );
- out.writeBoolean( modDnControl.isDeleteOldRdn() );
- break;
- }
- }
-
out.flush();
return baos.toByteArray();
@@ -165,39 +137,8 @@ public class ReplicaEventMessageSerializ
byte type = in.readByte();
ChangeType changeType = ChangeType.getChangeType( type );
- if ( changeType == ChangeType.MODDN )
- {
- type = in.readByte();
- SyncModifyDnType modDnType = SyncModifyDnType.getModifyDnType( type );
- SyncModifyDn modDnControl = new SyncModifyDnDecorator( codec );
-
- modDnControl.setModDnType( modDnType );
-
- switch ( modDnType )
- {
- case MOVE :
- modDnControl.setNewSuperiorDn( in.readUTF() );
- break;
-
- case MOVE_AND_RENAME :
- modDnControl.setNewSuperiorDn( in.readUTF() );
- // Fallthrough
-
- case RENAME :
- modDnControl.setNewRdn( in.readUTF() );
- modDnControl.setDeleteOldRdn( in.readBoolean() );
- break;
- }
-
- // And create a ReplicaEventMessage
- replicaEventMessage = new ReplicaEventMessage( modDnControl, entry );
-
- }
- else
- {
- // And create a ReplicaEventMessage
- replicaEventMessage = new ReplicaEventMessage( changeType, entry );
- }
+ // And create a ReplicaEventMessage
+ replicaEventMessage = new ReplicaEventMessage( changeType, entry );
}
catch ( ClassNotFoundException cnfe )
{
Modified: directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncreplConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncreplConfiguration.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncreplConfiguration.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncreplConfiguration.java Fri Sep 2 18:30:57 2011
@@ -30,6 +30,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
import org.apache.directory.shared.ldap.model.message.SearchScope;
import org.apache.directory.shared.ldap.model.name.Dn;
+import org.apache.directory.shared.util.Strings;
/**
@@ -133,9 +134,9 @@ public class SyncreplConfiguration imple
{
attributes = new HashSet<String>();
attributes.add( SchemaConstants.ALL_USER_ATTRIBUTES );
- attributes.add( SchemaConstants.ENTRY_UUID_AT.toLowerCase() );
- attributes.add( SchemaConstants.ENTRY_CSN_AT.toLowerCase() );
- attributes.add( SchemaConstants.REF_AT.toLowerCase() );
+ attributes.add( Strings.toLowerCase( SchemaConstants.ENTRY_UUID_AT ) );
+ attributes.add( Strings.toLowerCase( SchemaConstants.ENTRY_CSN_AT ) );
+ attributes.add( Strings.toLowerCase( SchemaConstants.REF_AT ) );
}
@@ -318,7 +319,7 @@ public class SyncreplConfiguration imple
{
at = at.trim();
- if ( !attributes.contains( at.toLowerCase() ) )
+ if ( !attributes.contains( Strings.toLowerCase( at ) ) )
{
attributes.add( at );
}
Modified: directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java Fri Sep 2 18:30:57 2011
@@ -45,9 +45,9 @@ import org.apache.directory.server.ldap.
import org.apache.directory.server.ldap.replication.ReplicaEventMessage;
import org.apache.directory.shared.ldap.extras.controls.SyncDoneValue;
import org.apache.directory.shared.ldap.extras.controls.SyncInfoValue;
-import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
import org.apache.directory.shared.ldap.extras.controls.SyncRequestValue;
import org.apache.directory.shared.ldap.extras.controls.SyncStateTypeEnum;
+import org.apache.directory.shared.ldap.extras.controls.SyncStateValue;
import org.apache.directory.shared.ldap.extras.controls.SynchronizationInfoEnum;
import org.apache.directory.shared.ldap.extras.controls.SynchronizationModeEnum;
import org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncDoneValueDecorator;
@@ -235,11 +235,12 @@ public class SyncReplRequestHandler impl
{
PROVIDER_LOG.debug( "Received a replication request {} with no cookie", request );
// No cookie ? We have to get all the entries from the provider
+ // This is an initiate Content Poll action (RFC 4533, 3.3.1)
doInitialRefresh( session, request );
}
else
{
- String cookieString = Strings.utf8ToString(cookieBytes);
+ String cookieString = Strings.utf8ToString( cookieBytes );
PROVIDER_LOG.debug( "Received a replication request {} with a cookie '{}'", request, cookieString );
LOG.debug( "search request received with the cookie {}", cookieString );
@@ -310,7 +311,7 @@ public class SyncReplRequestHandler impl
// if event type is null, then it is a MODDN operation
if ( event == ChangeType.MODDN )
{
- sendSearchResultEntry( session, req, entry, replicaEventMessage.getModDnControl() );
+ sendSearchResultEntry( session, req, entry, SyncStateTypeEnum.MODIFY );
}
else
{
@@ -368,11 +369,11 @@ public class SyncReplRequestHandler impl
IntermediateResponse intermResp = new IntermediateResponseImpl( req.getMessageId() );
intermResp.setResponseName( SyncInfoValue.OID );
- SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator( ldapServer.getDirectoryService()
+ SyncInfoValue syncInfo = new SyncInfoValueDecorator( ldapServer.getDirectoryService()
.getLdapCodecService(),
SynchronizationInfoEnum.NEW_COOKIE );
syncInfo.setCookie( cookie );
- intermResp.setResponseValue( syncInfo.getValue() );
+ intermResp.setResponseValue( ((SyncInfoValueDecorator)syncInfo).getValue() );
PROVIDER_LOG.debug( "Sent the intermediate response to the {} consumer, {}", replicaLog.getId(), intermResp );
session.getIoSession().write( intermResp );
@@ -412,7 +413,7 @@ public class SyncReplRequestHandler impl
boolean refreshNPersist = isRefreshNPersist( request );
- // first register a persistent search handler before starting the initial content refresh
+ // first register a ReplicaEventLog before starting the initial content refresh
// this is to log all the operations happen on DIT during initial content refresh
ReplicaEventLog replicaLog = createRelicaEventLog( hostName, originalFilter );
@@ -455,6 +456,7 @@ public class SyncReplRequestHandler impl
ExprNode initialContentFilter = new AndNode( modifiedFilter, csnNode );
request.setFilter( initialContentFilter );
+ // Now, do a search to get all the entries
SearchResultDone searchDoneResp = doSimpleSearch( session, request );
if ( searchDoneResp.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
@@ -470,10 +472,10 @@ public class SyncReplRequestHandler impl
IntermediateResponse intermResp = new IntermediateResponseImpl( request.getMessageId() );
intermResp.setResponseName( SyncInfoValue.OID );
- SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator(
+ SyncInfoValue syncInfo = new SyncInfoValueDecorator(
ldapServer.getDirectoryService().getLdapCodecService(), SynchronizationInfoEnum.NEW_COOKIE );
syncInfo.setCookie( cookie );
- intermResp.setResponseValue( syncInfo.getValue() );
+ intermResp.setResponseValue( ((SyncInfoValueDecorator)syncInfo).getValue() );
PROVIDER_LOG.info( "Sending the intermediate response to consumer {}, {}", replicaLog, syncInfo );
@@ -633,7 +635,7 @@ public class SyncReplRequestHandler impl
Attribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );
// Create the SyncState control
- SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator(
+ SyncStateValue syncStateControl = new SyncStateValueDecorator(
ldapServer.getDirectoryService().getLdapCodecService() );
syncStateControl.setSyncStateType( syncStateType );
syncStateControl.setEntryUUID( Strings.uuidToBytes( uuid.getString() ) );
@@ -649,31 +651,7 @@ public class SyncReplRequestHandler impl
resp.addControl( syncStateControl );
LOG.debug( "Sending {}", entry.getDn() );
- PROVIDER_LOG.debug( "Sending the entry:", entry.getDn() );
- session.getIoSession().write( resp );
- }
-
-
- /**
- * Prepare and send a search result entry response, with the associated
- * SyncState control for a MODDN operation.
- */
- private void sendSearchResultEntry( LdapSession session, SearchRequest req, Entry entry,
- SyncModifyDn modDnControl ) throws Exception
- {
- Attribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );
- SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator(
- ldapServer.getDirectoryService().getLdapCodecService() );
- syncStateControl.setSyncStateType( SyncStateTypeEnum.MODDN );
- syncStateControl.setEntryUUID( Strings.uuidToBytes(uuid.getString()) );
-
- Response resp = generateResponse( session, req, entry );
- resp.addControl( syncStateControl );
- resp.addControl( modDnControl );
-
- LOG.debug( "Sending {}", entry.getDn() );
- PROVIDER_LOG.debug( "Sending the MODDN modification:", entry.getDn() );
-
+ PROVIDER_LOG.debug( "Sending the entry: {}", entry );
session.getIoSession().write( resp );
}
@@ -829,16 +807,6 @@ public class SyncReplRequestHandler impl
public ExprNode modifyFilter( LdapSession session, SearchRequest req ) throws Exception
{
/*
- * Do not add the OR'd (objectClass=referral) expression if the user
- * searches for the subSchemaSubEntry as the SchemaIntercepter can't
- * handle an OR'd filter.
- */
- // if ( isSubSchemaSubEntrySearch( session, req ) )
- // {
- // return;
- // }
-
- /*
* Most of the time the search filter is just (objectClass=*) and if
* this is the case then there's no reason at all to OR this with an
* (objectClass=referral). If we detect this case then we leave it
@@ -1116,7 +1084,7 @@ public class SyncReplRequestHandler impl
{
SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();
searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.E_SYNC_REFRESH_REQUIRED );
- SyncDoneValueDecorator syncDone = new SyncDoneValueDecorator(
+ SyncDoneValue syncDone = new SyncDoneValueDecorator(
ldapServer.getDirectoryService().getLdapCodecService() );
searchDoneResp.addControl( syncDone );
Modified: directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java Fri Sep 2 18:30:57 2011
@@ -33,11 +33,8 @@ import org.apache.directory.server.core.
import org.apache.directory.server.i18n.I18n;
import org.apache.directory.server.ldap.LdapSession;
import org.apache.directory.server.ldap.replication.ReplicaEventMessage;
-import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
-import org.apache.directory.shared.ldap.extras.controls.SyncModifyDnType;
import org.apache.directory.shared.ldap.extras.controls.SyncStateTypeEnum;
import org.apache.directory.shared.ldap.extras.controls.SyncStateValue;
-import org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncModifyDnDecorator;
import org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator;
import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -172,8 +169,8 @@ public class SyncReplSearchListener impl
SyncStateValue syncStateValue = new SyncStateValueDecorator( directoryService.getLdapCodecService() );
syncStateValue.setSyncStateType( operation );
- syncStateValue.setEntryUUID(
- Strings.uuidToBytes( entry.get( SchemaConstants.ENTRY_UUID_AT ).getString() ) );
+ String uuidStr = entry.get( SchemaConstants.ENTRY_UUID_AT ).getString();
+ syncStateValue.setEntryUUID( Strings.uuidToBytes( uuidStr ) );
syncStateValue.setCookie( getCookie( entry ) );
return syncStateValue;
@@ -184,7 +181,7 @@ public class SyncReplSearchListener impl
* Send the result to the consumer. If the consumer has disconnected, we fail back to the queue.
*/
private void sendResult( SearchResultEntry searchResultEntry, Entry entry, EventType eventType,
- SyncStateValue syncStateValue, SyncModifyDn syncModifyDn )
+ SyncStateValue syncStateValue )
{
searchResultEntry.addControl( syncStateValue );
@@ -192,7 +189,7 @@ public class SyncReplSearchListener impl
WriteFuture future = session.getIoSession().write( searchResultEntry );
// Now, send the entry to the consumer
- handleWriteFuture( future, entry, eventType, syncModifyDn );
+ handleWriteFuture( future, entry, eventType );
}
@@ -223,7 +220,7 @@ public class SyncReplSearchListener impl
// Create the control which will be added to the response.
SyncStateValue syncAdd = createControl( directoryService, SyncStateTypeEnum.ADD, entry );
- sendResult( resultEntry, entry, EventType.ADD, syncAdd, null );
+ sendResult( resultEntry, entry, EventType.ADD, syncAdd );
}
}
@@ -266,7 +263,7 @@ public class SyncReplSearchListener impl
SyncStateValue syncDelete = createControl( directoryService, SyncStateTypeEnum.DELETE, entry );
- sendResult( resultEntry, entry, EventType.DELETE, syncDelete, null );
+ sendResult( resultEntry, entry, EventType.DELETE, syncDelete );
}
}
catch ( LdapInvalidAttributeValueException e )
@@ -301,7 +298,7 @@ public class SyncReplSearchListener impl
SyncStateValue syncModify = createControl( directoryService, SyncStateTypeEnum.MODIFY, alteredEntry );
- sendResult( resultEntry, alteredEntry, EventType.MODIFY, syncModify, null );
+ sendResult( resultEntry, alteredEntry, EventType.MODIFY, syncModify );
}
}
catch ( Exception e )
@@ -319,7 +316,8 @@ public class SyncReplSearchListener impl
*/
public void entryMoved( MoveOperationContext moveContext )
{
- Entry entry = moveContext.getOriginalEntry();
+ // should always send the modified entry cause the consumer perform the modDn operation locally
+ Entry entry = moveContext.getModifiedEntry();
try
{
@@ -329,24 +327,18 @@ public class SyncReplSearchListener impl
return;
}
- SyncModifyDn modDnControl =
- new SyncModifyDnDecorator( directoryService.getLdapCodecService(), SyncModifyDnType.MOVE );
- modDnControl.setEntryDn( moveContext.getDn().getNormName() );
- modDnControl.setNewSuperiorDn( moveContext.getNewSuperior().getNormName() );
-
//System.out.println( "MOVE Listener : log " + moveContext.getDn() + " moved to " + moveContext.getNewSuperior() );
- consumerMsgLog.log( new ReplicaEventMessage( modDnControl, entry ) );
+ consumerMsgLog.log( new ReplicaEventMessage( ChangeType.MODDN, entry ) );
if ( pushInRealTime )
{
SearchResultEntry resultEntry = new SearchResultEntryImpl( searchRequest.getMessageId() );
resultEntry.setObjectName( moveContext.getDn() );
resultEntry.setEntry( entry );
- resultEntry.addControl( modDnControl );
SyncStateValue syncModify = createControl( directoryService, SyncStateTypeEnum.MODDN, entry );
- sendResult( resultEntry, entry, null, syncModify, modDnControl );
+ sendResult( resultEntry, entry, null, syncModify );
}
}
catch ( Exception e )
@@ -372,30 +364,22 @@ public class SyncReplSearchListener impl
return;
}
- SyncModifyDnDecorator modDnControl =
- new SyncModifyDnDecorator( directoryService.getLdapCodecService(), SyncModifyDnType.MOVE_AND_RENAME );
- modDnControl.setEntryDn( moveAndRenameContext.getDn().getNormName() );
- modDnControl.setNewSuperiorDn( moveAndRenameContext.getNewSuperiorDn().getNormName() );
- modDnControl.setNewRdn( moveAndRenameContext.getNewRdn().getNormName() );
- modDnControl.setDeleteOldRdn( moveAndRenameContext.getDeleteOldRdn() );
-
- // should always send the original entry cause the consumer perform the modDn operation there
- Entry entry = moveAndRenameContext.getOriginalEntry();
+ // should always send the modified entry cause the consumer perform the modDn operation locally
+ Entry entry = moveAndRenameContext.getModifiedEntry();
//System.out.println( "MOVE AND RENAME Listener : log " + moveAndRenameContext.getDn() +
// " moved to " + moveAndRenameContext.getNewSuperiorDn() + " renamed to " + moveAndRenameContext.getNewRdn() );
- consumerMsgLog.log( new ReplicaEventMessage( modDnControl, entry ) );
+ consumerMsgLog.log( new ReplicaEventMessage( ChangeType.MODDN, entry ) );
if ( pushInRealTime )
{
SearchResultEntry resultEntry = new SearchResultEntryImpl( searchRequest.getMessageId() );
resultEntry.setObjectName( entry.getDn() );
resultEntry.setEntry( entry );
- resultEntry.addControl( modDnControl );
SyncStateValue syncModify = createControl( directoryService, SyncStateTypeEnum.MODDN, entry );
- sendResult( resultEntry, entry, null, syncModify, modDnControl );
+ sendResult( resultEntry, entry, null, syncModify );
}
}
catch ( Exception e )
@@ -413,33 +397,27 @@ public class SyncReplSearchListener impl
*/
public void entryRenamed( RenameOperationContext renameContext )
{
- Entry entry = renameContext.getOriginalEntry();
+ // should always send the modified entry cause the consumer perform the modDn operation locally
+ Entry entry = renameContext.getModifiedEntry();
try
{
- SyncModifyDnDecorator modDnControl = new SyncModifyDnDecorator( directoryService.getLdapCodecService() );
- modDnControl.setModDnType( SyncModifyDnType.RENAME );
- modDnControl.setEntryDn( renameContext.getDn().getName() );
- modDnControl.setNewRdn( renameContext.getNewRdn().getName() );
- modDnControl.setDeleteOldRdn( renameContext.getDeleteOldRdn() );
-
// should always send the original entry cause the consumer perform the modDn operation there
//System.out.println( "RENAME Listener : log " + renameContext.getDn() + " renamed to " + renameContext.getNewRdn() );
- consumerMsgLog.log( new ReplicaEventMessage( modDnControl, entry ) );
+ consumerMsgLog.log( new ReplicaEventMessage( ChangeType.MODDN, entry ) );
if ( pushInRealTime )
{
SearchResultEntry resultEntry = new SearchResultEntryImpl( searchRequest.getMessageId() );
resultEntry.setObjectName( entry.getDn() );
resultEntry.setEntry( entry );
- resultEntry.addControl( modDnControl );
SyncStateValue syncModify = createControl( directoryService, SyncStateTypeEnum.MODDN, entry );
// In this case, the cookie is different
syncModify.setCookie( getCookie( entry ) );
- sendResult( resultEntry, entry, null, syncModify, modDnControl );
+ sendResult( resultEntry, entry, null, syncModify );
}
}
catch ( Exception e )
@@ -482,7 +460,7 @@ public class SyncReplSearchListener impl
/**
* Process the writing of the replicated entry to the consumer
*/
- private void handleWriteFuture( WriteFuture future, Entry entry, EventType event, SyncModifyDn modDnControl )
+ private void handleWriteFuture( WriteFuture future, Entry entry, EventType event )
{
// Let the operation be executed.
// Note : we wait 10 seconds max
Propchange: directory/apacheds/branches/one-sub-level-index-removal/protocol-ntp/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -3,5 +3,5 @@
/directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ntp:980138-980936
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-ntp:1040956-1043765
/directory/apacheds/branches/milestones/protocol-ntp:1072812-1075328
-/directory/apacheds/trunk/protocol-ntp:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/protocol-ntp:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/protocol-ntp:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/protocol-shared/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -1,7 +1,8 @@
/directory/apacheds/branches/apacheds-codec-merge/protocol-shared:982369-987590
/directory/apacheds/branches/apacheds-config/protocol-shared:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-shared:980138-980936
+/directory/apacheds/branches/apacheds-jdbm/protocol-shared:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-shared:1040956-1043765
/directory/apacheds/branches/milestones/protocol-shared:1072812-1075328
-/directory/apacheds/trunk/protocol-shared:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/protocol-shared:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/protocol-shared:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-annotations/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -1,7 +1,8 @@
/directory/apacheds/branches/apacheds-codec-merge/server-annotations:982369-987590
/directory/apacheds/branches/apacheds-config/server-annotations:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-annotations:980138-980937
+/directory/apacheds/branches/apacheds-jdbm/server-annotations:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-annotations:1040956-1043765
/directory/apacheds/branches/milestones/server-annotations:1072812-1075328
-/directory/apacheds/trunk/server-annotations:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-annotations:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-annotations:1067786-1067997
Modified: directory/apacheds/branches/one-sub-level-index-removal/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java Fri Sep 2 18:30:57 2011
@@ -39,7 +39,7 @@ import org.apache.directory.server.ldap.
import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmProvider;
import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
-import org.apache.directory.server.ldap.replication.consumer.SyncReplConsumer;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl;
import org.apache.directory.server.protocol.shared.transport.TcpTransport;
import org.apache.directory.server.protocol.shared.transport.Transport;
import org.apache.directory.server.protocol.shared.transport.UdpTransport;
@@ -225,7 +225,7 @@ public class ServerAnnotationProcessor
*/
private static ReplicationConsumer createConsumer( CreateConsumer createConsumer )
{
- ReplicationConsumer consumer = new SyncReplConsumer();
+ ReplicationConsumer consumer = new ReplicationConsumerImpl();
SyncreplConfiguration config = new SyncreplConfiguration();
config.setRemoteHost( createConsumer.remoteHost() );
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-config/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -2,8 +2,9 @@
/directory/apacheds/branches/apacheds-codec-merge/server-config:982369-987590
/directory/apacheds/branches/apacheds-config/server-config:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-config:980138-980938
+/directory/apacheds/branches/apacheds-jdbm/server-config:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-config:1040956-1043765
/directory/apacheds/branches/milestones/server-config:1072812-1075328
/directory/apacheds/branches/server-config-annotations/server-config:1042727-1043868
-/directory/apacheds/trunk/server-config:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-config:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-config:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -2,6 +2,7 @@
/directory/apacheds/branches/apacheds-codec-merge/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:982369-987590
/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:980138-980938
+/directory/apacheds/branches/apacheds-jdbm/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1040956-1043765
/directory/apacheds/branches/apacheds-replication/core-annotations/src/main/java/org/apache/directory/server/core/factory/ConfigPartitionReader.java:749790-764110
/directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/factory/ConfigPartitionReader.java:806623-896441
@@ -9,5 +10,5 @@
/directory/apacheds/branches/milestones/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1072812-1075328
/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1042727-1043868
/directory/apacheds/branches/xdbm-refactoring/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:945827-946347
-/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-config/src/main/resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -3,6 +3,7 @@
/directory/apacheds/branches/apacheds-codec-merge/server-config/src/main/resources:982369-987590
/directory/apacheds/branches/apacheds-config/server-config/src/main/resources:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-config/src/main/resources:980138-980938
+/directory/apacheds/branches/apacheds-jdbm/server-config/src/main/resources:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-config/src/main/resources:1040956-1043765
/directory/apacheds/branches/apacheds-replication/core-annotations/src/main/resources:749790-764110
/directory/apacheds/branches/apacheds-replication/default-config/src/main/resources:749790-764110
@@ -12,5 +13,5 @@
/directory/apacheds/branches/milestones/server-config/src/main/resources:1072812-1075328
/directory/apacheds/branches/server-config-annotations/server-config/src/main/resources:1042727-1043868
/directory/apacheds/branches/xdbm-refactoring/default-config/src/main/resources:945827-946347
-/directory/apacheds/trunk/server-config/src/main/resources:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-config/src/main/resources:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-config/src/main/resources:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -3,6 +3,7 @@
/directory/apacheds/branches/apacheds-codec-merge/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:982369-987590
/directory/apacheds/branches/apacheds-config/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:980138-980938
+/directory/apacheds/branches/apacheds-jdbm/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1040956-1043765
/directory/apacheds/branches/apacheds-replication/core-annotations/src/main/java/org/apache/directory/server/core/factory/CiDITDirectoryServiceFactory.java:749790-764110
/directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/factory/CiDITDirectoryServiceFactory.java:806623-896441
@@ -11,5 +12,5 @@
/directory/apacheds/branches/milestones/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1072812-1075328
/directory/apacheds/branches/server-config-annotations/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1042727-1043868
/directory/apacheds/branches/xdbm-refactoring/default-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:945827-946347
-/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-integ/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -2,7 +2,8 @@
/directory/apacheds/branches/apacheds-codec-merge/server-integ:982369-987590
/directory/apacheds/branches/apacheds-config/server-integ:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-integ:980138-980937
+/directory/apacheds/branches/apacheds-jdbm/server-integ:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-integ:1040956-1043765
/directory/apacheds/branches/milestones/server-integ:1072812-1075328
-/directory/apacheds/trunk/server-integ:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-integ:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-integ:1067786-1067997
Modified: directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java Fri Sep 2 18:30:57 2011
@@ -33,6 +33,7 @@ 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.integ.ServerIntegrationUtils;
+import org.apache.directory.shared.util.Strings;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -96,7 +97,7 @@ public class MatchingRuleCompareIT exten
ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
String[] values =
- { PERSON_SN, PERSON_SN.toUpperCase(), PERSON_SN.toLowerCase(), PERSON_SN + "X" };
+ { PERSON_SN, PERSON_SN.toUpperCase(), Strings.toLowerCase( PERSON_SN ), PERSON_SN + "X" };
boolean[] expected =
{ true, true, true, false };
Modified: directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java Fri Sep 2 18:30:57 2011
@@ -50,6 +50,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.junit.Ignore;
/**
@@ -98,6 +99,7 @@ public class StoredProcedureIT extends A
}
+ @Ignore
@Test
public void testExecuteProcedureWithReturnValue() throws Exception
{
@@ -109,6 +111,7 @@ public class StoredProcedureIT extends A
}
+ @Ignore
@Test
public void testExecuteProcedureWithParametersAndReturnValue() throws Exception
{
Modified: directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/replication/ClientServerReplicationIT.java Fri Sep 2 18:30:57 2011
@@ -44,7 +44,7 @@ import org.apache.directory.server.core.
import org.apache.directory.server.factory.ServerAnnotationProcessor;
import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
-import org.apache.directory.server.ldap.replication.consumer.SyncReplConsumer;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl;
import org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler;
import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -60,6 +60,8 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Tests for replication subsystem in client-server mode.
@@ -68,6 +70,7 @@ import org.junit.Test;
*/
public class ClientServerReplicationIT
{
+ private static final Logger CONSUMER_LOG = LoggerFactory.getLogger( "CONSUMER_LOG" );
private static LdapServer providerServer;
private static LdapServer consumerServer;
@@ -106,9 +109,10 @@ public class ClientServerReplicationIT
searchRequest.setBase( new Dn( schemaManager, "dc=example,dc=com" ) );
searchRequest.setFilter( "(objectClass=*)" );
searchRequest.setScope( SearchScope.SUBTREE );
+ searchRequest.addAttributes( "entryUuid" );
- System.out.println( "-----------> Dumping the consumer <-----------" );
- System.out.println( "-----------> Looking for " + entryDn.getNormName() + " <-----------" );
+ CONSUMER_LOG.debug( "-----------> Dumping the server <-----------" );
+ CONSUMER_LOG.debug( "-----------> Looking for " + entryDn.getNormName() + " <-----------" );
EntryFilteringCursor cursor = session.search( searchRequest );
@@ -118,17 +122,18 @@ public class ClientServerReplicationIT
if ( entry.getDn().equals( entryDn ) )
{
- System.out.println( "The searched entry exists !!!" );
- break;
+ CONSUMER_LOG.debug( "The searched entry exists !!!" );
+ CONSUMER_LOG.debug( "found Entry " + entry.getDn().getNormName() + " exists, entrtyUuid = " + entry.get( "entryUuid" ) );
+ continue;
}
- System.out.println( "Entry " + entry.getDn().getNormName() + " exists" );
+ CONSUMER_LOG.debug( "Entry " + entry.getDn().getNormName() + " exists, entrtyUuid = " + entry.get( "entryUuid" ) );
}
cursor.close();
- System.out.println( "-----------> Dump done <-----------" );
- new Exception().printStackTrace();
+ CONSUMER_LOG.debug( "-----------> Dump done <-----------" );
+ //new Exception().printStackTrace();
}
catch ( Exception le )
{
@@ -191,27 +196,29 @@ public class ClientServerReplicationIT
private boolean checkEntryDeletion( CoreSession session, Dn entryDn ) throws Exception
{
boolean exists = session.exists( entryDn );
- boolean deleted = false;
+
+ if ( ! exists )
+ {
+ return true;
+ }
for ( int i = 0; i < 100; i++ )
{
Thread.sleep( 50 );
- if ( !session.exists( entryDn ) )
+ exists = session.exists( entryDn );
+
+ if ( !exists )
{
- deleted = true;
- break;
+ return true;
}
Thread.sleep( 50 );
}
- if ( !exists || !deleted )
- {
- dump( session, entryDn );
- }
+ dump( session, entryDn );
- return exists && deleted;
+ return false;
}
@@ -385,39 +392,23 @@ public class ClientServerReplicationIT
}
- @Test
- public void testRebootConsumer() throws Exception
+ private Entry restartConsumer( Entry provUser ) throws Exception
{
- System.out.println( "----> 1 testRebootConsumer started --------------------------------" );
- Entry provUser = createEntry();
-
- assertFalse( providerSession.exists(provUser.getDn() ) );
- assertFalse( consumerSession.exists(provUser.getDn() ) );
-
- System.out.println( "----> 2 Adding entry " + provUser.getDn() +" in provider --------------------------------" );
- providerSession.add( provUser );
-
- assertTrue( checkEntryExistence( consumerSession, provUser.getDn() ) );
- waitAndCompareEntries( provUser.getDn() );
-
- System.out.println( "----> 3 entry " + provUser.getDn() +" present in consumer --------------------------------" );
-
- assertTrue( providerSession.exists(provUser.getDn() ) );
- assertTrue( consumerSession.exists(provUser.getDn() ) );
-
// Now stop the consumer
- System.out.println( "----> 4 Stopping the consumer --------------------------------" );
+ CONSUMER_LOG.debug( "--------------------------------------------------------------" );
+ CONSUMER_LOG.debug( "----> 1 Stopping the consumer --------------------------------" );
+ CONSUMER_LOG.debug( "--------------------------------------------------------------" );
consumerServer.stop();
// And delete the entry in the provider
Dn deletedUserDn = provUser.getDn();
- System.out.println( "----> 5 deleting entry " + deletedUserDn + " from provider --------------------------------" );
+ //System.out.println( "----> 5 deleting entry " + deletedUserDn + " from provider --------------------------------" );
providerSession.delete( deletedUserDn );
// Create a new entry
provUser = createEntry();
Dn addedUserDn = provUser.getDn();
- System.out.println( "----> 6 adding entry " + provUser.getDn() + " into provider --------------------------------" );
+ //System.out.println( "----> 6 adding entry " + provUser.getDn() + " into provider --------------------------------" );
providerSession.add( provUser );
// let the provider log the events before the consumer sends a request
@@ -426,18 +417,57 @@ public class ClientServerReplicationIT
Thread.sleep( 1000 );
// Restart the consumer
- System.out.println( "----> 7 Restarting the consumer --------------------------------" );
+ CONSUMER_LOG.debug( "--------------------------------------------------------------" );
+ CONSUMER_LOG.debug( "----> 2 Restarting the consumer --------------------------------" );
+ CONSUMER_LOG.debug( "--------------------------------------------------------------" );
consumerServer.start();
- assertTrue( consumerSession.exists( deletedUserDn ) );
- System.out.println( "----> 7bis entry " + deletedUserDn + " is still present in consumer --------------------------------" );
+ //assertTrue( consumerSession.exists( deletedUserDn ) );
+ //System.out.println( "----> 7bis entry " + deletedUserDn + " is still present in consumer --------------------------------" );
assertTrue( checkEntryDeletion( consumerSession, deletedUserDn ) );
- System.out.println( "----> 8 Entry " + deletedUserDn + " deleted from consumer --------------------------------" );
+ //System.out.println( "----> 8 Entry " + deletedUserDn + " deleted from consumer --------------------------------" );
assertTrue( checkEntryExistence( consumerSession, addedUserDn ) );
waitAndCompareEntries( addedUserDn );
- System.out.println( "----> 8 Entry " + addedUserDn + " added into consumer --------------------------------" );
+ //System.out.println( "----> 8 Entry " + addedUserDn + " added into consumer --------------------------------" );
+
+ return provUser;
+ }
+
+
+ @Test
+ @Ignore( "we have some random failures" )
+ public void testRebootConsumer() throws Exception
+ {
+ System.out.println( "----> 1 testRebootConsumer started --------------------------------" );
+ Entry provUser = createEntry();
+
+ assertFalse( providerSession.exists(provUser.getDn() ) );
+ assertFalse( consumerSession.exists(provUser.getDn() ) );
+
+ System.out.println( "----> 2 Adding entry " + provUser.getDn() +" in provider --------------------------------" );
+ providerSession.add( provUser );
+
+ assertTrue( checkEntryExistence( consumerSession, provUser.getDn() ) );
+ waitAndCompareEntries( provUser.getDn() );
+
+ System.out.println( "----> 3 entry " + provUser.getDn() +" present in consumer --------------------------------" );
+
+ assertTrue( providerSession.exists(provUser.getDn() ) );
+ assertTrue( consumerSession.exists(provUser.getDn() ) );
+
+ for ( int i = 0; i < 1000; i++ )
+ {
+ CONSUMER_LOG.debug( "=============================== Loop " + i );
+ System.out.println( "=============================== Loop " + i );
+ provUser = restartConsumer( provUser );
+ }
+
+ CONSUMER_LOG.debug( "===========> Dumping the provider <===========" );
+ dump( providerSession, Dn.ROOT_DSE );
+ CONSUMER_LOG.debug( "===========> Dumping the consumer <===========" );
+ dump( consumerSession, Dn.ROOT_DSE );
}
@@ -558,7 +588,7 @@ public class ClientServerReplicationIT
DirectoryService provDirService = DSAnnotationProcessor.getDirectoryService();
consumerServer = ServerAnnotationProcessor.getLdapServer( provDirService );
- final SyncReplConsumer consumer = (SyncReplConsumer)ServerAnnotationProcessor.createConsumer();
+ final ReplicationConsumerImpl consumer = (ReplicationConsumerImpl)ServerAnnotationProcessor.createConsumer();
List<ReplicationConsumer> replConsumers = new ArrayList<ReplicationConsumer>();
replConsumers.add( consumer );
Modified: directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java Fri Sep 2 18:30:57 2011
@@ -44,14 +44,15 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory;
import org.apache.directory.shared.ldap.extras.controls.SyncDoneValue;
import org.apache.directory.shared.ldap.extras.controls.SyncInfoValue;
-import org.apache.directory.shared.ldap.extras.controls.SyncModifyDn;
import org.apache.directory.shared.ldap.extras.controls.SyncModifyDnType;
+import org.apache.directory.shared.ldap.extras.controls.SyncRequestValue;
import org.apache.directory.shared.ldap.extras.controls.SyncStateTypeEnum;
import org.apache.directory.shared.ldap.extras.controls.SyncStateValue;
import org.apache.directory.shared.ldap.extras.controls.SynchronizationModeEnum;
import org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueDecorator;
import org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueDecorator;
import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
import org.apache.directory.shared.ldap.model.entry.Attribute;
import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
import org.apache.directory.shared.ldap.model.entry.DefaultModification;
@@ -73,6 +74,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.message.SearchResultDone;
import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
import org.apache.directory.shared.ldap.model.message.SearchResultReference;
+import org.apache.directory.shared.ldap.model.message.SearchScope;
import org.apache.directory.shared.ldap.model.name.Dn;
import org.apache.directory.shared.ldap.model.name.Rdn;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
@@ -317,7 +319,7 @@ public class MockSyncReplConsumer implem
switch ( state )
{
case ADD:
- //System.out.println( "Entry added : " + remoteEntry.getDn() );
+ LOG.debug( "adding entry with dn {}, {}", remoteEntry.getDn().getName(), remoteEntry );
nbAdded.getAndIncrement();
break;
@@ -327,9 +329,9 @@ public class MockSyncReplConsumer implem
break;
case MODDN:
- SyncModifyDn adsModDnControl = ( SyncModifyDn ) syncResult.getControls().get( SyncModifyDn.OID );
- //Apache Directory Server's special control
- applyModDnOperation( adsModDnControl );
+ String entryUuid = Strings.uuidToString( syncStateCtrl.getEntryUUID() );
+ applyModDnOperation( remoteEntry, entryUuid );
+
break;
case DELETE:
@@ -369,10 +371,10 @@ public class MockSyncReplConsumer implem
{
LOG.debug( "............... inside handleSyncInfo ..............." );
- SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( ldapCodecService );
+ SyncInfoValue decorator = new SyncInfoValueDecorator( ldapCodecService );
byte[] syncinfo = syncInfoResp.getResponseValue();
- decorator.setValue( syncinfo );
- SyncInfoValue syncInfoValue = decorator.getDecorated();
+ ((SyncInfoValueDecorator)decorator).setValue( syncinfo );
+ SyncInfoValue syncInfoValue = ((SyncInfoValueDecorator)decorator).getDecorated();
byte[] cookie = syncInfoValue.getCookie();
@@ -514,7 +516,7 @@ public class MockSyncReplConsumer implem
*/
private void doSyncSearch( SynchronizationModeEnum syncType, boolean reloadHint ) throws Exception
{
- SyncRequestValueDecorator syncReq = new SyncRequestValueDecorator( ldapCodecService );
+ SyncRequestValue syncReq = new SyncRequestValueDecorator( ldapCodecService );
syncReq.setMode( syncType );
syncReq.setReloadHint( reloadHint );
@@ -553,6 +555,7 @@ public class MockSyncReplConsumer implem
ResultCodeEnum resultCode = handleSearchDone( ( SearchResultDone ) resp );
LOG.debug( "sync operation returned result code {}", resultCode );
+
if ( resultCode == ResultCodeEnum.NO_SUCH_OBJECT )
{
// log the error and handle it appropriately
@@ -697,42 +700,77 @@ public class MockSyncReplConsumer implem
}
- private void applyModDnOperation( SyncModifyDn modDnControl ) throws Exception
+ private void applyModDnOperation( Entry remoteEntry, String entryUuid ) throws Exception
{
- SyncModifyDnType modDnType = modDnControl.getModDnType();
+ LOG.debug( "MODDN for entry {}, new entry : {}", entryUuid, remoteEntry );
+
+ // First, compute the MODDN type
+ SyncModifyDnType modDnType = null;
- Dn entryDn = new Dn( modDnControl.getEntryDn() );
- switch ( modDnType )
+ try
{
- case MOVE:
+ // Retrieve locally the moved or renamed entry
+ String filter = "(entryUuid=" + entryUuid + ")";
+ EntryCursor cursor = connection.search( Dn.ROOT_DSE, filter, SearchScope.SUBTREE, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+
+ Entry localEntry = cursor.get();
+
+ // Compute the DN, parentDn and Rdn for both entries
+ Dn localDn = localEntry.getDn();
+ Dn remoteDn = remoteEntry.getDn();
+
+ Dn localParentDn = localDn.getParent();
+ Dn remoteParentDn = remoteDn.getParent();
- LOG.debug( "moving {} to the new parent {}", entryDn, modDnControl.getNewSuperiorDn() );
+ Rdn localRdn = localDn.getRdn();
+ Rdn remoteRdn = remoteDn.getRdn();
- //session.move( entryDn, new Dn( modDnControl.getNewSuperiorDn() ) );
- break;
+ // If the RDN are equals, it's a MOVE
+ if ( localRdn.equals( remoteRdn ) )
+ {
+ modDnType = SyncModifyDnType.MOVE;
+ }
+
+ // If the parentDn are equals, it's a RENAME
+ if ( localParentDn.equals( remoteParentDn ) )
+ {
+ modDnType = SyncModifyDnType.RENAME;
+ }
- case RENAME:
+ // Otherwise, it's a MOVE and RENAME
+ if ( modDnType == null )
+ {
+ modDnType = SyncModifyDnType.MOVE_AND_RENAME;
+ }
- Rdn newRdn = new Rdn( modDnControl.getNewRdn() );
- boolean deleteOldRdn = modDnControl.isDeleteOldRdn();
- LOG.debug( "renaming the Dn {} with new Rdn {} and deleteOldRdn flag set to {}", new String[]
- { entryDn.getName(), newRdn.getName(), String.valueOf( deleteOldRdn ) } );
+ // Check if the OldRdn has been deleted
+ boolean deleteOldRdn = remoteEntry.contains( localRdn.getNormType(), localRdn.getNormValue() );
- //session.rename( entryDn, newRdn, deleteOldRdn );
- break;
+ switch ( modDnType )
+ {
+ case MOVE:
+ LOG.debug( "moving {} to the new parent {}", localDn, remoteParentDn );
+
+ break;
- case MOVE_AND_RENAME:
+ case RENAME:
+ LOG.debug( "renaming the Dn {} with new Rdn {} and deleteOldRdn flag set to {}", new String[]
+ { localDn.getName(), remoteRdn.getName(), String.valueOf( deleteOldRdn ) } );
- Dn newParentDn = new Dn( modDnControl.getNewSuperiorDn() );
- newRdn = new Rdn( modDnControl.getNewRdn() );
- deleteOldRdn = modDnControl.isDeleteOldRdn();
+ break;
- LOG.debug(
- "moveAndRename on the Dn {} with new newParent Dn {}, new Rdn {} and deleteOldRdn flag set to {}",
- new String[]
- { entryDn.getName(), newParentDn.getName(), newRdn.getName(), String.valueOf( deleteOldRdn ) } );
+ case MOVE_AND_RENAME:
+ LOG.debug(
+ "moveAndRename on the Dn {} with new newParent Dn {}, new Rdn {} and deleteOldRdn flag set to {}",
+ new String[]
+ { localDn.getName(), remoteParentDn.getName(), remoteRdn.getName(), String.valueOf( deleteOldRdn ) } );
- //session.moveAndRename( entryDn, newParentDn, newRdn, deleteOldRdn );
+ break;
+ }
+ }
+ catch ( Exception e )
+ {
+ throw e;
}
}
Modified: directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java Fri Sep 2 18:30:57 2011
@@ -49,6 +49,7 @@ import org.apache.directory.server.opera
import org.apache.directory.shared.ldap.model.constants.SupportedSaslMechanisms;
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.apache.directory.shared.ldap.model.name.Dn;
+import org.apache.directory.shared.util.Strings;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -152,8 +153,10 @@ public class LdapsUpdateCertificateIT ex
String subjectDN = lastReceivedServerCertificates[0].getSubjectDN().getName();
// converting the values to lowercase is required cause the certificate is
// having attribute names in capital letters e.c the above newIssuerDN will be present as CN=new_issuer_dn
- assertEquals( "Expected the new certificate with the new issuer", newIssuerDN.toLowerCase(), issuerDN.toLowerCase() );
- assertEquals( "Expected the new certificate with the new subject", newSubjectDN.toLowerCase(), subjectDN.toLowerCase() );
+ assertEquals( "Expected the new certificate with the new issuer",
+ Strings.toLowerCase( newIssuerDN ), Strings.toLowerCase( issuerDN ) );
+ assertEquals( "Expected the new certificate with the new subject",
+ Strings.toLowerCase( newSubjectDN ), Strings.toLowerCase( subjectDN ) );
}
}
Modified: directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java Fri Sep 2 18:30:57 2011
@@ -53,6 +53,7 @@ import org.apache.directory.server.core.
import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
import org.apache.directory.shared.ldap.model.entry.Entry;
import org.apache.directory.shared.ldap.model.name.Dn;
+import org.apache.directory.shared.util.Strings;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -208,7 +209,7 @@ public class StartTlsUpdateCertificateIT
assertEquals( 1, lastReceivedServerCertificates.length );
String issuerDN = lastReceivedServerCertificates[0].getIssuerDN().getName();
String subjectDN = lastReceivedServerCertificates[0].getSubjectDN().getName();
- assertEquals( "Expected the new certificate with the new issuer", newIssuerDN.toLowerCase(), issuerDN.toLowerCase() );
- assertEquals( "Expected the new certificate with the new subject", newSubjectDN.toLowerCase(), subjectDN.toLowerCase() );
+ assertEquals( "Expected the new certificate with the new issuer", Strings.toLowerCase( newIssuerDN ), Strings.toLowerCase( issuerDN ) );
+ assertEquals( "Expected the new certificate with the new subject", Strings.toLowerCase( newSubjectDN ), Strings.toLowerCase( subjectDN ) );
}
}
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-jndi/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -1,7 +1,8 @@
/directory/apacheds/branches/apacheds-codec-merge/server-jndi:982369-987590
/directory/apacheds/branches/apacheds-config/server-jndi:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-jndi:980138-980937
+/directory/apacheds/branches/apacheds-jdbm/server-jndi:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-jndi:1040956-1043765
/directory/apacheds/branches/milestones/server-jndi:1072812-1075328
-/directory/apacheds/trunk/server-jndi:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-jndi:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-jndi:1067786-1067997
Modified: directory/apacheds/branches/one-sub-level-index-removal/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java Fri Sep 2 18:30:57 2011
@@ -425,7 +425,7 @@ public class ApacheDS
{
public boolean accept( File pathname )
{
- boolean isLdif = pathname.getName().toLowerCase().endsWith( ".ldif" );
+ boolean isLdif = Strings.toLowerCase( pathname.getName() ).endsWith( ".ldif" );
return pathname.isFile() && pathname.canRead() && isLdif;
}
} );
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-replication/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -3,5 +3,5 @@
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-replication:980138-980937
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-replication:1040956-1043765
/directory/apacheds/branches/milestones/server-replication:1072812-1075328
-/directory/apacheds/trunk/server-replication:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-replication:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-replication:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/server-tools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -3,5 +3,5 @@
/directory/apacheds/branches/apacheds-dnfactory-experiment/server-tools:980138-980937
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/server-tools:1040956-1043765
/directory/apacheds/branches/milestones/server-tools:1072812-1075328
-/directory/apacheds/trunk/server-tools:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/server-tools:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/server-tools:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/service/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -0,0 +1,11 @@
+/directory/apacheds/branches/apacheds-codec-merge/service:982369-987590
+/directory/apacheds/branches/apacheds-config/service:1023442-1029077
+/directory/apacheds/branches/apacheds-jdbm/service:1160768-1164092
+/directory/apacheds/branches/apacheds-kerberos-codec-2.0/service:1040956-1043765
+/directory/apacheds/branches/apacheds-replication/service:749790-764110
+/directory/apacheds/branches/apacheds-schema/service:806623-896441
+/directory/apacheds/branches/apacheds-subtree/service:965203-965686
+/directory/apacheds/branches/milestones/service:1072812-1075328
+/directory/apacheds/branches/xdbm-refactoring/service:945827-946347
+/directory/apacheds/trunk/service:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
+/directory/studio/trunk/service:1067786-1067997
Propchange: directory/apacheds/branches/one-sub-level-index-removal/service-builder/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -1,4 +1,4 @@
/directory/apacheds/branches/antoine/service-builder:1038305-1044163
/directory/apacheds/branches/milestones/service-builder:1072812-1075328
-/directory/apacheds/trunk/service-builder:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/service-builder:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/service-builder:1067786-1067997
Modified: directory/apacheds/branches/one-sub-level-index-removal/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java Fri Sep 2 18:30:57 2011
@@ -84,7 +84,7 @@ import org.apache.directory.server.ldap.
import org.apache.directory.server.ldap.replication.ReplicationTrustManager;
import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumer;
-import org.apache.directory.server.ldap.replication.consumer.SyncReplConsumer;
+import org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl;
import org.apache.directory.server.ldap.replication.provider.ReplicationRequestHandler;
import org.apache.directory.server.ntp.NtpServer;
import org.apache.directory.server.protocol.shared.transport.TcpTransport;
@@ -102,6 +102,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.message.SearchScope;
import org.apache.directory.shared.ldap.model.schema.AttributeType;
import org.apache.directory.shared.ldap.model.schema.SchemaManager;
+import org.bouncycastle.util.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -127,7 +128,7 @@ public class ServiceBuilder
return true;
}
- return file.getName().toLowerCase().endsWith( ".ldif" );
+ return Strings.toLowerCase( file.getName() ).endsWith( ".ldif" );
}
};
@@ -996,7 +997,7 @@ public class ServiceBuilder
{
if( className == null )
{
- consumerClass = SyncReplConsumer.class;
+ consumerClass = ReplicationConsumerImpl.class;
}
else
{
Propchange: directory/apacheds/branches/one-sub-level-index-removal/test-framework/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -9,5 +9,5 @@
/directory/apacheds/branches/apacheds-subtree/test-framework:965203-965686
/directory/apacheds/branches/milestones/test-framework:1072812-1075328
/directory/apacheds/branches/xdbm-refactoring/test-framework:945827-946347
-/directory/apacheds/trunk/test-framework:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/test-framework:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/test-framework:1067786-1067997
Modified: directory/apacheds/branches/one-sub-level-index-removal/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java Fri Sep 2 18:30:57 2011
@@ -102,7 +102,6 @@ public class FrameworkRunner extends Blo
"org.apache.directory.shared.ldap.extras.controls.ppolicy.PasswordPolicyFactory," +
"org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory," +
"org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory," +
- "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncModifyDnFactory," +
"org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory," +
"org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory" );
Modified: directory/apacheds/branches/one-sub-level-index-removal/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java?rev=1164667&r1=1164666&r2=1164667&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java Fri Sep 2 18:30:57 2011
@@ -78,7 +78,6 @@ public class FrameworkSuite extends Suit
"org.apache.directory.shared.ldap.extras.controls.ppolicy.PasswordPolicyFactory," +
"org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory," +
"org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory," +
- "org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncModifyDnFactory," +
"org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory," +
"org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory" );
Propchange: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 18:30:57 2011
@@ -1,7 +1,8 @@
/directory/apacheds/branches/apacheds-codec-merge/xdbm-partition:982369-987590
/directory/apacheds/branches/apacheds-config/xdbm-partition:1023442-1029077
/directory/apacheds/branches/apacheds-dnfactory-experiment/xdbm-partition:980138-980938
+/directory/apacheds/branches/apacheds-jdbm/xdbm-partition:1160768-1164092
/directory/apacheds/branches/apacheds-kerberos-codec-2.0/xdbm-partition:1040956-1043765
/directory/apacheds/branches/milestones/xdbm-partition:1072812-1075328
-/directory/apacheds/trunk/xdbm-partition:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1161268
+/directory/apacheds/trunk/xdbm-partition:1066126-1067785,1068026-1072718,1072800-1075329,1158399-1164660
/directory/studio/trunk/xdbm-partition:1067786-1067997