Re: [jgroups-dev] https://jira.jboss.org/browse/JGRP-1240

"Mike Jensen" <[email protected]>
Newsgroups gmane.comp.java.javagroups.devel
Message-ID <[email protected]>
Where would the translation between the logical and physical normally happen? I ask because it seems odd that if we try again it works, I still think something might be going&nbsp;on. &nbsp;If&nbsp;you don't mind I might take a look. &nbsp;I just want to be sure there is no other way because this would complicate other things. &nbsp;For example if we use sharedloopback on junit tests, there is no physical address to send, and thus I would need to complicate my code even more for cases like that. &nbsp;I would really like to avoid this. &nbsp;Thanks for your help so far!



-- Sent from my Palm Pre
On Oct 5, 2010 4:42 AM, Bela Ban &lt;[email protected]&gt; wrote: 

I'm afraid adding a mapping between the logical address of P and its 

physical address into the logical_addr_cache when P connects to us won't 

work: this would have to be done at the level of the connection map, and 

this is not possible as we only know about physical addresses at the 

level of connection management.



So you have to add a header to your connection request which contains 

the logical address, physical address and logical name (if set). On the 

receiver side, you'll need to insert this information into the 

logical_addr_cache of TP, e.g. as follows (see also Discovery.up(), on 

reception of a discovery response):



Address addr; // UUID

String logical_name;

PhysicalAddress physical_addr;



down(new Event(Event.SET_PHYSICAL_ADDRESS, new 

Tuple&lt;Address,PhysicalAddress&gt;(addr, physical_addr));



if(logical_name != null)

   UUID.add((UUID)addr, logical_name);



-- 

Bela Ban

Lead JGroups / Clustering Team

JBoss

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb

_______________________________________________
Javagroups-development mailing list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.