On Fri, Jul 17, 2009 at 7:38 AM, Gary Tully<gary.tu...@gmail.com> wrote: > I guess it should be consistent with what TcpTransportServer does when > binding to a broker Url. > There is an open discussion in > http://issues.apache.org/activemq/browse/AMQ-2094 and I think the > upshot of that is to do the minimum interpretation of what is passed > in and let the OS resolve the string. > > See org.apache.activemq.transport.tcp.TcpTransportServer.bind() > > URI bind = getBindLocation(); > String host = bind.getHost(); > host = (host == null || host.length() == 0) ? "localhost" : host; > InetAddress addr = InetAddress.getByName(host);
Good point, Gary. I just decided to use the same logic. Here is the getHostName() method: public String getHostName() { String resolvedHostName = (hostName == null || hostName.length() == 0) ? "localhost" : hostName; return resolvedHostName; } Any thoughts? If not, I'll commit the change. Bruce -- perl -e 'print unpack("u30","D0G)u8...@4vyy9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' ActiveMQ in Action: http://bit.ly/2je6cQ Blog: http://bruceblog.org/ Twitter: http://twitter.com/brucesnyder