User: slaboure
  Date: 02/02/27 03:07:00

  Modified:    src/main/org/jboss/ha/framework/server HATarget.java
  Log:
  Take in account the new DRM intra-view id instead of the JG partition view id
  
  Revision  Changes    Path
  1.3       +8 -7      jbossmx/src/main/org/jboss/ha/framework/server/HATarget.java
  
  Index: HATarget.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HATarget.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HATarget.java     15 Feb 2002 19:55:18 -0000      1.2
  +++ HATarget.java     27 Feb 2002 11:07:00 -0000      1.3
  @@ -8,6 +8,7 @@
   package org.jboss.ha.framework.server;
   
   import java.util.ArrayList;
  +import java.util.List;
   import 
org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener;
   import org.jboss.ha.framework.interfaces.LoadBalancePolicy;
   import org.jboss.ha.framework.interfaces.HAPartition;
  @@ -18,7 +19,7 @@
    * notifies it.
    *
    *   @author [EMAIL PROTECTED]
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.3 $
    *
    * <p><b>Revisions:</b><br>
    * <p><b>2002/01/13: Bill Burke</b>
  @@ -37,7 +38,7 @@
      protected ArrayList replicants = new ArrayList();
      protected HAPartition partition = null;
      protected org.jboss.logging.Logger log;
  -   protected long clusterViewId = -1;
  +   protected int clusterViewId = 0;
      protected Serializable target;
      // Static --------------------------------------------------------
      
  @@ -58,7 +59,7 @@
   
      public long getCurrentViewId()
      {
  -      return clusterViewId;
  +      return (long)clusterViewId;
      }
      
      public void destroy()
  @@ -87,15 +88,15 @@
         
partition.getDistributedReplicantManager().registerListener(this.replicantName, this);
         partition.getDistributedReplicantManager().add(this.replicantName, 
this.target);
         
  -      this.clusterViewId = partition.getCurrentViewId();
  +      this.clusterViewId = 0;
      }
      
      // DistributedReplicantManager.ReplicantListener implementation 
----------------------------------------------
         
  -   public void replicantsChanged(String key, ArrayList newReplicants)
  +   public void replicantsChanged(String key, List newReplicants, int 
newReplicantsViewId)
      {
         if (log.isDebugEnabled())
  -        log.debug("replicantsChanged '" + replicantName + "' to " + 
newReplicants.size());
  +        log.debug("replicantsChanged '" + replicantName + "' to " + 
newReplicants.size() + " (intra-view id: " + newReplicantsViewId + ")");
         synchronized(replicants)
         {
            // client has reference to replicants so it will automatically get
  @@ -103,7 +104,7 @@
            replicants.clear();
            replicants.addAll(newReplicants);
         }
  -      this.clusterViewId = partition.getCurrentViewId();
  +      this.clusterViewId = newReplicantsViewId;
      }
      
      // Package protected ---------------------------------------------
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to