[jboss-cvs] JBoss Messaging SVN: r3922 - branches/Branch_Stable/src/main/org/jboss/messaging/core/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 25 08:55:05 EDT 2008


Author: timfox
Date: 2008-03-25 08:55:05 -0400 (Tue, 25 Mar 2008)
New Revision: 3922

Modified:
   branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-1233


Modified: branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java	2008-03-25 12:52:47 UTC (rev 3921)
+++ branches/Branch_Stable/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java	2008-03-25 12:55:05 UTC (rev 3922)
@@ -239,11 +239,6 @@
          wrap.end();
       }
 
-      if (detectDuplicates)
-      {
-         loadIDCache(idCache, nodeID);
-      }
-
       log.debug(this + " started");
    }
 
@@ -258,13 +253,18 @@
 
    // This is only known by server peer so we inject it after startup
 
-   public void injectNodeID(int nodeID)
+   public void injectNodeID(int nodeID) throws Exception
    {
       this.nodeID = nodeID;
 
       this.nodeIDSet = true;
 
       this.orderingID = new RotatingID(nodeID);
+      
+      if (detectDuplicates)
+      {
+         loadIDCache(idCache, nodeID);
+      }
    }
 
    // PersistenceManager implementation -------------------------
@@ -1654,7 +1654,7 @@
          while (rs.next() && c < idCacheSize)
          {
             int counter = rs.getInt(1);
-
+            
             String id = rs.getString(2);
 
             cache.put(counter, id);
@@ -1665,7 +1665,7 @@
          }
 
          idCacheCounter = maxCounter + 1;
-
+         
          if (idCacheCounter >= idCacheSize)
          {
             idCacheCounter = 0;




More information about the jboss-cvs-commits mailing list