User: vlada   
  Date: 01/10/01 21:06:47

  Modified:    src/main/org/jboss/ha/framework/server HAPartitionImpl.java
                        HARMIServerImpl.java
  Log:
  rather than using machine dependent system time to track if client's view of cluster 
has changed use logical viewID from cluster
  
  Revision  Changes    Path
  1.2       +10 -3     
jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java
  
  Index: HAPartitionImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HAPartitionImpl.java      2001/09/30 15:20:58     1.1
  +++ HAPartitionImpl.java      2001/10/02 04:06:47     1.2
  @@ -198,7 +198,12 @@
      {
         return this.dsManager;
      }
  -   
  +
  +   public long getCurrentViewId()
  +   {
  +       return channel.GetView().GetVid().GetId();
  +   }
  +
      // ***************************
      // ***************************
      // RPC multicast communication
  @@ -424,8 +429,10 @@
               newMembers.add (allMembers.elementAt (i));
         return newMembers;
      }
  -   
  -   
  +
  +
  +
  +
      ///////////////////////////////////////////////////////////////
      
      /**
  
  
  
  1.2       +5 -10     
jbossmx/src/main/org/jboss/ha/framework/server/HARMIServerImpl.java
  
  Index: HARMIServerImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HARMIServerImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HARMIServerImpl.java      2001/09/30 15:20:58     1.1
  +++ HARMIServerImpl.java      2001/10/02 04:06:47     1.2
  @@ -40,7 +40,6 @@
   DistributedReplicantManager.ReplicantListener
   {
      protected String replicantName;
  -   protected long lastSet = System.currentTimeMillis ();
      protected ArrayList replicants = new ArrayList ();
      protected Object handler;
      protected HashMap invokerMap = new HashMap ();
  @@ -100,12 +99,8 @@
            e.printStackTrace ();
         }
      }
  +
      
  -   public long getTag ()
  -   {
  -      return lastSet;
  -   }
  -   
      public Object getLocal () throws Exception
      {
         return handler;
  @@ -121,10 +116,9 @@
            replicants.clear ();
            replicants.addAll (newReplicants);
         }
  -      lastSet = System.currentTimeMillis ();
      }
      
  -   public HARMIResponse invoke (long tag, MarshalledObject mimo) throws Exception
  +   public HARMIResponse invoke (long clientViewId, MarshalledObject mimo) throws 
Exception
      {
         RemoteMethodInvocation rmi = (RemoteMethodInvocation)mimo.get ();
         rmi.setMethodMap (invokerMap);
  @@ -133,10 +127,11 @@
         try
         {
            HARMIResponse rsp = new HARMIResponse ();
  -         if (tag < lastSet)
  +         long clusterViewId = partition.getCurrentViewId();
  +         if (clientViewId != clusterViewId)
            {
               rsp.newReplicants = new ArrayList (replicants);
  -            rsp.tag = lastSet;
  +            rsp.currentViewId = clusterViewId;
            }
            
            rsp.response = method.invoke (handler, rmi.getArguments ());
  
  
  

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

Reply via email to