[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-dev
Subject:    [jira] [Updated] (AMQ-3614) Unable to generate unique id when range
From:       "Jason Sherman (Updated) (JIRA)" <jira () apache ! org>
Date:       2011-11-30 21:15:40
Message-ID: 1631602375.27805.1322687740225.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]


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

Jason Sherman updated AMQ-3614:
-------------------------------

    Attachment: AMQ3614.patch

Attaching patch with fallback strategy if unable to bind to port
                
> 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
> 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

        


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic