This documentation is for WSO2 Carbon 4.4.1. View documentation for the latest release.
Page Comparison - CarbonContext API (v.7 vs v.8) - Carbon 4.3.0 - WSO2 Documentation
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



This methods method obtains the CarbonContext from  by using the data stored in the current thread. : The CarbonContext.getThreadLocalCarbonContext() method performs better than the other CarbonContext.getCurrentContext() method.

Retrieving information

The following methods allow tenants to retrieve information relevant to those tenants from the Carbon runtime.


This method retrieves the tenant specific registry.

Registry Types

  • USER_CONFIGURATION - The configuration registry of the currently logged in user.
  • USER_GOVERNANCE - The governance registry of the currently logged in user.
  • SYSTEM_CONFIGURATION - The system configuration registry of the tenantsystem.
  • SYSTEM_GOVERNANCE - The governance registry of the system.
  • LOCAL_REPOSITORY - The local repository of the tenantsystem.
UserRealm getUserRealm()