[
http://jira.jboss.com/jira/browse/JBAS-3794?page=all ]
Brian Stansberry updated JBAS-3794:
-----------------------------------
Fix Version/s: JBossAS-5.0.0.CR1
(was: JBossAS-5.0.0.Beta3)
Remove all calls to InetAddress.getHostName() (causes reverse DNS
lookup)
-------------------------------------------------------------------------
Key: JBAS-3794
URL:
http://jira.jboss.com/jira/browse/JBAS-3794
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Clustering
Affects Versions: JBossAS-4.0.4.GA
Environment: Java 5
JBoss 4.0.4
Reporter: Michael Newcomb
Assigned To: Brian Stansberry
Priority: Minor
Fix For: JBossAS-5.0.0.CR1
Any call to InetAddress.getHostName() will cause a reverse DNS lookup. If DNS is not
configured properly, can cause slow startup/join times between JBoss clusters.
The most notable is in ClusterNode.java:
public ClusterNode(IpAddress jgAddress)
{
if (jgAddress.getAdditionalData() == null)
{
this.id = jgAddress.getIpAddress().getHostAddress() + ":" +
jgAddress.getPort();
}
else
{
this.id = new String(jgAddress.getAdditionalData());
}
this.originalJGAddress = jgAddress;
StringBuffer sb = new StringBuffer();
java.net.InetAddress jgIPAddr = jgAddress.getIpAddress();
if (jgIPAddr == null)
sb.append("<null>");
else
{
if (jgIPAddr.isMulticastAddress())
sb.append(jgIPAddr.getHostAddress());
else
----->>>> sb.append(getShortName(jgIPAddr.getHostName()));
}
sb.append(":" + jgAddress.getPort());
this.jgId = sb.toString();
}
The following:
if (jgIPAddr.isMulticastAddress())
sb.append(jgIPAddr.getHostAddress());
else
sb.append(getShortName(jgIPAddr.getHostName()));
should be replaced with:
sb.append(jgIPAddr.getHostAddress());
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira