Hi

I need to check whether a specific tenant domain is a valid one or not.  If
its an invalid domain when getting the tenant id by giving the domain it
retains a -1. So is it the correct way to check whether the tenant domain
is valid of not as below by checking with -1 in the code.

int tenantId = 
ServiceHolder.getRealmService().getTenantManager().getTenantId(tenantDomain);

if(tenantId != -1) {

     //Do the operation

} else {

     //Invalid tenant

}


Thanks
-- 
Prasanna Dangalla
Software Engineer, WSO2, Inc.; http://wso2.com/
lean.enterprise.middleware

cell: +94 777 55 80 30 | +94 718 11 27 51
twitter: @prasa77
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to