17 Oct, 2013

2 commits


16 Oct, 2013

2 commits


15 Oct, 2013

4 commits


14 Oct, 2013

3 commits


12 Oct, 2013

1 commit


11 Oct, 2013

9 commits

  • * Adjust opendj-rest2ldap-servlet dependencies
      - Add dependency on opendj-grizzly jar in generated war 
      - No dependency on opendj-grizzly for use by another component
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9720 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • 
    ReplicationTestCase.java:
    In executeTask() and waitTaskState() added maxWaitTimeInMillis parameter.
    
    HistoricalTest.java:
    In testRecurringPurgeIn1Run(), added a sleep before configuring conflicts purge delay + waited purge for a maximum of 120 seconds (was approximatively 20 seconds before): as long as task max duration.
    
    InitOnLineTest.java, ReplicationServerTest.java:
    Consequence of the change to ReplicationTestCase.
    
    GenerationIdTest.java:
    Consequence of the change to ReplicationTestCase.
    Extracted method createSetGenerationIdTask().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9719 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • * Added dependency-reduced-pom.xml to svn:ignore property
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9715 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • * Removed dependency-reduced-pom.xml as it is a file generated by the build
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9714 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • * Fix issue with dependencies when using opendj-ldap-sdk
       Now we ensure that :
       - maven-based clients don't get dependencies on opendj-core and opendj-grizzly  
       - non-maven-based clients can use jar with all dependencies included
     
     opendj-ldap-sdk module uses:
     - maven-shade-plugin to build a jar from opendj-core and opendj-grizzly, to hide opendj-core and opendj-grizzly and to provide a corresponding (reduced) pom
     - copy-maven-plugin to extract content of jar into target/classes directory (needed by bundle)
     - maven-bundle-plugin to generate a custom META-INF/MANIFEST file
     
    * Remove duplicated javadoc/overview.html file
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9713 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • In computeInitialServerStatus(), used early exits.
    In computeBestServerForWeight(), extracted methods computeBestServerWhenNotConnected() and computeBestServerWhenConnected().
    Changed replicationServerUrls from Collection<String> to Set<String>.
    Removed useless field initialization to null.
    Renamed _publish() to publish() + reduced local variables scope.
    In receive(), renamed local variable replicationServerID to previousRsServerID and used this one more rather than the field.
    In changeConfig(), used Set.equals().
    Changed getReplicationMonitor() to getReplicationMonitorInstanceName().
    
    ReplicationDomain.java:
    Consequence of the change to ReplicationBroker.getReplicationMonitor(), inlined getReplicationMonitorInstanceName().
    Consequence of the change to ReplicationBroker.replicationServerUrls.
    
    TestCaseUtils.java:
    Moved newSet(), newSortedSet(), newList() here from test classes.
    
    *Test.java:
    Consequence of the changes to ReplicationBroker.replicationServerUrls.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9712 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • package org.opends.server.types requires javadoc even for private methods.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9711 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • RDN.java:
    In getDNValue(), changed parameter from String to ByteString.
    In compareTo(), reordered the if statements + extracted method compare().
    Comments => javadocs
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9710 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Fixed a regression introduced in r9605:  It was found by Christophe Sovant with the functional test suite.
    
    Partial revert of r9605:
    Using DN.toNormalizedString() should have been only done for replication metadata, not for user data because OpenDJ stores and returns data like provided by users.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9709 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

10 Oct, 2013

