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
