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.

Reply via email to