Hi Prasanna, Super tenant id was -1234. Anyway why can't you use the validateDomain method in TenantMgtUtil method.
Thanks On Fri, Dec 19, 2014 at 10:07 AM, Godwin Amila Shrimal <[email protected]> wrote: > > Hi Prasanna, > > Use *MultitenantConstants.INVALID_TENANT_ID *constant other than using > -1. AFAIK other thing looks OK. > > > Thanks > Godwin > > > > On Fri, Dec 19, 2014 at 9:55 AM, Prasanna Dangalla <[email protected]> > wrote: > >> 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 >> >> > > -- > *Godwin Amila Shrimal* > Senior Software Engineer > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > mobile: *+94772264165* > linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>* > twitter: https://twitter.com/godwinamila > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Lakshman Udayakantha WSO2 Inc. www.wso2.com lean.enterprise.middleware Mobile: *0711241005*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
