myLogger.log(Logger.SEVERE,"*** Agent " + myAgent.getName() + " cloned in a forbidden situation ***");
myAgent.clean(true);
}
public void informCloned(AID agentID, Location where, String newName) throws ServiceException, JADESecurityException, IMTPException, NotFoundException, NameClashException {
GenericCommand cmd = new GenericCommand(AgentMobilityHelper.INFORM_CLONED, AgentMobilitySlice.NAME, null);
cmd.addParam(agentID);
cmd.addParam(where);
cmd.addParam(newName);
// Set the credentials of the cloning agent
myService.initCredentials(cmd, agentID);
Object lastException = myService.submit(cmd);
if(lastException != null) {