[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 HttpInvoker.java
From:       Scott M Stark <starksm () users ! sourceforge ! net>
Date:       2004-07-31 19:51:10
Message-ID: E1Bqzss-0003UH-3Q () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

  User: starksm 
  Date: 04/07/31 12:51:09

  Modified:    src/main/org/jboss/invocation/http/server Tag: Branch_3_2
                        HttpInvoker.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.2.5   +16 -21    jboss/src/main/org/jboss/invocation/http/server/HttpInvoker.java
  
  Index: HttpInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/invocation/http/server/HttpInvoker.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- HttpInvoker.java	15 Mar 2004 17:17:36 -0000	1.1.2.4
  +++ HttpInvoker.java	31 Jul 2004 19:51:09 -0000	1.1.2.5
  @@ -6,43 +6,31 @@
    */
   package org.jboss.invocation.http.server;
   
  -import java.io.IOException;
  -import java.lang.reflect.Method;
   import java.net.InetAddress;
   import java.net.UnknownHostException;
  -import java.net.URL;
  -
  -import javax.naming.Name;
  -import javax.naming.InitialContext;
  -import javax.naming.Context;
  -import javax.naming.NamingException;
  -import javax.naming.NameNotFoundException;
  -
  -import javax.transaction.Transaction;
  -import javax.transaction.TransactionManager;
  -import javax.management.ObjectName;
   import javax.management.MBeanException;
  +import javax.management.ObjectName;
   import javax.management.RuntimeMBeanException;
   import javax.management.RuntimeOperationsException;
  -import javax.management.MalformedObjectNameException;
  +import javax.naming.InitialContext;
  +import javax.naming.NamingException;
  +import javax.transaction.Transaction;
   
  -import org.jboss.invocation.http.interfaces.HttpInvokerProxy;
   import org.jboss.invocation.Invocation;
  -import org.jboss.invocation.InvocationContext;
   import org.jboss.invocation.Invoker;
   import org.jboss.invocation.MarshalledInvocation;
  -import org.jboss.invocation.MarshalledValue;
  -import org.jboss.logging.Logger;
  +import org.jboss.invocation.http.interfaces.HttpInvokerProxy;
   import org.jboss.naming.Util;
   import org.jboss.system.Registry;
   import org.jboss.system.ServiceMBeanSupport;
  +import org.jboss.system.server.ServerConfigUtil;
   import org.jboss.util.StringPropertyReplacer;
   
   /**
    * The HttpInvoker ... into the JMX base.
    *
    * @author <a href="mailto:scott.stark@jboss.org>Scott Stark</a>
  - * @version $Revision: 1.1.2.4 $
  + * @version $Revision: 1.1.2.5 $
    */
   public class HttpInvoker extends ServiceMBeanSupport
      implements HttpInvokerMBean
  @@ -202,14 +190,21 @@
      }
   
      /** 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 )
  +         {
  +            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