Skip to main content

search peergroups

28 replies [Last post]
christine2008
Offline
Joined: 2008-05-17
Points: 0

In Lan,A NetPeerGroup (peer's Mode is ADOH) create lots of custom peergroups.But when I use the NetPeerGroup's DiscoveryService to find all of
custom peergroups .I only find NetPeerGrouup .Why?Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
acid
Offline
Joined: 2008-03-03
Points: 0

Hi,
I do as you examlpe but it don't work , jxta shell window still open. the code run completely and group successfully started but why jxta shell still open??

here is my code :
/*
* StartJXTA.java
*
* Created on May 20, 2008, 10:02 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/

package FSPackage;
import java.io.*;
import java.lang.*;
import java.net.URI;
import java.util.*;
import javax.swing.JTextArea;
import net.jxta.exception.PeerGroupException;
import net.jxta.peer.PeerID;
import net.jxta.id.IDFactory;
import net.jxta.platform.Module;
import net.jxta.platform.NetworkManager;
import net.jxta.platform.NetworkConfigurator;
import net.jxta.discovery.DiscoveryService;
import net.jxta.rendezvous.RendezVousService;
import net.jxta.peergroup.PeerGroup;
import net.jxta.peergroup.PeerGroupID;
import net.jxta.peergroup.NetPeerGroupFactory;
import net.jxta.protocol.ModuleImplAdvertisement;
import net.jxta.protocol.PeerGroupAdvertisement;
import net.jxta.credential.AuthenticationCredential;
import net.jxta.credential.Credential;
import net.jxta.membership.MembershipService;
import net.jxta.membership.Authenticator;
import net.jxta.document.StructuredDocument;
import net.jxta.document.StructuredTextDocument;
import net.jxta.document.MimeMediaType;

/**
*
* @author HARDI
*/
public class StartJXTA {

// Declare by myself
//String IP = "10.126.17.117 ";
private Main_UI main_ui = null;
private NetworkConfigurator configurator = null;
private NetworkManager manager = null;
private PeerGroup defaultGroup = null;
public static DiscoveryService discovery_netpg, discovery_appFS = null;
public static RendezVousService rendezvous_netpg, rendezvous_appFS = null;
private static PeerGroup FSGroup = null;
private static PeerGroupID GID_FSGroup = null;
private static PeerGroupAdvertisement groupAdv = null;
private static ModuleImplAdvertisement modulimpleAdv = null;

public String start_namapeer = null;
public static final String MyPeerName = " Richardo";
public static final String MyGroupName = " FS Group ";

public static final String start_sharepath = null;
public JTextArea logArea;
public static final PeerID myPeerID = IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID,MyPeerName.getBytes());
public static final PeerGroupID newPeerGroupID = IDFactory.newPeerGroupID(MyGroupName.getBytes());

/** Creates a new instance of StartJXTA */
public StartJXTA(Main_UI main , String nama, JTextArea log)
{
this.start_namapeer = nama;
this.main_ui = main;
this.logArea = log;
configureJXTA();
StartJXTA();
getServiceNetPG();
createFSGroup();
joinFSGroup(FSGroup);
}

//********************************** Function ********************************

// Function to configure JXTA
private void configureJXTA()
{
logArea.append("[+] Trying to configure JXTA mode ...\n");
try
{
//Thread.sleep(1000);
manager = new NetworkManager(NetworkManager.ConfigMode.EDGE, start_namapeer);
manager.setConfigPersistent(true);
configurator = manager.getConfigurator();
configurator.setPeerID(myPeerID);
//configurator.addSeedRendezvous(URI.create("tcp://10.126.17.117"));
configurator.save();
logArea.append("[+] Success configure JXTA mode ...\n");
}
catch(IOException e)
{
e.printStackTrace();
logArea.append("[+] Failed configure JXTA mode ... \n");
}
catch(Exception ee)
{
ee.printStackTrace();
}
}

// Function to start JXTA network
private void StartJXTA()
{
try
{
//Thread.sleep(1000);
defaultGroup = manager.startNetwork();
logArea.append("[+] JXTA sukses dijalankan.. \n");
//discovery_netpg = defaultGroup.getDiscoveryService();
//rendezvous_netpg = defaultGroup.getRendezVousService();
//logArea.append("[+] " + date.toString() + "\n");
logArea.append("[+] Nama Peer : " + defaultGroup.getPeerName() + "\n");
logArea.append("[+] Peer ID : " + defaultGroup.getPeerID().toString() + "\n");
}
catch(PeerGroupException e)
{
e.printStackTrace();
logArea.append("[+] Getting Error starting JXTA network : " + e.getMessage().toString() + "\n");
}
catch(IOException ee)
{
ee.printStackTrace();
logArea.append("[+] Getting Error starting JXTA network : " + ee.getMessage().toString() + "\n");
}
catch(Exception eee)
{
eee.printStackTrace();
logArea.append("[+] Getting Error starting JXTA network : " + eee.getMessage().toString() + "\n");
}
}

private void getServiceNetPG()
{
discovery_netpg = defaultGroup.getDiscoveryService();
rendezvous_netpg = defaultGroup.getRendezVousService();
logArea.append("[+] Getting Discovery and Rendezvous Service from NetPeerGroup...\n");
}

private void getFSGroupService()
{
discovery_appFS = FSGroup.getDiscoveryService();
//rendezvous_appFS = FSGroup.getRendezVousService().setAutoStart(true);
//rendezvous_appFS = FSGroup.getRendezVousService();
FSGroup.getRendezVousService().setAutoStart(true);
//rendezvous_appFS.setAutoStart(true);
logArea.append("[+] Getting FS Group service...\n ");
logArea.append("[+] Start Rendezvous for this Group ...\n");
}

// Function to Stop JXTA network
public void StopJXTA()
{

manager.stopNetwork();
logArea.append("\n[+] JXTA sukses dihentikan ...");
}

// Function to create FS Group
private void createFSGroup()
{
System.out.println("Trying to create FS Group ...");
logArea.append("[+] Trying to create FS Group ... \n");
try
{
modulimpleAdv = defaultGroup.getAllPurposePeerGroupImplAdvertisement();
// FSGroup = defaultGroup.newGroup(null, // Assign a new ID
// modulimpleAdv,
// "FS Group",
// "Default Group for File Sharing"); // Describtion of Group
//FSGroup.startApp(new String [0]);

FSGroup = defaultGroup.newGroup(newPeerGroupID,
modulimpleAdv,
MyGroupName,
"Default Group for File Sharing"); // Describtion of Group

if(Module.START_OK == FSGroup.startApp(new String[0]))
{
logArea.append("[+] FS Group started successfully \n");
}
else
{
logArea.append("[+] FS Group not started successfully...!!! \n");
}
groupAdv = FSGroup.getPeerGroupAdvertisement();
GID_FSGroup = groupAdv.getPeerGroupID();
discovery_netpg.publish(groupAdv);
discovery_netpg.remotePublish(groupAdv);

System.out.println("Nama Group : " + groupAdv.getName());
System.out.println("Group ID : " + groupAdv.getPeerGroupID().toString());
//logArea.append("[+] Nama Group : " + groupAdv.getName() + "\n Group ID : " + groupAdv.getPeerGroupID().toString()+ "\n");
logArea.append("[+] Default Peer Group File Sharing successfully created : \n");
logArea.append("[+] Publishing FS Group Advertisement \n");
logArea.append("[+] Group Information : \n");
logArea.append("[====================================]\n");
logArea.append("[+] Nama Group : " + groupAdv.getName() + "\n");
logArea.append("[+] Peer Group ID : " + groupAdv.getPeerGroupID().toString() + "\n");
logArea.append("[====================================]\n");
}
catch(Exception e)
{
e.printStackTrace();
logArea.append("[+] FS Group creation failed : " + e.getMessage().toString()+"\n");
System.out.println("FS Group creation failed : " + e.getMessage().toString());
}
}

// Function to search FS Group
private void searchFSFroup()
{
int count = 0;
Enumeration adv = null;
System.out.println("Searching FS Group Advertisement ...");
logArea.append("[+] Searching FS Group Advertisement ...\n");

//..............................
//............................. code for search group

}

// Function to join FS group
private void joinFSGroup(PeerGroup grp)
{
System.out.println("Joining FS Group ...");
logArea.append("[+] Joining FS Group ...\n");
StructuredDocument creds = null;

try
{
// Generate the credential for the group
AuthenticationCredential autCred = new AuthenticationCredential(grp, null, creds);
// Get the membership service from the group
MembershipService membership = grp.getMembershipService();
// Get the authenticator from Authentication Creds
Authenticator auth = membership.apply(autCred);
// Check if everything is okay to join
if (auth.isReadyForJoin())
{
Credential myCred = membership.join(auth);
System.out.println("Succesfully join group : " + grp.getPeerGroupName());
logArea.append("[+] Succesfully join Group : "+ grp.getPeerGroupName() + "\n");
logArea.append("[+] Group ID : " + grp.getPeerGroupID().toString()+ "\n");
}
else
{
System.out.println("Failure: unable to join group");
logArea.append("[+] Failure : unable to join group !!!\n");
}

}
catch(Exception e)
{
e.printStackTrace();
System.out.println("Failure in Authentication !!!");
logArea.append("[+] Failure in Authentication !!!\n");
}
}
}

Message was edited by: acid

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi

Two ideas:

a) If you run your code without calling joinFSGroup(FSGroup); do you still get the message box?

public StartJXTA(Main_UI main , String nama, JTextArea log)
{
this.start_namapeer = nama;
this.main_ui = main;
this.logArea = log;
configureJXTA();
StartJXTA();
getServiceNetPG();
createFSGroup();
// joinFSGroup(FSGroup);
}

b) Have your tried to run my code on your PC? Do you get the message box?

Thanks,

J.

acid
Offline
Joined: 2008-03-03
Points: 0

Hi,
I run your code successfully but it still show and open JXTA shell window, i modify you code by remove method tools. ...() and replace with system.out.println() to show information :

and also i attach the sample project implement startApp() and you can add library to run it.

i use jxta 2.5 consist of jxta.jar, jxtashell.jar, bcprov-jdk14.jar, javax.servlet.jar , org.morbay.jetty.jar from jxse-shell-2.5

/*
* Main.java
*
* Created on June 3, 2008, 9:54 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/

package _220_creating_a_peer_group_example;
import java.io.IOException;
import java.net.InetAddress;
import net.jxta.exception.PeerGroupException;
import net.jxta.id.IDFactory;
import net.jxta.peer.PeerID;
import net.jxta.peergroup.PeerGroup;
import net.jxta.peergroup.PeerGroupID;
import net.jxta.platform.Module;
import net.jxta.platform.NetworkConfigurator;
import net.jxta.platform.NetworkManager;
import net.jxta.protocol.ModuleImplAdvertisement;
/**
*
* @author HARDI
*/

public class _220_Creating_A_Peer_Group_Example {

public static final String Name = "Example 220";

public static final String MyPeerName = "Santa Claus de la JXTA";
public static final PeerID MyPeerID = IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID, MyPeerName.getBytes());

public static final String NewPeerGroupName = "Dave Brubeck's Fan Club";
public static final PeerGroupID NewPeerGroupID = IDFactory.newPeerGroupID(NewPeerGroupName.getBytes());

public static void main(String[] args) {

try {

// Removing any existing configuration
// Tools.DeleteConfigurationInDefaultHome(); // You should put some code here to delete any existing configuration

// Creation of the network manager
NetworkManager MyNetworkManager = new NetworkManager(
NetworkManager.ConfigMode.EDGE,
Name);

// Setting the peer ID
//Tools.PopInformationMessage(Name, "Setting the peer ID:\n\n" + MyPeerID.toString());
System.out.println("Peer ID : " + MyPeerID.toString());
MyNetworkManager.setPeerID(MyPeerID);

// Starting the JXTA network
//Tools.PopInformationMessage(Name, "Starting the JXTA network");
System.out.println("Starting JXTA Network...");
PeerGroup TheNetPeerGroup = MyNetworkManager.startNetwork();

// Retrieving a module implementation advertisement
ModuleImplAdvertisement TheModuleImplementationAdvertisement =
TheNetPeerGroup.getAllPurposePeerGroupImplAdvertisement();

// The creation includes local publishing
//Tools.PopInformationMessage(Name, "Creating the new peer group:\n\n" + NewPeerGroupName);
PeerGroup MyNewPeerGroup = TheNetPeerGroup.newGroup(
NewPeerGroupID,
TheModuleImplementationAdvertisement,
NewPeerGroupName,
"For connoisseurs only..."
);

// Don't forget to start your peer group
if (Module.START_OK == MyNewPeerGroup.startApp(new String[0])) {

//Tools.PopInformationMessage(Name, "New peer group started successfully");
System.out.println("New peer group started successfully...");

} else {

System.out.println("New peer group not started successfully!!!");
//Tools.PopInformationMessage(Name, "New peer group not started successfully !!!");

}

// Displaying IDs
System.out.println("Net Peer Group ID : " + PeerGroupID.defaultNetPeerGroupID);
System.out.println("Santa Claus ID : " + MyPeerID + "\n");
System.out.println("New Peer Group ID : " + MyNewPeerGroup.getPeerGroupID().toString());
System.out.println("Peer ID in New Group : " + MyNewPeerGroup.getPeerID().toString());

// Stopping the peer group
//Tools.PopInformationMessage(Name, "Stopping the new peer group");

// Stopping the network
//Tools.PopInformationMessage(Name, "Stopping the JXTA network");
MyNetworkManager.stopNetwork();

} catch (PeerGroupException Ex) {

//Tools.PopErrorMessage(Name, Ex.toString());

} catch (IOException Ex) {

//Tools.PopErrorMessage(Name, Ex.toString());

} catch (Exception Ex) {

//Tools.PopErrorMessage(Name, Ex.toString());

}

}

}

Message was edited by: acid

bondolo
Offline
Joined: 2003-06-11
Points: 0

If you don't want the jxta shell to appear then remove the jxtashell.jar from your classpath.

acid
Offline
Joined: 2008-03-03
Points: 0

Hi,
I estimate like that before, and when i do that. the shell window not appear anymore.
But if i don't add jxtashell.jar , i get warning like this :

WARNING: Failed to find class for urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE0000000C0206
java.lang.ClassNotFoundException: No matching class for : urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE0000000C0206
at net.jxta.impl.loader.RefJxtaLoader.findClass(RefJxtaLoader.java:240)
at net.jxta.impl.loader.RefJxtaLoader.findModuleImplAdvertisement(RefJxtaLoader.java:350)
at net.jxta.impl.peergroup.StdPeerGroup.getDefaultModuleImplAdvertisement(StdPeerGroup.java:353)
at net.jxta.impl.peergroup.StdPeerGroup.(StdPeerGroup.java:143)
at net.jxta.peergroup.WorldPeerGroupFactory.getDefaultWorldPeerGroupClass(WorldPeerGroupFactory.java:237)
at net.jxta.peergroup.WorldPeerGroupFactory.(WorldPeerGroupFactory.java:178)
at net.jxta.peergroup.NetPeerGroupFactory.(NetPeerGroupFactory.java:205)
at net.jxta.platform.NetworkManager.startNetwork(NetworkManager.java:410)
at _220_creating_a_peer_group_example._220_Creating_A_Peer_Group_Example.main(_220_Creating_A_Peer_Group_Example.java:57)

The code run successfully without show jxta shell window. And about the warning,
Do you think it is okay or what ??

thanks

Message was edited by: acid

bondolo
Offline
Joined: 2003-06-11
Points: 0

Yes, that warning can be safely ignored. (It has been removed for the next JXSE version)

acid
Offline
Joined: 2008-03-03
Points: 0

Thanks, for your suggestion
For Adamman thanks for your info and help

by the way, when will the next jxse version release??

thanks

acid
Offline
Joined: 2008-03-03
Points: 0

Hi,

You said to be patient to have peers connect and reconnect to rendezvous. What kind of rendezvous do you mean ??

Because you also said , "This should happen automatically if the seeds have been set properly" , so i think it is a seed connection to rendezvous peer.

adamman71
Offline
Joined: 2007-01-31
Points: 0

I mean, any rendezvous peer !!!

If connection is not established after 1 or 2 minutes, then, there might be an issue with configuration

Cheers,

J.

acid
Offline
Joined: 2008-03-03
Points: 0

Hi, Adamman

I do as your suggestion, i add this lines to my code :

FSGroup.startApp(new String [0]);
rendezvous_appFS = FSGroup.getRendeVousService();
rendezvous_appFS.setAutoStart(true);

when FSGroup.startApp(new String[0]); being executed , then it show a JXTA shell window, i still not understand the explanation in the jxta documentation about it. And why it show a JXTA shell window

thanks

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi,

Here is how I am doing, I don't get the JXTA shell:

import java.io.IOException;
import java.net.InetAddress;
import net.jxta.exception.PeerGroupException;
import net.jxta.id.IDFactory;
import net.jxta.peer.PeerID;
import net.jxta.peergroup.PeerGroup;
import net.jxta.peergroup.PeerGroupID;
import net.jxta.platform.Module;
import net.jxta.platform.NetworkConfigurator;
import net.jxta.platform.NetworkManager;
import net.jxta.protocol.ModuleImplAdvertisement;

public class _220_Creating_A_Peer_Group_Example {

public static final String Name = "Example 220";

public static final String MyPeerName = "Santa Claus de la JXTA";
public static final PeerID MyPeerID = IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID, MyPeerName.getBytes());

public static final String NewPeerGroupName = "Dave Brubeck's Fan Club";
public static final PeerGroupID NewPeerGroupID = IDFactory.newPeerGroupID(NewPeerGroupName.getBytes());

public static void main(String[] args) {

try {

// Removing any existing configuration
// Tools.DeleteConfigurationInDefaultHome(); // You should put some code here to delete any existing configuration

// Creation of the network manager
NetworkManager MyNetworkManager = new NetworkManager(
NetworkManager.ConfigMode.EDGE,
Name);

// Setting the peer ID
Tools.PopInformationMessage(Name, "Setting the peer ID:\n\n" + MyPeerID.toString());
MyNetworkManager.setPeerID(MyPeerID);

// Starting the JXTA network
Tools.PopInformationMessage(Name, "Starting the JXTA network");
PeerGroup TheNetPeerGroup = MyNetworkManager.startNetwork();

// Retrieving a module implementation advertisement
ModuleImplAdvertisement TheModuleImplementationAdvertisement =
TheNetPeerGroup.getAllPurposePeerGroupImplAdvertisement();

// The creation includes local publishing
Tools.PopInformationMessage(Name, "Creating the new peer group:\n\n" + NewPeerGroupName);
PeerGroup MyNewPeerGroup = TheNetPeerGroup.newGroup(
NewPeerGroupID,
TheModuleImplementationAdvertisement,
NewPeerGroupName,
"For connoisseurs only..."
);

// Don't forget to start your peer group
if (Module.START_OK == MyNewPeerGroup.startApp(new String[0])) {

Tools.PopInformationMessage(Name, "New peer group started successfully");

} else {

Tools.PopInformationMessage(Name, "New peer group not started successfully !!!");

}

// Displaying IDs
System.out.println("Net Peer Group ID : " + PeerGroupID.defaultNetPeerGroupID);
System.out.println("Santa Claus ID : " + MyPeerID + "\n");
System.out.println("New Peer Group ID : " + MyNewPeerGroup.getPeerGroupID().toString());
System.out.println("Peer ID in New Group : " + MyNewPeerGroup.getPeerID().toString());

// Stopping the peer group
Tools.PopInformationMessage(Name, "Stopping the new peer group");

// Stopping the network
Tools.PopInformationMessage(Name, "Stopping the JXTA network");
MyNetworkManager.stopNetwork();

} catch (PeerGroupException Ex) {

Tools.PopErrorMessage(Name, Ex.toString());

} catch (IOException Ex) {

Tools.PopErrorMessage(Name, Ex.toString());

} catch (Exception Ex) {

Tools.PopErrorMessage(Name, Ex.toString());

}

}

}

dit0
Offline
Joined: 2007-12-13
Points: 0

Hi, Adamman

Is there any difference between use startApp() method with not use it ?? JXTA programmers guide don't show it.

thank you

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi,

If you check the Javadoc for the newGroup() method, you will notice that it says that the returned peer group is not started. startApp() is the method called by JXTA to start modules and peer groups are a type of module. This method allows them to perform all sorts of initialization operations necessary to run JXTA.

If you want to know more, you can try to download the JXTA code and run it step by step. I did it and it was very instructive.

Cheers,

J.

christine2008
Offline
Joined: 2008-05-17
Points: 0

adamman71 ,thanks,you are right!
But now ,I meet another problem:
I create a custom peergroup GA,and the peers of A ,B,C all find the GA ,and then join it.I will use GA's DiscoveryService to find all peers in it. If I find peers when I create the GA ,I can find peers,but if I close the application and restart ,I find the peergroupadvertisement of GA and then use NetPeerGroup.newGroup() create GA ,then find peers in it ,I can find nothing! why!
(GA's father group is NetPeerGroup,and per peers in GA is connected RDV)
please give me some advice,thanks!

adamman71
Offline
Joined: 2007-01-31
Points: 0

a) Either there is a problem with the seeds.

b) Or there is no more rendezvous for your group and none of your peer is set in autostart mode, so discovery queries cannot be forwarded in your peer group anymore.

c) Or you need to be more patient and let the rebooted peers connect to a rendezvous of GA (it can take up to 1 minute on my system) before you send your discovery query again.

Cheers,

J.

christine2008
Offline
Joined: 2008-05-17
Points: 0

Thanks!
But I do it as you that I make a peer act as RDV and start the service,but I find nothing .If I do't do that ,I can find the NetPeerGroup and I have one time that I find a custom peergroup and NetPeerGroup,I really need your help ,thanks!
By the way,I always show the claim
"No listener for 'tcp://224.0.1.85:1234/EndpointService:
jxta-NetGroup/PeerView/jxta-NetGroup' in group urn:jxta:jxta-WorldGroup "World PeerGroup"[1]decodedServiceName :EndpointService:jxta-NetGroup/PeerView decodedServiceParam :jxta-NetGroup"
why?Do think the claim can show some problems for not finding custom peergroups?

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi Christina,

The right way to create new peer groups is to use one of the newGroup() methods on the peer group object returned by the call to startnetwork() in the network manager. Don't forget to start the new peer group with a call to startApp() on it. I believe you will have more success with this method.

Cheers,

J.

acid
Offline
Joined: 2008-03-03
Points: 0

Hi, thanks for the reply Adamman71

Could you help me??
How to start rendezvous service from a peer configured as EDGE?? I mean, afer i created new peer group then the peer created it join in it and will be provide rendezvous service for that peer group? I have created and then join what else??

What is the function startApp() method?? i just use newgroup method?? is it wrong? how could i use it , this is some of my code to create group

try
{
modulimpleAdv = defaultGroup.getAllPurposePeerGroupImplAdvertisement();
FSGroup = defaultGroup.newGroup(null, // Assign a new ID
modulimpleAdv,
"FS Group",
"Default Group for File Sharing"); // Describtion of Group

groupAdv = FSGroup.getPeerGroupAdvertisement();
GID_FSGroup = groupAdv.getPeerGroupID();

thank you

adamman71
Offline
Joined: 2007-01-31
Points: 0

FSGroup.startApp(new String[0]); // This is an inherited method
FSGroup.getRendezVousService().startRendezVous(); // I prefer the autostart(...) way, but...

and when you are done:

FSGroup.stopApp(); // This is an inherited method
FSGroup.getRendezVousService().stopRendezVous();

Again, be patient, because it takes about 15 seconds to 1-2 minutes to have peers connect and reconnect to rendezvous properly. This should happen automatically if the seeds have been set properly.

Cheers,

J.

acid
Offline
Joined: 2008-03-03
Points: 0

Hi,
Thank you so much for the help, By the way why you said i should be patient to have peers connect and reconnect to rendezvous.

And but ... ???

What a rendezvous do you mean, a RDV as a seed connection or RDV for the peergroup ?? I think that is for RDV peer as a seed connection.

thanks

Message was edited by: acid

adamman71
Offline
Joined: 2007-01-31
Points: 0

I am saying to be patient, because, sometimes it takes a bit of time (30 seconds or 1 or 2
minutes) for peers to connect and reconnect...

I don't understand your 2nd question.

Cheers,

J.

adamman71
Offline
Joined: 2007-01-31
Points: 0

ADHOC peers do not connect to Rendezvous and Relays, so their queries are not propagated. You need to make sure your peer is at least EDGE and connected to a rendezvous.

J.

christine2008
Offline
Joined: 2008-05-17
Points: 0

Thanks!
Firstly,I test it on one computer,I think I don't need RDV,do you think so?
Sendly,today,I do as you,but I have some problems:
A NetPeerGroup(peer A:RDV,and start the service with "manager.getNetPeerGroup().startRendezVous()") create lots of custom peergroups which their father groups are NetPeerGroup .But if I use another NetPeerGroup's DiscoveryService (peer B:ADOH) to find all of custom groups(disv.getRomoteAdvertisements(null,DiscoveryService.Group,null,null,1,null)) .I can only find the nothing.Why?

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi,

Yes, even if you are running all your peers on one PC, you will need at least on rendezvous in each peer group. Rendezvous are responsible and necessary to propagate queries in a peer group.

Remember that ADHOC peers do not connect to super peers, so unless you change to EDGE mode, your tests will not be successful.

Cheers,

J.

acid
Offline
Joined: 2008-03-03
Points: 0

Hei Adamman71,

What about if i create an Edge peer and from it , create a new peergroup. and then the other edge peer try to find that peer group. The other peer located in same subnet with the peer create a peer group. i don't need rendezvous because it just for my LAN only. what do you hink about this?

If it can be done, what a peer will provide rendezvous service for peer group?? because all peer configured as EDGE???

thanks

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi

I think that you will run into troubles, because jxta requires rendezvous in peer groups to operate properly.

Cheers,

J.

dit0
Offline
Joined: 2007-12-13
Points: 0

Hi,

What kind of trouble will happen if there is no rendezvous in peer group??
I just use rendezvous peer as a seed connection and it doesn't join in my custom group. And i don't know how to provide rendezous service in my group cause all of peer configured as EDGE, they just retrieve rendezvous service from netpeergroup only. could you give some piece of code??

adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi,

If there is not rendezvous in a peer group, any discovery query for peer advertisements (or other advertisements) will not be forwarded between peers of your group...

You can provide a rendezvous service in a peer group by starting it from the rendezvous service. Check the Javadoc for proper methods (autostart, etc...).

Cheers,

J.