mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Chris Ridd
30.44.2014 5b0af4cce71888eeb3f0bfc038f53d07745c42f3
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -3821,23 +3821,37 @@
  /**
   * Push the modifications contained in the given parameter as a modification
   * that would happen on a local server. The modifications are not applied to
   * the local database, historical information is not updated but a CSN is
   * generated and the ServerState associated to this domain is updated.
   * Push the schema modifications contained in the given parameter as a
   * modification that would happen on a local server. The modifications are not
   * applied to the local schema backend and historical information is not
   * updated; but a CSN is generated and the ServerState associated to the
   * schema domain is updated.
   *
   * @param modifications
   *          The modification to push
   *          The schema modifications to push
   */
  void synchronizeModifications(List<Modification> modifications)
  void synchronizeSchemaModifications(List<Modification> modifications)
  {
    ModifyOperation op = new ModifyOperationBasis(
        conn, nextOperationID(), nextMessageID(), null,
        DirectoryServer.getSchemaDN(), modifications);
    LocalBackendModifyOperation localOp = new LocalBackendModifyOperation(op);
    final Entry schema;
    try
    {
      schema = DirectoryServer.getEntry(DirectoryServer.getSchemaDN());
    }
    catch (DirectoryException e)
    {
      TRACER.debugCaught(DebugLogLevel.ERROR, e);
      logError(ERR_BACKEND_SEARCH_ENTRY.get(DirectoryServer.getSchemaDN().toString(),
              stackTraceToSingleLineString(e)));
      return;
    }
    LocalBackendModifyOperation localOp = new LocalBackendModifyOperation(op);
    CSN csn = generateCSN(localOp);
    OperationContext ctx = new ModifyContext(csn, "schema");
    OperationContext ctx = new ModifyContext(csn, getEntryUUID(schema));
    localOp.setAttachment(SYNCHROCONTEXT, ctx);
    localOp.setResultCode(ResultCode.SUCCESS);
    synchronize(localOp);