returnval=false;
error("Can't rename admingroup:"+e.getMessage()); returnval=false;
    public boolean renameAdminGroup(Admin admin, String oldname, String newname){      boolean returnval = false;      AdminGroupDataLocal ugl = null;      try{        ugl = admingrouphome.findByPrimaryKey(newname);      }catch(FinderException e){        returnval = true;      }      if(returnval){        try{          ugl =  admingrouphome.findByPrimaryKey(oldname);          AccessRule[] accessrules = ugl.getAccessRulesAsArray();          AdminEntity[] adminentities = ugl.getAdminEntitiesAsArray();          AdminGroupDataLocal newugl = admingrouphome.create(newname);          newugl.addAccessRules(accessrules);          newugl.addAdminEntities(adminentities);          removeAdminGroup(admin, oldname);        }catch(Exception e){          returnval=false;        }      }            try{        if(returnval)          logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_INFO_EDITEDADMINISTRATORPRIVILEGES,"Renamed administratorgroup " + oldname + " to " + newname + ".");                    else          logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error renaming administratorgroup " + oldname + " to " + newname + ".");            }catch( RemoteException re){}            return returnval;    } // renameAdminGroup