On 23 April 2013 18:59, Fraser Adams <[email protected]> wrote:

> On 22/04/13 22:26, Robbie Gemmell wrote:
>
>>
>> Looking this over it seems like it would work, but I can't say I am a big
>> fan of inspecting potentially every connection during every consumer
>> creation and removal.
>>
> Yeah I have to agree with you there, I wasn't wildly keen on it myself but
> I couldn't see an obvious alternative when I was trying this stuff out.
> Some of the associations get a bit convoluted don't they :-) Character
> building I think it's called.
>
>
>    An alternative might be: the SessionModel interface has a method to get
>> the associated ConnectionModel, with which you could directly query for the
>> associated Connection[Adapter] from the Virtualhost since it already
>> maintains that mapping.
>>
> So I guess that you mean org.apache.qpid.server.**protocol.AMQSessionModel?
> So I've got a reference to that passed into
> the getSessionAdapter(**AMQSessionModel session) helper method. The
> AMQSessionModel interface method you are alluding to is
>
>     public AMQConnectionModel getConnectionModel();
>
> Is that correct?
>
>
Yep, those are the bits I meant.


> Looking at VirtualHostAdapter.java there doesn't currently seem to be an
> accessor to lookup ConnectionAdapter by AMQConnectionModel so I'd have to
> add that, true? Clearly trivial given that the Map and registration stuff
> already exist.
>
> But it definitely seems better to do that than iterate through Connections
> especially for non-trivial numbers of connections.
>
>
Yes, its not ideal adding the method, but I think its better than the
alternative. We can try to do something nicer later when we will be looking
to tidy that stuff up anyway.


>
> I probably won't have time to revise this until Friday due to work and
> family commitments, so if you can bear with me 'til then and I'll post a
> revised patch using this approach.
>
> Thanks for the feedback.
>

No problem, thanks for the patch :)


>
> Frase
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> [email protected].**org<[email protected]>
> For additional commands, e-mail: [email protected]
>
>

Reply via email to