Subject: Hanging Problem with DFService.search()
From: Anthony Hoi Kit Leung (ahl00@doc.ic.ac.uk)
Date: Fri Jan 10 2003 - 19:07:55 MET
Hi, I have a problem when trying to preform a search on the DF, both the
agent and the RMS seems to hang. And I have to externally kill the
process.
I have tried the sniffer on the DF and the agent that performing the
search, there doesn't seem to be any communication between the DF and
the agent. (Not 100% sure, since the sniffer might have hanged as well!)
On the setup, I have used the follow code:
ServiceDescription sd = new ServiceDescription();
sd.setType("M-Agent");
sd.setName("AgentDescription");
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
dfd.addOntology(TestingOntology.NAME);
dfd.addServices(sd);
try {
System.out.println("Registering " + (this.getAID()).toString() + " with DF.");
DFService.register(this, dfd);
} catch (FIPAException e){
System.err.println( "Exception: " + e );
e.printStackTrace();
}
This is the code I use when performing the search:
ServiceDescription sd = new ServiceDescription();
sd.setType("M-Agent");
sd.setName("AgentDescription");
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
dfd.addOntology(TestingOntology.NAME);
dfd.addServices(sd);
DFAgentDescription[] results = new DFAgentDescription[99];
try {
// It is at this point that both the agent and the RMS seems to hang.
results = DFService.search(this, dfd);
} catch (Exception e) {
System.err.println( "Exception: " + e );
e.printStackTrace();
}
Can someone point out to me what is causing this hanging problem?
Anthony
This archive was generated by hypermail 2a22 : Fri Jan 10 2003 - 19:06:12 MET