12 commits

  • * simplify module names
    * minor pom cleanup
    * minor file cleanup, e.g. remove unused directories, etc.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9708 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • Fixed a regression introduced in r9677. It was found by Christophe Sovant with the functional test suite:
    When throwing a DirectoryException with ERR_RESYNC_REQUIRED_UNKNOWN_DOMAIN_IN_PROVIDED_COOKIE, the domainCtxts is read before it is written to.
    This code should have been changed to iterate on the Set<DomainContext> rather than the domainCtxts field which has not been assigned at this point.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9707 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9706 41b1ffd8-f28e-4786-ab96-9950f0a78031
    csovant
     
  • * Introduce two new maven modules, resulting from splitting functionality of module opendj-ldap-sdk :
        opendj-core : core APIs
        opendj-grizzly : implementation classes for Grizzly transport provider
        
    These modules produce a jar with the same name (opendj-core and opendj-grizzly)
      
    The opendj-ldap-sdk module is kept for compatibility. It contains no more source code, 
    but it provides a opendj-ldap-sdk jar built from the two new maven modules.
    
    * Move classes in opendj-grizzly module to org.forgerock.opendj.grizzly package
       
    * Move some classes in opendj-core module to the org.forgerock.opendj.ldap.spi package 
       Modify visibility of  some constructors and methods of these classes to allow use by classes in opendj-grizzly
       Classes :
         - AbstractLDAPFutureResultImpl
         - LDAPFutureResultImpl
         - LDAPSearchFutureResultImpl
         - LDAPBindFutureResultImpl
         - LDAPCompareFutureResultImpl
         - LDAPExtendedFutureResultImpl
    
    * Duplicated methods in opendj-grizzly module 
      - LDAPReader#decodeEntry
      - LDAPWriter#encodeEntry 
      to methods in opendj-core module
      - LDAPUtils#encodeSearchResultEntry
      - LDAPUtils#decodeSearchResultEntry 
    to avoid sharing  or exposing too much code from these classes.
     
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9705 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • DBCursor.java:
    Added usage example to the javadocs.
    
    DraftCNDB.java:
    Replaced catch (Exception) by catch (DatabaseException), or removed them altogether where unapplicable.
    In next(), first wiped the current record + reverted the if condition and clauses.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9704 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Changes after review from Matthew Swift.
    
    Renamed CNIndexRecord to ChangeNumberIndexRecord to be consistent with ChangeNumberIndexDB name.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9703 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    Removed ChangeNumberIndexDB.getRecord(long).
    
    
    ECLServerHandler.java:
    Replaced calls to ChangeNumberIndexDB.getRecord() by calls to ChangeNumberIndexDB.getCursorFrom().
    Inlined all the crossDomainStartState local variables.
    Added getCursorFrom() to preserve old behaviour from JEChangeNumberIndexDBCursor ctor.
    
    
    ChangeNumberIndexDB.java:
    Removed getRecord().
    
    JEChangeNumberIndexDB.java:
    Removed getReadCursor(), getRecord() + some surprising and never used code like lock field, hasLock(), lock() and release().
    
    JEChangeNumberIndexDBCursor.java:
    In ctor, do not throw ChangelogException if the changeNumber cannot be found.
    
    JEChangeNumberIndexDBTest.java:
    Used JEChangeNumberIndexDB.getCursorFrom() instead of JEChangeNumberIndexDB.getReadCursor().
    Renamed a few variables.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9702 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Added tests on the CSNs returned by changelog and on their order too.
    Removed stupid for loops.
    Extracted methods readCookie() and commonAssert().
    Renamed:
    - getCookie() to assertContainsAndReadCookie()
    - assertEntries() to assertFourEntries()
    - assertDnEquals() to assertDNEquals()
    Added getCSNs().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9701 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9700 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • Changes after review from Matthew Swift.
    
    Consolidated ChangeNumberIndexDBCursor and ReplicaDBCursor into a single interface named DBCursor.
    
    
    
    DBCursor.java: ADDED
    It does not implement Comparable like ReplicaDBCursor. Instead a Comparator has been extracted to JEChangelogDB.CrossReplicaDBCursor .
    
    ChangeNumberIndexDBCursor.java, ReplicaDBCursor.java: DELETED - replaced by DBCursor
    
    *.java:
    Used DBCursor instead of removed cursor interfaces.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9699 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    
    Here is the failure scenario for this test (with one CPU):
    
     t1 (test thread)                  t2 (CNIndexDB purge thread)
     ----------------                  ---------------------------
            |                              |
            |                              v
            |                         JEChangeNumberIndexDB
            |                          run()
            |                          trim()
            |                          clear(null) <- entered, but not completed
            v
    ChangeNumberIndexDB
     setPurgeDelay(0);
     addRecord(1)
     addRecord(2)
     addRecord(3)
            |                              |
            |                              +--> executes the clear()
            v
     getFirstRecord() <- BOOM NullPointerException!
    
    
    
    Ensured the CNIndexDB is not trimmed until we explicitly test it:
    to do this, ensured the thread is only started when needed by the test.
    Also took the occasion to ensure a faster shutdown for the CNIndexDB trimming thread.
    
    
    
    JEChangeNumberIndexDB.java:
    Ensured we use volatile and AtomicBoolean.
    Renamed thread field to trimmingThread.
    Extracted method startTrimmingThread().
    In trim(), added an AtomicBoolean parameter.
    Added methods clear(DN, AtomicBoolean shutdown) and mustShutdown() to ensure faster shutdown.
    
    
    
    JEChangelogDB.java:
    Called JEChangeNumberIndexDB.startTrimmingThread() after creating the JEChangeNumberIndexDB instance.
    
    JEChangeNumberIndexDBTest.java:
    Extracted constants.
    In testTrim(), called JEChangeNumberIndexDB.startTrimmingThread().
    In testClear(), removed
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9698 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Code cleanup.
    Used InternalClientConnection.process*() methods.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9697 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

09 Oct, 2013

7 commits

  • Improved javadocs.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9696 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    Change after review from Matthew Swift.
    
    
    ReplicaDBCursor.java:
    In next(), added thrown ChangelogException.
    
    ReplicaDBCursor.java, JEChangelogDB.java:
    In next(), let ChangelogException go up.
    
    *.java:
    Consequence of the change to ReplicaDBCursor.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9695 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • More code cleanups.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9694 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Partially reverted r9691 which was: "In getECLChangeNumberLimits(), brought the database empty code to the top of the method: to get something more readable."
    This code is more complex than I thought.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9693 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Added 'eclipse' target that does a job similar to "mvn eclipse:eclipse".
    In particular, there is not need to call the ignominious
        cp -r build/classes/admin build/classes/messages .eclipse-build # then hit F5 in Eclipse
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9692 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    ReplicationServerDomain.java:
    Renamed getStartState() to getOldestState().
    
    ServerState.java:
    In duplicateOnlyOlderThan(), changed parameter from CSN to long.
    
    
    ReplicationServer.java:
    Consequence of the change to ServerState and ReplicationServerDomain.
    In getECLChangeNumberLimits(), brought the database empty code to the top of the method: to get something more readable.
    
    ECLServerHandler.java:
    Consequence of the change to ServerState and ReplicationServerDomain.
    Changed a few names / comments.
    
    JEChangeNumberIndexDB.java
    Consequence of the change to ReplicationServerDomain.
    
    
    ExternalChangeLogTest.java
    Consequence of the change to ReplicationServerDomain.
    Code cleanup:
    - removed gblCSN instance field
    - inlined sleep()
    - used connection.process*() + inlined runModifyOperation() and runDeleteOperation().
    - renamed getReplicationDomainStartState() to getDomainOldestState() + added better asserts
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9691 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    JEChangeNumberIndexDBTest.java:
    Fixed the build.
    
    ChangeNumberIndexDB.java, JEChangeNumberIndexDB.java:
    Improved the javadocs.
    Made instance variables volatile.
    
    *.java:
    First => Oldest
    Last => Newest
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9690 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac