WSO2 ESB comes with an embedded WSO2 Governance Registry which is used by the ESB to store configurations and other deployment artifacts. The embedded registry instance makes use of the embedded ESB database. This is an H2 database and the data files are by default stored in the directory named
ESB_HOME/repository/database. If you are running the ESB in the embedded registry mode, you should be careful not to manually alter any files stored in this directory as that might lead to database corruption or data loss.
The embedded registry instance is configured by the
registry.xml file which can be found in the
ESB_HOME/repository/conf directory. In this configuration you could point the embedded registry to a database other than the default embedded H2 database. To change the database used by the registry or change the location of the database files, edit the following section of the
You can point the embedded registry to a database other than the default embedded H2 database or change the location of the database files, by editing the
WSO2_CARBON_DB datasource configuration in the
master-datasources.xml file as shown in the example below.
WSO2 Governance Registry can be run in two operational modes, namely the
ReadWrite mode and the
ReadOnly mode. By default, it operates in the
ReadWrite mode. This mode is set by the following element in the
When the registry
ReadOnly mode is set to
true the ESB will not be able to store resources or write values to the registry. It will be capable of reading the existing resources only. If you want to make sure that the ESB or any of the ESB administrators do not alter the resources already stored in the registry, this value should be set to true. Also in a clustered deployment it is recommended that the only one ESB instance accesses the registry in the
ReadWrite mode. All other ESB nodes should be accessing the registry in the
ReadOnly mode to prevent different ESB servers from modifying the same resources at the same time. Any configuration updates should be done via the ESB instance in
In addition to configuring the database instance you can configure media type handlers for various media types and setup various registry related system parameters by modifying the
registry.xml file. The default configuration defines the following parameters.
Please, refer WSO2 Governance Registry documentation for further information on setting up media type handlers and other global parameters.
For more information, see Working with the Registry.