From c015616756e6faa64060971753bc77978ae82dec Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 07 Oct 2009 12:19:42 +0000
Subject: [PATCH] The documentation and the configuration of a Replication Domain allow a maximum value of 65535 for the server-id property. Nevertheless, the server-id in the ReplicationDomain implementation is managed as a short allowing a maximum value of 32767.

---
 opends/src/server/org/opends/server/replication/server/DbHandler.java |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/DbHandler.java b/opends/src/server/org/opends/server/replication/server/DbHandler.java
index 5a5b5bd..96a48b7 100644
--- a/opends/src/server/org/opends/server/replication/server/DbHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/DbHandler.java
@@ -101,7 +101,7 @@
   private ReplicationDB db;
   private ChangeNumber firstChange = null;
   private ChangeNumber lastChange = null;
-  private short serverId;
+  private int serverId;
   private String baseDn;
   private DbMonitorProvider dbMonitor = new DbMonitorProvider();
   private boolean shutdown = false;
@@ -135,7 +135,7 @@
    * @throws DatabaseException If a database problem happened
    */
   public DbHandler(
-      short id, String baseDn, ReplicationServer replicationServer,
+      int id, String baseDn, ReplicationServer replicationServer,
       ReplicationDbEnv dbenv, int queueSize)
          throws DatabaseException
   {
@@ -418,8 +418,7 @@
 
     latestTrimDate = TimeThread.getTime() - trimage;
 
-    ChangeNumber trimDate = new ChangeNumber(latestTrimDate,
-        (short) 0, (short)0);
+    ChangeNumber trimDate = new ChangeNumber(latestTrimDate, 0, 0);
 
     // In case of deadlock detection by the Database, this thread can
     // by aborted by a DeadlockException. This is a transient error and
@@ -646,7 +645,7 @@
    *
    * @return the serverId.
    */
-  public short getServerId()
+  public int getServerId()
   {
     return this.serverId;
   }

--
Gitblit v1.10.0