activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Sherman (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-3614) Unable to generate unique id when range of ports are blocked - org.apache.activemq.util.IdGenerator
Date Wed, 30 Nov 2011 21:11:40 GMT
Unable to generate unique id when range of ports are blocked - org.apache.activemq.util.IdGenerator
---------------------------------------------------------------------------------------------------

                 Key: AMQ-3614
                 URL: https://issues.apache.org/jira/browse/AMQ-3614
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.5.1
            Reporter: Jason Sherman


org.apache.activemq.util.IdGenerator is unable to generate a unique id if a range of ports
have been block.
Currently there is only one strategy create this id if the canAccessSystemProps condition
is true:

{code}
if (canAccessSystemProps) {
            try {
                hostName = InetAddressUtil.getLocalHostName();
                ServerSocket ss = new ServerSocket(0);
                stub = "-" + ss.getLocalPort() + "-" + System.currentTimeMillis() + "-";
                Thread.sleep(100);
                ss.close();
            } catch (Exception ioe) {
                LOG.warn("could not generate unique stub", ioe);
            }
        } else {
            hostName = "localhost";
            stub = "-1-" + System.currentTimeMillis() + "-";
        }
{code}

No fallback strategy has been implemented if the canAccessSystemProp evaluates to true

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message