Hi Priyadarssini,
You have to check the place where the relavant tenant flow starts in your process and see there whether tenant id has been set or not. If its not been set you can set it by passing "true" when setting the tenant domain. context.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, *true*); On Tue, May 12, 2015 at 10:48 AM, Isuru Ranawaka <isu...@wso2.com> wrote: > Hi Priyadarssini, > > This can be happened when tenants were not initialize at the time you > called the above code . > > > > On Tue, May 12, 2015 at 10:45 AM, Priyadarssini Kishokumar < > priyadarss...@wso2.com> wrote: > >> Hi, >> >> I need to get tenant id in the mediation initializer . When I'm trying to >> get it through >> "PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId()", it >> always returning -1. What is the correct way to get tenant details in >> initializer? >> >> -- >> Priya Kishok >> Software Engineer >> WSO2, Inc : http://wso2.com >> Mob : +94774457404 >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Best Regards > Isuru Ranawaka > M: +94714629880 > Blog : http://isurur.blogspot.com/ > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Mahesh Chinthaka Vidanagama* | Software Engineer WSO2, Inc | lean. enterprise. middleware. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 71 63 63 083 | Work: +94 112 145 345 Email: mahe...@wso2.com | Web: www.wso2.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev