final String password = server.getPassword();
try {
TenantRegAgentServiceStub stub =
getTenantRegAgentServiceStub(serverUrl, userName, password);
stub.renameTenant(tenantId, oldName, newName);
} catch (Exception e) {
String msg = "Error in triggering the tenant update, tenant id: "
+ tenantId + ".";
log.error(msg, e);
}