activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Teira <mte...@tid.es>
Subject Re: Advisory topic leakages (theory)
Date Fri, 06 Jul 2007 13:14:07 GMT
Rob Davies escribió:
> ActiveMQDestinations methods for equals() and hashCode() have always 
> been there - so yes it will always be removed from the concurrent hashmap
True. I'm afraid I shooted too early. I thought I'd found the problem.

Sorry for the false alarm.

Regards.

>
> cheers,
>
> Rob
>
> On Jul 6, 2007, at 12:15 PM, Manuel Teira wrote:
>
>> I have observed that the Consumer advisory topics (at least for 
>> temporary queues) are not disposed, at least in svn 4.1 branch. I 
>> think that this is caused by the way they are tried to be deleted 
>> from the AdvisoryBroker removeDestinationInfo method:
>>
>>            try {
>>                next.removeDestination(context, 
>> AdvisorySupport.getConsumerAdvisoryTopic(info.getDestination()), -1);
>>            } catch (Exception expectedIfDestinationDidNotExistYet) {
>>            }
>>            try {
>>                next.removeDestination(context, 
>> AdvisorySupport.getProducerAdvisoryTopic(info.getDestination()), -1);
>>            } catch (Exception expectedIfDestinationDidNotExistYet) {
>>            }
>>
>> But that helper method, 
>> AdvisorySupport.get[Consumer|Producer]AdvisoyTopic is always creating 
>> a new Topic:
>>
>>    public static ActiveMQTopic 
>> getConsumerAdvisoryTopic(ActiveMQDestination destination) {
>>        if( destination.isQueue() )
>>            return new 
>> ActiveMQTopic(QUEUE_CONSUMER_ADVISORY_TOPIC_PREFIX+destination.getPhysicalName());

>>
>>        else
>>            return new 
>> ActiveMQTopic(TOPIC_CONSUMER_ADVISORY_TOPIC_PREFIX+destination.getPhysicalName());

>>
>>    }
>>
>> So, what we are feeding to next.removeDestination, where next is 
>> eventually the RegionBroker chained instance, is a different 
>> ActiveMQTopic than the original one that we were trying to delete. As 
>> RegionBroker destinations is a ConcurrentHashMap, and the object we 
>> are passing to be removed is different from the original one,  is it 
>> going to remove anything?
>>
>> The procedure followed in trunk seems to be the same.
>>
>> Regards.
>>
>>
>>
>
>


Mime
View raw message