String tenantDomain = firstUriTokens[1];
boolean tenantExists = true;
boolean tenantInactive = false;
if (tenantExistMap.get(tenantDomain) == null) {
// we have to call the service :(
RedirectorServletServiceClient client;
try {
client =
new RedirectorServletServiceClient(context, request.getSession());
} catch (Exception e) {
String msg = "Error in constructing RedirectorServletServiceClient.";
log.error(msg, e);
throw new ServletException(msg, e);
}
try {
String status = client.validateTenant(tenantDomain);
tenantExists = StratosConstants.ACTIVE_TENANT.equals(status);
if (!tenantExists &&
StratosConstants.INACTIVE_TENANT.equals(status)) {
tenantExists = true;
tenantInactive = true;