0

Here is my code where manager class(non jade program) creates an agent successfully in an already running JADE platform but doesn't migrate that created agent to another platform.

Manager.java

public class Manager 
{

 public static void main(String args[])

{

 Runtime myRuntime = Runtime.instance();
 myRuntime.setCloseVM(true);

 Profile myProfile = new ProfileImpl();
 myProfile.setParameter(Profile.MAIN_HOST, "192.168.2.9");
 myProfile.setParameter(Profile.MAIN_PORT, "1099");

 ContainerController myContainer =  myRuntime.createAgentContainer(myProfile);
 try
 {
  myContainer.createNewAgent("agent_007", agent_hun_main.class.getName(), null);
 } catch (StaleProxyException e) {
 e.printStackTrace();
 }
 try 
 {
  myContainer.getAgent("agent_007").start();
 } catch (StaleProxyException e) {
  e.printStackTrace();
 } catch (ControllerException e) {
  e.printStackTrace();
 }

 }
 }

agent.java

 public class agent extends Agent
 {
 public void setup()
 {
 System.out.println("hie i am an agent");
 System.out.println(this);
 AID remoteAMS = new AID("ams@localhost:12341/JADE", AID.ISGUID);
 remoteAMS.addAddresses("http://192.168.2.9:7778/acc");
 PlatformID destination = new PlatformID(remoteAMS);
 this.doMove(destination);

 }

 }

This is the error that i get while executing my project:-

Mar 03, 2015 5:25:21 PM jade.core.mobility.AgentMobilityService$CommandSourceSink handleInformMoved

SEVERE: Destination localhost:1099/JADE does not exist or does not support mobility

Please help in sorting out this problem . Thanks in advance!

Community
  • 1
  • 1
salil vishnu Kapur
  • 660
  • 1
  • 6
  • 29

1 Answers1

0

Jade does not support mobility between platforms. According to the JADE Programmer’s Guide:

Using JADE, application developers can build mobile agents, which are able to migrate or copy themselves across multiple network hosts. In this version of JADE, only intra-platform mobility is supported, that is a JADE mobile agent can navigate across different agent containers but it is confined to a single JADE platform

abc
  • 21
  • 3