[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting ...

Ron Sigal ron_sigal at yahoo.com
Thu Oct 11 02:28:53 EDT 2007


  User: rsigal  
  Date: 07/10/11 02:28:53

  Modified:    src/main/org/jboss/remoting  Tag: remoting_2_2_2_GA_CP
                        ServerInvoker.java
  Log:
  JBREM-687:  Backed out changes for JBREM-687 ("Replaces host 0.0.0.0 in InvokerLocator with real address (or name) and reregisters with InvokerRegistry (copied changes from branch remoting_2_2_0_GA").
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.52.2.28.4.4.2.2 +0 -63     JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ServerInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java,v
  retrieving revision 1.52.2.28.4.4.2.1
  retrieving revision 1.52.2.28.4.4.2.2
  diff -u -b -r1.52.2.28.4.4.2.1 -r1.52.2.28.4.4.2.2
  --- ServerInvoker.java	11 Oct 2007 05:31:38 -0000	1.52.2.28.4.4.2.1
  +++ ServerInvoker.java	11 Oct 2007 06:28:53 -0000	1.52.2.28.4.4.2.2
  @@ -54,8 +54,6 @@
   import java.io.IOException;
   import java.lang.reflect.Constructor;
   import java.net.InetAddress;
  -import java.net.MalformedURLException;
  -import java.net.UnknownHostException;
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
  @@ -69,7 +67,7 @@
    * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
    * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
    *
  - * @version $Revision: 1.52.2.28.4.4.2.1 $
  + * @version $Revision: 1.52.2.28.4.4.2.2 $
    */
   public abstract class ServerInvoker extends AbstractInvoker implements ServerInvokerMBean
   {
  @@ -1074,67 +1072,6 @@
         }
   
         createServerSocketFactory();
  -      
  -      // need to check invoker locator to see if need to provide binding address (in the case 0.0.0.0 was used)
  -      locator = validateLocator(locator);
  -   }
  -   
  -   /**
  -    * InvokerLocator leaves address 0.0.0.0 unchanged.  Once serverBindAddress has been
  -    * extracted from the InvokerLocator, it is necessary to transform 0.0.0.0 into an
  -    * address that contacted over the network.  See JBREM-687.
  -    */
  -   private InvokerLocator validateLocator(InvokerLocator locator) throws MalformedURLException
  -   {
  -      InvokerLocator externalLocator = locator;
  -
  -      String host = locator.getHost();
  -      String newHost = null;
  -      if(host == null || InvokerLocator.ANY.equals(host))
  -      {
  -         // now need to get some external bindable address
  -         boolean byHost = true;
  -         String bindByHost = System.getProperty(InvokerLocator.BIND_BY_HOST, "True");
  -         try
  -         {
  -            byHost = Boolean.valueOf(bindByHost).booleanValue();
  -         }
  -         catch(Exception e)
  -         {
  -         }
  -         try
  -         {
  -            if(byHost)
  -            {
  -               newHost = InetAddress.getLocalHost().getHostName();
  -            }
  -            else
  -            {
  -               newHost = InetAddress.getLocalHost().getHostAddress();
  -            }
  -         }
  -         catch (UnknownHostException e)
  -         {
  -            log.debug("Could not get host by name or address.", e);
  -         }
  -         if(newHost == null)
  -         {
  -            // now what?  step through network interfaces?
  -            throw new RuntimeException("Can not determine bindable address for locator (" + locator + ")");
  -         }
  -
  -         // now create new locator with new host
  -         externalLocator = new InvokerLocator(locator.protocol,
  -                                              newHost,
  -                                              locator.getPort(),
  -                                              locator.getPath(),
  -                                              locator.getParameters());
  -         
  -         // need to update the locator key used in the invoker registry
  -         InvokerRegistry.updateServerInvokerLocator(locator, externalLocator);
  -      }
  -
  -      return externalLocator;
      }
      
      protected int assignPort() throws IOException
  
  
  



More information about the jboss-cvs-commits mailing list