[jbossts-issues] [JBoss JIRA] Created: (JBTM-592) Add fallback for Utility::hostInetAddr()

Jesper Pedersen (JIRA) jira-events at lists.jboss.org
Tue Jul 14 12:07:29 EDT 2009

Add fallback for Utility::hostInetAddr()

                 Key: JBTM-592
                 URL: https://jira.jboss.org/jira/browse/JBTM-592
             Project: JBoss Transaction Manager
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
          Components: Common
    Affects Versions: 4.6.1
            Reporter: Jesper Pedersen
            Priority: Minor

If a host has a misconfigured hostname Utility::hostInetAddr() fails with an UnknownHostException.

An extra try could be made after logging a warning about the failed InetAddress.getLocalHost() using InetAddress.getByName(null) - e.g.

 try {
    addr = InetAddress.getLocalHost();
 } catch (UnknownHostException uhe) {
    log.warn("Unable to use InetAddress.getLocalHost() to resolve address");
    addr = InetAddress.getByName(null);

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossts-issues mailing list