activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: About revision 558054
Date Fri, 27 Jul 2007 09:41:45 GMT
ooh - nice catch! - its not needed (will test without though)

On Jul 27, 2007, at 9:25 AM, Manuel Teira wrote:

> Hello all.
>
> Tracking issue AMQ-1322, closed after applying a patch to the 4.1  
> branch but that always was present in the trunk, but for different  
> motivations (automatic destination creation was not invoked from  
> top), I've found that some changes were made regarding this issue  
> as 558054. Now, automatic destination creation is invoked from top,  
> but as:
>
> <excerpt from AbstractRegion.java lookup method>
>
>            Destination dest=(Destination) destinations.get 
> (destination);
>            if(dest==null){
>                if(autoCreateDestinations){
>                    // Try to auto create the destination... re- 
> invoke broker from the
>                    // top so that the proper security checks are  
> performed.
>                    try {
>
>                        context.getBroker().addDestination 
> (context,destination);
>                        dest = addDestination(context, destination);
>                    }
>                    catch (DestinationAlreadyExistsException e) {
>                        // if the destination already exists then  
> lets ignore this error
>                    }
>                    // We should now have the dest created.
>                    dest=(Destination) destinations.get(destination);
>                }
>
>
> </excerpt from AbstracRegion.java method>
>
> Is there any need for :
>
> dest = addDestination(context, destination)
>
> Isn't it going to be called already from the previous sentence:
>
> context.getBroker().addDestination(context, destination); ??
>
> I haven't considered if this could produce any leak or problem, but  
> is it actually needed?
>
> Regards.
>


Mime
View raw message