Subject: RE: [jade-develop] Hanging Problem with DFService.search()
From: David (amdawong@starhub.net.sg)
Date: Fri Jan 10 2003 - 19:28:56 MET
Dear Anthony,
I have the exact problem too...... though my code differs a little but
my search too hangs. It seems like all behaviours are being blocked or
so.... I wonder why too.....
Regards
David
> -----Original Message-----
> From: jade-develop-admin@sharon.cselt.it [mailto:jade-develop-
> admin@sharon.cselt.it] On Behalf Of Anthony Hoi Kit Leung
> Sent: Saturday, January 11, 2003 2:08 AM
> To: jade-develop@sharon.cselt.it
> Subject: [jade-develop] Hanging Problem with DFService.search()
>
> 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
> _______________________________________________
> jade-develop mailing list
> jade-develop@sharon.cselt.it
> http://sharon.cselt.it/mailman/listinfo/jade-develop
> UNSUBSCRIBE INSTRUCTIONS AT
http://jade.cselt.it/mailing.htm#unsubscribe
This archive was generated by hypermail 2a22 : Fri Jan 10 2003 - 19:28:27 MET