[Aglets-developer] Local Aglet Messaging - Able to send messages From Creator agent to Slave agent i
Status: Beta
Brought to you by:
cat4hire
From: Anil K. <akr...@ya...> - 2005-11-14 05:15:27
|
Hello Luca and All , I am able to send a message from the CreatorAgent to the SlaveAgent ( created by the creator Agent in the same context )in the same host . But I am not able to send a message back to the CreatorAgent from the Slave Agent. How can i achieve this .Please let me know. First i tried getting the proxy it is from the SlaveAgent using .. AgletProxy localProxy = this.getAgletContext().getAgletProxy(getAgletID()); and used .. localProxy.sendMessage(new Message("HELLORECEIVED")); to send message to teh creator. But the message is sent to the Slave Agent itself. Then i tried passing the CreatorAgent proxy to the SlaveAgent and used that in sending the message back. Still i did not receive the message in the CreatorAgent side. I am attaching the simple files i used for complete local messaging. PLease lte me know i f ia m doing some thing wrong. And if you have any other suggestions or any other mechanism that will achieve this functionality of complete messaging please let me know. Attached are source code files (LMCreatorAgent.java & LMSlaveAgent.java ) i used . Appreciate your help on this . Thanks Anil -- Luca Ferrari <cat...@us...> > wrote: > > > Anil Kumar's cat, on 16/10/2005 6.51, walking on > the > > keyboard wrote: > > > I got a compilation error at one import line > > that > > > syas "import > > com.ibm.aglet.message.MessageException; " > > > . > > > There is no com.ibm.aglet.message directory at > > all . > > > So i just removed this "message" directory and > > used > > > " com.ibm.aglet.MessageException; " and > > compilation > > > was successful . > > > > > > (Note : you may need to correct this error and > > upload > > > it again to CVS.) > > > > > > You're right, I had messed up the CVS, please be > > patiente, I'll fix the > > compilation problems in the CVS repository. > > Coming back to your problem, I've tried the > attached > > agents within my > > system and they are working. Since they are > similar > > to yours, I think > > the problem is on your systems, but I'm not sure > > what the problem could > > be (note: I used the 2.0.2 version downloaded from > > the web site). For > > the remote messaging, I think there could be a > > problem with a firewall, > > but I don't understand what the local messaging > > problem can be. Could > > you try my agents on your machine please? > > Moreover, try to connect with a telnet client to > the > > remote machine on > > the 4434 port (or whatever port you are running > the > > remote aglet > > daemon). Finally, what happens if you involve > remote > > messaging within > > the same host, that means running two platforms on > > the same host? > > > > Thanks, > > Luca __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |