User: mnf999  
  Date: 02/02/06 13:15:59

  Modified:    src/main/org/jboss/invocation/jrmp/interfaces
                        JRMPInvokerProxyHA.java
  Log:
  Bill, stop bitching already.  Here is the rest of it :)
  
  Revision  Changes    Path
  1.3       +48 -48    
jbossmx/src/main/org/jboss/invocation/jrmp/interfaces/JRMPInvokerProxyHA.java
  
  Index: JRMPInvokerProxyHA.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/invocation/jrmp/interfaces/JRMPInvokerProxyHA.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JRMPInvokerProxyHA.java   2002/01/14 01:57:05     1.2
  +++ JRMPInvokerProxyHA.java   2002/02/06 21:15:59     1.3
  @@ -36,7 +36,7 @@
   * JRMPInvokerProxy, local to the proxy and is capable of delegating to local and 
JRMP implementations
   * 
   * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
  -* @version $Revision: 1.2 $
  +* @version $Revision: 1.3 $
   *
   * <p><b>2001/11/19: marcf</b>
   * <ol>
  @@ -51,11 +51,11 @@
      protected transient long currentViewId = 0;
      
      public static final HashSet colocation = new HashSet();
  -
  +   
      public JRMPInvokerProxyHA()
      {
      }
  -
  +   
      public JRMPInvokerProxyHA(ArrayList targets, LoadBalancePolicy policy)
      {
         this.targets = targets;
  @@ -93,8 +93,8 @@
      {
         removeDeadTarget(target);
      }
  -
  -
  +   
  +   
      protected void removeDeadTarget(Object target)
      {
         //System.out.println("Size before : " + Integer.toString(targets.length));
  @@ -116,7 +116,7 @@
         }
         // nothing found
      }
  -
  +   
      /**
      * Returns wether we are local to the originating container or not. 
      */
  @@ -130,13 +130,13 @@
      * are local. 
      */
      public Object invoke(Invocation invocation)
  -      throws Exception
  +   throws Exception
      {
  -
  +      
         // Pass the current security information
         invocation.setPrincipal(SecurityAssociation.getPrincipal());
         invocation.setCredential(SecurityAssociation.getCredential());
  -
  +      
         // optimize if calling another bean in same EJB-application
         if (isLocal(invocation)) {
            
  @@ -171,42 +171,42 @@
            
            // Set the transaction propagation context
            mi.setTransactionPropagationContext(getTransactionPropagationContext());
  -      mi.setValue("CLUSTER_VIEW_ID", new Long(currentViewId));
  -      Invoker target = (Invoker)getRemoteTarget();
  -      while (target != null)
  -      {
  -         try
  -         {
  -            HARMIResponse rsp = 
(HARMIResponse)((MarshalledObject)target.invoke(mi)).get();
  -            if (rsp.newReplicants != null)
  -            {
  -               //               System.out.println("new set of replicants");
  -               setTargets(rsp.newReplicants);
  -               currentViewId = rsp.currentViewId;
  -            }
  -            return rsp.response;
  -         }
  -         catch (java.rmi.ConnectException ce)
  -         {
  -         }
  -         catch (java.rmi.ConnectIOException cioe)
  -         {
  -         }
  -         catch (java.rmi.NoSuchObjectException nsoe)
  -         {
  -         }
  -         catch (java.rmi.UnmarshalException ue ) 
  -         {
  -         }
  -         catch (java.rmi.UnknownHostException uhe)
  -         {
  -         }
  -         // If we reach here, this means that we must fail-over
  -         remoteTargetHasFailed(target);
  -         target = (Invoker)getRemoteTarget();
  -      }
  -      // if we get here this means list was exhausted
  -      throw new java.rmi.RemoteException("Service unavailable.");
  +         mi.setValue("CLUSTER_VIEW_ID", new Long(currentViewId));
  +         Invoker target = (Invoker)getRemoteTarget();
  +         while (target != null)
  +         {
  +            try
  +            {
  +               HARMIResponse rsp = 
(HARMIResponse)((MarshalledObject)target.invoke(mi)).get();
  +               if (rsp.newReplicants != null)
  +               {
  +                  //               System.out.println("new set of replicants");
  +                  setTargets(rsp.newReplicants);
  +                  currentViewId = rsp.currentViewId;
  +               }
  +               return rsp.response;
  +            }
  +            catch (java.rmi.ConnectException ce)
  +            {
  +            }
  +            catch (java.rmi.ConnectIOException cioe)
  +            {
  +            }
  +            catch (java.rmi.NoSuchObjectException nsoe)
  +            {
  +            }
  +            catch (java.rmi.UnmarshalException ue ) 
  +            {
  +            }
  +            catch (java.rmi.UnknownHostException uhe)
  +            {
  +            }
  +            // If we reach here, this means that we must fail-over
  +            remoteTargetHasFailed(target);
  +            target = (Invoker)getRemoteTarget();
  +         }
  +         // if we get here this means list was exhausted
  +         throw new java.rmi.RemoteException("Service unavailable.");
         }
      }
      
  @@ -223,7 +223,7 @@
         out.writeObject(targets);
         out.writeObject(loadBalancePolicy);
      }
  -
  +   
      /**
      *  Un-externalize this instance.
      *
  @@ -235,8 +235,8 @@
         targets = (ArrayList)in.readObject();
         this.loadBalancePolicy = (LoadBalancePolicy)in.readObject();      
      }
  -
  +   
      // Private -------------------------------------------------------
  -
  +   
      // Inner classes -------------------------------------------------
   }
  
  
  

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

Reply via email to