[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jboss/src/main/org/jboss/invocation/http/server HttpProxyFactory.java
From:       Scott M Stark <starksm () users ! sourceforge ! net>
Date:       2004-07-31 21:33:13
Message-ID: E1Br1Td-00078y-GS () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

  User: starksm 
  Date: 04/07/31 14:33:13

  Modified:    src/main/org/jboss/invocation/http/server Tag: Branch_3_2
                        HttpProxyFactory.java
  Log:
  Update the checkInvokerURL logic to validate that the invokerURL is set,

  and if not build it from the invokerURLPrefix + host + invokerURLSuffix.

  The host value will be taken from the jboss.bind.address system property

  if its a valid address, InetAddress.getLocalHost otherwise.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.9   +14 -4     jboss/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java
  
  Index: HttpProxyFactory.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/invocation/http/server/HttpProxyFactory.java,v
  retrieving revision 1.1.4.8
  retrieving revision 1.1.4.9
  diff -u -r1.1.4.8 -r1.1.4.9
  --- HttpProxyFactory.java	15 Mar 2004 17:17:36 -0000	1.1.4.8
  +++ HttpProxyFactory.java	31 Jul 2004 21:33:12 -0000	1.1.4.9
  @@ -21,6 +21,7 @@
   import org.jboss.proxy.GenericProxyFactory;
   import org.jboss.system.Registry;
   import org.jboss.system.ServiceMBeanSupport;
  +import org.jboss.system.server.ServerConfigUtil;
   import org.jboss.util.StringPropertyReplacer;
   import org.jboss.metadata.MetaData;
   import org.w3c.dom.Element;
  @@ -31,7 +32,7 @@
    * MarshalledValue with the Naming proxy as its content.
    *
    * @author Scott.Stark@jboss.org
  - * @version $Revision: 1.1.4.8 $
  + * @version $Revision: 1.1.4.9 $
    */
   public class HttpProxyFactory extends ServiceMBeanSupport
      implements HttpProxyFactoryMBean
  @@ -241,17 +242,26 @@
         HttpInvokerProxy delegateInvoker = new HttpInvokerProxy(invokerURL);
         return delegateInvoker;
      }
  +
      /** Validate that the invokerURL is set, and if not build it from
  -    * the invokerURLPrefix + host + invokerURLSuffix.
  +    * the invokerURLPrefix + host + invokerURLSuffix. The host value will be
  +    * taken from the jboss.bind.address system property if its a valid
  +    * address, InetAddress.getLocalHost otherwise.
       */
      protected void checkInvokerURL() throws UnknownHostException
      {
         if( invokerURL == null )
         {
  -         InetAddress addr = InetAddress.getLocalHost();
  -         String host = useHostName ? addr.getHostName() : addr.getHostAddress();
  +         // First check for a global bind address
  +         String host = ServerConfigUtil.getSpecificBindAddress();
  +         if( host == null )
  +         {
  +            InetAddress addr = InetAddress.getLocalHost();
  +            host = useHostName ? addr.getHostName() : addr.getHostAddress();
  +         }
            String url = invokerURLPrefix + host + invokerURLSuffix;
            setInvokerURL(url);
         }
      }
  +
   }
  
  
  


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic