Hi All,
I wanted to get the datasource of a super tenant. I was able to get the
datasource by switching the, tenant flow to super tenant flow using carbon
context API.
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext privilegedCarbonContext =
PrivilegedCarbonContext.getThreadLocalCarbonContext();
privilegedCarbonContext.setTenantId(tenantId);
privilegedCarbonContext.setTenantDomain(tenantDomain);
//getting the cloud-mgt datasource connection
DataSource ds = (DataSource)
privilegedCarbonContext.getJNDIContext().lookup("jdbc/cloud_mgt");
Instead of this way, is it possible to directly get the datasource using
super tenant ID or Domain ?
Thank You,
Best Regards,
~Vinuri~
--
Vinuri Perera
Software Engineer | WSO2 Inc
M : 0711518805
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev