Agent agent = myContainer.acquireLocalAgent(agentID);
String codeContainerName = getClassSite(agent);
myContainer.releaseLocalAgent(agentID);
//Check if the code is in the same container or in a remote one.
AgentManagementService amSrv = (AgentManagementService) myFinder.findService(AgentManagementService.NAME);
CodeLocator codeLocator = amSrv.getCodeLocator();
if (codeContainerName == null) codeContainerName = containerName;
if (containerName.equals(codeContainerName)) {
if (codeLocator.isRegistered(agentID)) {
if(myLogger.isLoggable(Logger.FINE)) {