activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AMQ-3614) Unable to generate unique id when range of ports are blocked - org.apache.activemq.util.IdGenerator
Date Thu, 01 Dec 2011 17:30:40 GMT

     [ https://issues.apache.org/jira/browse/AMQ-3614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Tully resolved AMQ-3614.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 5.6.0
         Assignee: Gary Tully

thanks. patch applied with with small mods. Left the log at warn as the fallback means that
two clients could use the same ids.

http://svn.apache.org/viewvc?rev=1209162&view=rev
                
> 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
>            Assignee: Gary Tully
>             Fix For: 5.6.0
>
>         Attachments: AMQ3614.patch
>
>
> 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