Hi Dimuthu, Dhanushka, Thanks for the response.
On Thu, Sep 18, 2014 at 11:39 PM, Dimuthu Leelarathne <[email protected]> wrote: > Hi Godwin, > > +1 Danushka. > > Use the following method. > > public void deleteTenant(int tenantId) in TenantManager interface. > > > There is only one tenant manager in the system, and get it from > RealmService. > > > thanks, > > dimuthu > > On Thu, Sep 18, 2014 at 8:17 PM, Danushka Fernando <[email protected]> > wrote: > >> Why do u want to access the database directly? Cant you achieve it using >> carbon apis? >> >> Thanks & Regards >> Danushka Fernando >> Software Engineer >> WSO2 inc. http://wso2.com/ >> Mobile : +94716332729 >> >> >> On Thu, Sep 18, 2014 at 6:53 PM, Godwin Amila Shrimal <[email protected]> >> wrote: >> >>> Hi >>> >>> I need to access the *afuserstore* database which is configured in >>> *master-datasource.xml >>> *and pointing from *user-mgt.xml *using* datasource *property*.* Can >>> some one point me a existing code which I can reuse to get the above >>> datasource and do db operation. >>> >>> I tried following and didn't work properly. >>> >>> *1.* >>> >>> JDBCDataAccessManager configMgr = >>> (JDBCDataAccessManager)TenantMgtServiceComponent.getRegistryService().getConfigUserRegistry().getRegistryContext().getDataAccessManager(); >>> >>> configMgr.getDataSource() >>> >>> *2.* >>> >>> JDBCDataAccessManager govMgr = (JDBCDataAccessManager) >>> TenantMgtServiceComponent >>> .getRegistryService().getGovernanceUserRegistry() >>> .getRegistryContext().getDataAccessManager(); >>> >>> govMgr.getDataSource(); >>> >>> >>> Thanks >>> Godwin >>> >>> -- >>> *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 >>> >>> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Dimuthu Leelarathne > Architect & Product Lead of App Factory > > WSO2, Inc. (http://wso2.com) > email: [email protected] > Mobile : 0773661935 > > Lean . Enterprise . Middleware > -- *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
