} catch (UserStoreException e) {
String msg = "Error in retrieving the tenant id for the tenant domain: " + tenantDomain
+ ".";
log.error(msg, e);
throw new RestAPIException(msg, e);
} catch (org.wso2.carbon.user.api.UserStoreException e) {
throw new RestAPIException( e);
}
StratosAdminResponse stratosAdminResponse = new StratosAdminResponse();
try {
TenantMgtUtil.activateTenant(tenantDomain, tenantManager, tenantId);
} catch (Exception e) {
throw new RestAPIException( e);
}
//Notify tenant activation all listeners
try {
TenantMgtUtil.triggerTenantActivation(tenantId);
} catch (StratosException e) {
String msg = "Error in notifying tenant activate.";
log.error(msg, e);
throw new RestAPIException(msg, e);
}
stratosAdminResponse.setMessage("Successfully activated tenant " + tenantDomain);
return stratosAdminResponse;
}