Wednesday, March 27, 2013

How to invoke registry inside the web application.


You can initialize the registry inside the web application.

  // Obtain the reference to the registry from the CarbonContext
    CarbonContext cCtx = CarbonContext.getCurrentContext();
    Registry registry = cCtx.getRegistry(RegistryType.SYSTEM_CONFIGURATION);

You can find the sample web application at [1].

[1]https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/products/as/5.0.1/modules/samples/common/webapp/src/main/resources/carbon/registry/index.jsp