Skip to main content

Finding peers of other custom group

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
Trupti_Pol
Offline
Joined: 2014-03-12

Hi,

I am trying to use JXTA for one of our Messenger type of application. Here as per our requirement a user (peer) can create a new group or join if group already exists. Thus in the system there can be multiple groups available.

So one of our requirements is finding members of other peer group.

I am able to create multiple groups with different peers joining them, but getting stucked at a point as described below.

I have p1 and p2 running under Group PG1
and p3 and p4 running under PG2.

Whenever p1 searches for members in his group it finds p2, but whenever it searches for the members in the PG2 group if finds the p3 and p4 first time.
Internally what happens is it searches for the advertisement of PG2 group, creates a PeerGroup Instance using newGroup(peerGroupAdv) method.

But as soon as it find the PG2 advertisement p1 copies it in its local cache. And probably the call given to newGroup() makes p1 join PG2, as a result second time onwards whoever tries to find the members of PG2 gets P1 also as the member.

Which should not happen as P1 belongs to PG1.

I tried flushing the adv which i found during first time searching of members of PG1 but no success...

I am using AD-HOC mode of network configuration and as such not doing any specific n/w configuration.

Please let me know how to get rid of this issue...

Thanks for reading with patience and your answers... some help of your may give me a breakthrough of the issue...

Thanks